Pith. sign in

hub

De-hallucinator: Iterative grounding for llm-based code completion

15 Pith papers cite this work. Polarity classification is still indexing.

15 Pith papers citing it
abstract

Large language models (LLMs) trained on datasets of publicly available source code have established a new state of the art in code generation tasks. However, these models are mostly unaware of the code that exists within a specific project, preventing the models from making good use of existing APIs. Instead, LLMs often invent, or "hallucinate", non-existent APIs or produce variants of already existing code. This paper presents De-Hallucinator, a technique that grounds the predictions of an LLM through a novel combination of retrieving suitable API references and iteratively querying the model with increasingly suitable context information in the prompt. The approach exploits the observation that predictions by LLMs often resemble the desired code, but they fail to correctly refer to already existing APIs. De-Hallucinator automatically identifies project-specific API references related to the model's initial predictions and adds these references into the prompt. Unlike retrieval-augmented generation (RAG), our approach uses the initial prediction(s) by the model to iteratively retrieve increasingly suitable API references. Our evaluation applies the approach to two tasks: predicting API usages in Python and generating tests in JavaScript. We show that De-Hallucinator consistently improves the generated code across five LLMs. In particular, the approach improves the edit distance by 23.3-50.6% and the recall of correctly predicted API usages by 23.9-61.0% for code completion, and improves the number of fixed tests that initially failed because of hallucinations by 63.2%, resulting in a 15.5% increase in statement coverage for test generation.

hub tools

citation-role summary

background 3

citation-polarity summary

roles

background 3

polarities

background 2 support 1

representative citing papers

RepairAgent: An Autonomous, LLM-Based Agent for Program Repair

cs.SE · 2024-03-25 · conditional · novelty 8.0

RepairAgent autonomously repairs 164 bugs on Defects4J including 39 not fixed by prior techniques by treating an LLM as an agent that invokes tools via a finite state machine and dynamic prompts.

Story Point Estimation Using Large Language Models

cs.SE · 2026-03-06 · unverdicted · novelty 7.0

LLMs predict story points better in zero-shot prompting than supervised deep learning models trained on 80% of project data, with few-shot examples and comparative judgments further improving performance.

SCOPE: Leveraging Subgoal Critiques for Code Generation

cs.SE · 2026-07-07 · conditional · novelty 6.0

A Lean-oriented prover model, fine-tuned with dense and sparse RL rewards, generates structured semantic critiques that improve LLM code generation accuracy over Reflexion and Self-Refine on LiveCodeBench V6 and BigCodeBench.

FASE: Fast Adaptive Semantic Entropy for Code Quality

cs.SE · 2026-06-08 · unverdicted · novelty 6.0

FASE approximates functional correctness via MST on structural and semantic dissimilarity graphs, reporting 25% better Spearman correlation and 19% better ROCAUC than LLM-based semantic entropy at 0.3% runtime cost on HumanEval and BigCodeBench.

MojoFrame: Dataframe Library in Mojo Language

cs.DB · 2025-05-07 · unverdicted · novelty 6.0

MojoFrame is the first dataframe library in Mojo, using tensors for numeric columns and cardinality-aware methods for others, with up to 4.6x speedup on TPC-H queries versus other libraries.

citing papers explorer

Showing 15 of 15 citing papers.