package hallucination: When an LLM generates code importing a software library or package that does not actually exist in the official repository (e.g., PyPI, npm)
package confusion attack: A supply chain attack where a user is tricked into installing a malicious package that has a name similar to or identical to a legitimate or expected package
typosquatting: Registering a package name that is a common misspelling of a popular package to capture accidental downloads
RAG: Retrieval-Augmented Generation—providing the LLM with relevant, retrieved external data (here, valid package lists or documentation) to ground its generation
SFT: Supervised Fine-Tuning—retraining a model on a specific dataset to improve its performance on a target task
hallucination rate: The percentage of generated code samples that contain at least one non-existent package reference
PyPI: Python Package Index—the official third-party software repository for Python
npm: Node Package Manager—the default package manager and repository for the JavaScript runtime environment Node.js