paper-with-me

홈 › Papers

On Mitigating Code LLM Hallucinations with API Documentation

2024-07-13 · Nihal Jain, Robert Kwiatkowski, Baishakhi Ray, Murali Krishna Ramanathan, Varun Kumar

In this study, we address the issue of API hallucinations in various software engineering contexts. We introduce CloudAPIBench, a new benchmark designed to measure API hallucination occurrences. CloudAPIBench also provides annotations for frequencies of API occurrences in the public domain, allowing us to study API hallucinations at various frequency levels. Our findings reveal that Code LLMs struggle with low frequency APIs: for e.g., GPT-4o achieves only 38.58% valid low frequency API invocations. We demonstrate that Documentation Augmented Generation (DAG) significantly improves performance for low frequency APIs (increase to 47.94% with DAG) but negatively impacts high frequency APIs when using sub-optimal retrievers (a 39.02% absolute drop). To mitigate this, we propose to intelligently trigger DAG where we check against an API index or leverage Code LLMs' confidence scores to retrieve only when needed. We demonstrate that our proposed methods enhance the balance between low and high frequency API performance, resulting in more reliable API invocations (8.20% absolute improvement on CloudAPIBench for GPT-4o).

📄 PDF Abstract BibTeX arXiv:2407.09726

Code (0)

등록된 구현이 없습니다.

Tasks

Hallucinationvalid

Similar Papers 제목 키워드 기반

Self-Correcting Decoding with Generative Feedback for Mitigating Hallucinations in Large Vision-Language Models

2025-02-10 · Ce Zhang, Zifu Wan, Zhehan Kan, Martin Q. Ma 외

While recent Large Vision-Language Models (LVLMs) have shown remarkable performance in multi-modal tasks, they are prone to generating hallucinatory text responses that do not align with the given visual input, which res…

Image GenerationResponse GenerationText to Image GenerationText-to-Image Generation

Advancing Complex Medical Communication in Arabic with Sporo AraSum: Surpassing Existing Large Language Models

2024-11-20 · Chanseo Lee, Sonu Kumar, Kimon A. Vogt, Sam Meraj 외

The increasing demand for multilingual capabilities in healthcare underscores the need for AI models adept at processing diverse languages, particularly in clinical documentation and decision-making. Arabic, with its com…

Decision MakingLanguage ModelingLanguage Modelling

MIH-TCCT: Mitigating Inconsistent Hallucinations in LLMs via Event-Driven Text-Code Cyclic Training

2025-02-13 · Xinxin You, Xien Liu, Qixin Sun, huan zhang 외

Recent methodologies utilizing synthetic datasets have aimed to address inconsistent hallucinations in large language models (LLMs); however,these approaches are primarily tailored to specific tasks, limiting their gener…

Mitigating Action-Relation Hallucinations in LVLMs via Relation-aware Visual Enhancement

2026-05-12 · Zhenxin Qin, Qiang Li, Qingzhuo Wang, Ruiyang Qin 외 arxiv

Large Vision-Language Models (LVLMs) have achieved remarkable performance on diverse vision-language tasks. However, LVLMs still suffer from hallucinations, generating text that contradicts the visual input. Existing res…

NTS-CoT: Mitigating Hallucinations in LLM-based News Timeline Summarization with Chain-of-Thought Reasoning

2026-06-11 · Feng Lyu, Huiqin Yan, Sijing Duan, Hao Wu 외 arxiv

The rapid updates of online news make tracking event developments challenging, highlighting the need for timeline summarization (TLS). Hallucinations, where LLM-generated content deviates from source news, still remain a…

Timeline Summarization