超越文档基础:代码、工具输出和文档上的跨度级幻觉检测
Beyond Document Grounding: Span-Level Hallucination Detection over Code, Tool Output, and Documents
AI总结:
提出一个统一的跨度级幻觉检测基准,涵盖代码、工具输出、结构化文档和自然语言RAG数据,通过微调Qwen3.5-2B模型在跨域场景下显著优于现有方法。
摘要:
检索增强生成(RAG)的幻觉检测通常基于自然语言文档证据进行评估。然而,基于生成的系统越来越依赖结构化输入:源代码、开发工具输出、markdown文档、表格和仓库元数据。我们引入了一个统一的基准,用于在代码、工具输出、结构化文档和现有自然语言RAG数据集上进行跨度级幻觉检测。该基准通过从正确的答案开始,注入具有精确字符标签的局部幻觉,并通过基于证据的审查验证代码测试拆分来构建。我们微调的Qwen3.5-2B检测器在统一测试集上达到0.689的span-F1,在代码代理源上达到0.60,显著优于LettuceDetect-large(0.17)和我们评估的最强零样本LLM评判(最多0.22)。同一模型在已有的自然语言基准上保持竞争力,RAGTruth example-F1为81.8,English PsiloQA IoU为0.724。
英文摘要:
Hallucination detection for retrieval-augmented generation (RAG) is usually evaluated on natural-language document evidence. However, grounded generation systems increasingly rely on structured inputs: source code, developer-tool output, markdown documents, tables, and repository metadata. We introduce a unified benchmark for span-level hallucination detection over code, tool output, structured documents, and existing natural-language RAG datasets. The benchmark is built by starting from grounded correct answers, injecting localized hallucinations with exact character labels, and validating the code test split with evidence-based review. Our fine-tuned Qwen3.5-2B detector reaches 0.689 span-F1 on the unified test set and 0.60 on the code-agent source, where it substantially outperforms LettuceDetect-large (0.17) and the strongest zero-shot LLM judges we evaluated (at most 0.22). The same model remains competitive on established natural-language benchmarks, with 81.8 RAGTruth example-F1 and 0.724 English PsiloQA IoU.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。