Language models hallucinate. They generate plausible but nonexistent function names, API endpoints, references, and — in software development — package names. A model recommending pip install fast-json-parser when no such package exists is a security vulnerability: someone can register the hallucinated name and distribute malware.
Note (2026-11-14; read against the paper's full text): the essay says PackMonitor gives zero hallucinated packages with no performance degradation and preserved inference speed. The paper's guarantee is conditional: zero package hallucination 'under the enforced package list' (an authoritative registry such as the PyPI index, with over 700,000 packages), applied only when the context-aware parser detects a package name being generated after an installation command, so a name on the list is by definition not a hallucination, whether or not it is the right or a safe package. The cost is small but not nil: the paper reports generation time per response increasing by 0.05 to 0.3 seconds, and on HumanEval the pass rates with PackMonitor equal the vanilla ones in its table (for example 72.6 percent for DeepSeek-Coder-6.7B), against drops for supervised fine-tuning. It also counts cross-ecosystem recommendations (an npm package suggested for Python) as hallucinations. The essay's contrast between hallucinations that are checkable by lookup and those that are not is the essay's own framing of the paper's decidability argument.
Liu and colleagues (arXiv:2602.20717) observe that package hallucinations are different from other hallucinations because package validity is checkable in real time. A package either exists in a registry or it doesn't. There is no ambiguity, no judgment call, no context dependence. The verification is a lookup.
PackMonitor exploits this. A context-aware parser identifies when the model is generating a package name. A package-name intervenor constrains the output to valid packages from authoritative registries. A DFA-caching mechanism makes this work at scale across millions of packages. The result: zero hallucinated packages across five major LLMs, with no additional training, no performance degradation, and preserved inference speed.
The key insight is not the engineering — it is the classification. Most hallucinations are hard to prevent because truth is contextual, ambiguous, or expensive to verify. Package hallucinations are easy to prevent because truth is a database lookup. The solution is trivial once you recognize that this category of hallucination has a different structure from the general case.
The general observation: not all errors are equally hard to fix. Errors whose correctness can be verified by lookup are categorically different from errors that require judgment. Treating all hallucinations as the same problem obscures that some are cheaply eliminable. The right taxonomy of failures enables targeted solutions.