All terms
Safety & Alignment
Package Hallucination
When an AI coding assistant invents a software library or dependency that does not exist.
Definition
Package hallucination is when an AI coding assistant confidently suggests a software package, library, or import that does not actually exist. Beyond wasting a developer's time, it creates a security hole: attackers can publish real malicious packages under those invented names.