PulseAugur
EN
LIVE 06:54:29

LLMs hallucinate non-existent libraries in code generation, study finds

A new study published on arXiv details the risks of large language models (LLMs) hallucinating non-existent libraries when generating code. Researchers found that variations in developer prompts, including misspellings and fabricated library names, can trigger these hallucinations at high rates, potentially leading to broken builds and security vulnerabilities. To address this, the study introduces LibHalluBench, a benchmark for systematically evaluating these library hallucinations and highlights the urgent need for safeguards. AI

IMPACT Highlights systemic vulnerabilities in LLMs for code generation, necessitating safeguards against library hallucinations and supply chain risks.

RANK_REASON The cluster contains a research paper detailing a systematic study and introducing a new benchmark for evaluating a specific failure mode in LLMs. [lever_c_demoted from research: ic=1 ai=1.0]

Read on arXiv cs.CL →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

LLMs hallucinate non-existent libraries in code generation, study finds

COVERAGE [1]

  1. arXiv cs.CL TIER_1 English(EN) · Lukas Twist, Mark Harman, Helen Yannakoudakis, Jie M. Zhang ·

    Library Hallucinations in LLM-Generated Code: A Risk Analysis Grounded in Developer Queries

    arXiv:2509.22202v4 Announce Type: replace-cross Abstract: Large language models (LLMs) now play a central role in code generation, yet they continue to hallucinate, frequently inventing non-existent libraries. Such library hallucinations are not just benign errors: they can misle…