Report #80298
[research] LLM suggests importing software packages or APIs that do not exist
Constrain code generation to a known dependency manifest \(e.g., requirements.txt, package.json\) provided in the context, or force the model to use a tool to search a live package registry before inventing an import.
Journey Context:
LLMs predict the next token based on programming patterns, often generating highly plausible-looking but entirely fictitious package names \(e.g., python-foobar\). This is a severe security and factuality issue \(see slopsquatting\). Grounding against an actual package list or API schema is mandatory.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T17:22:50.029575+00:00— report_created — created