Fetching from the wire…
Public story · 2026-08-25 · high
Adversarial prompts push the fabrication rate up 45 points, and plain greedy decoding beat RAG on the paper's own trade-off metric.
Why now: The paper's correction matters now because the 9.4-point inflated number is the one hallucination-mitigation research has been citing as the Python baseline.
Earlier benchmarks overstated how often AI models invent fake Python packages by 9.4 points, because they miscounted standard-library modules as hallucinations, a new paper finds.
That correction matters because teams sizing hallucination defenses have been working from the inflated number. The same testing found that adversarial prompts, seeded with fabricated package names, push hallucination rates up by as much as 45 points. Ruby saw the largest jump.
The team ran seven inference-time defenses on eight models across five model families and four languages in a paper posted to arXiv. Retrieval-augmented generation lowered the hallucination rate in 18 of 32 model-language pairs tested. Plain greedy decoding, no retrieval, no extra fine-tuning, gave the best average trade-off. The researchers scored each defense against a new Package Utility metric that penalizes blocking real packages along with fake ones.
RAG isn't the default fix it's been sold as. It helped in barely more than half the combinations tried, and the cheapest possible option beat it on average. The place any of these defenses earns its cost is against an attacker naming fake packages on purpose, where the fabrication rate jumps. If you're weighing RAG against simpler decoding settings to cut hallucinated dependencies, test against an adversarial prompt set before trusting either one's cooperative-mode numbers.
Each link below shares sources, entities, or timing with this story.
Claude Code uses Python / Shared entity: Python / Same source domain / Shared topic / Earlier coverage
Linked by a graph relationship (Claude Code uses Python); both cover Python; reported by the same outlet (arxiv.org).
OpenHands uses Python / Same source domain / Shared topic
Linked by a graph relationship (OpenHands uses Python); reported by the same outlet (arxiv.org); overlapping topics (configuration, prompt).
RAGOCR competes with RAG / Shared entity: RAG / Same source domain / Earlier coverage / Tension
Linked by a graph relationship (RAGOCR competes with RAG); both cover RAG; reported by the same outlet (arxiv.org).
Scrapling uses Python / Shared entities / Earlier coverage
Linked by a graph relationship (Scrapling uses Python); both cover Python, RAG; earlier Python coverage from 2026-03-19.
Shared entity: Under / Same source domain / Shared topic / Earlier coverage / Tension
Both cover Under; reported by the same outlet (arxiv.org); overlapping topics (average, under).
Claude Code uses Python / Shared entity: RAG / Same source domain / Earlier coverage
Linked by a graph relationship (Claude Code uses Python); both cover RAG; reported by the same outlet (arxiv.org).
Claude Code uses Python / Shared entity: Python / Same source domain / Earlier coverage
Linked by a graph relationship (Claude Code uses Python); both cover Python; reported by the same outlet (arxiv.org).
OpenFang competes with Python / Shared entity: Python / Earlier coverage / Tension
Linked by a graph relationship (OpenFang competes with Python); both cover Python; earlier Python coverage from 2026-03-01.