AI & ML
An Empirical Analysis of Static Analysis Methods for Detection and Mitigation of Code Library Hallucinations
arXiv cs.SE0 views
arXiv:2604.07755v3 Announce Type: replace-cross Abstract: Despite extensive research, Large Language Models continue to hallucinate when generating code, particularly when using libraries. On NL-to-code benchmarks that require library use, we find that LLMs generate code that uses non-existent library features in 8.1-40% of responses. One intuitive approach for detection and mitigation of hallucinations is static analysis. In this paper, we analyse the potential of static analysis tools, both in terms of what they can solve and what they cannot. We find that static analysis tools can detect 16-70% of all errors, and 14-85% of library hallucinations, with performance varying by LLM and dataset. Through manual analysis, we identify cases a static method could not plausibly catch, which gives an upper bound on their potential from 48.5% to 77%. Overall, we show that static analysis methods are cheap method for addressing some forms of hallucination, and we quantify how far short of solving the problem they will always be.
Source:https://arxiv.org/abs/2604.07755PreviousTATG: Tracking-Aware Testing Objective for LLM-based Test GenerationNextGenerador de UUID aleatorios online para desarrolladores
Related posts
Our Route Planner Sent Crane Lorries to the Middle of Each Postcode and Some Rural Postcodes Are Miles Wide
0dev.to Data
How much of GPT-6 Astra's weight-editing demo is the harness?
0dev.to Machine Learning
How Pet Groomers Can Track Appointments, Pet Notes and Rebookings
0dev.to Tutorial
Symmetrical Components in Plain English: Fortescue Without the Fog
0dev.to Tutorial
When P2P Pays You and the Account Freezes Anyway
0dev.to Career
Your Company Will Pay for the Course if You Agree to Pay It Back When You Leave
0dev.to Career