arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2507.20930cs.CLcs.AIcs.LG

FRED:面向大语言模型幻觉的金融检索增强检测与编辑

FRED: Financial Retrieval-Enhanced Detection and Editing of Hallucinations in Language Models

Pegasi AI

Likun Tan, Kuan-Wei Huang, Kevin Wu

AI总结:

本研究针对大语言模型在金融领域的幻觉问题,提出FRED框架,通过构建带错误标记的金融合成数据集微调模型,实现了优于OpenAI-o3的幻觉检测与编辑效果,且小参数模型仍具竞争力,方案可泛化至多领域。

摘要:

大语言模型中的幻觉对要求事实可靠性的应用构成了严峻挑战,在金融等高风险领域尤为突出。本研究提出了一种有效方法,可基于给定上下文检测并编辑模型生成回复中的事实错误内容。我们依据用户定义的领域特定错误分类体系,通过在金融问答语料中插入带标记的错误构建了一个合成数据集,随后微调了Phi-4、Phi-4-mini、Qwen3-4B和Qwen3-14B这四个语言模型,使其能够检测并编辑这些事实偏差。我们性能最优的模型——经过微调的Phi-4,与OpenAI-o3相比,二元F1分数提升了8%,整体检测性能提升了30%。值得注意的是,我们经过微调的Phi-4-mini模型尽管仅有40亿参数,仍保持了具有竞争力的性能:与OpenAI-o3相比,其二元检测性能仅下降2%,整体检测性能仅下降0.1%。本研究为金融文本生成中的事实不一致检测与编辑提供了实用解决方案,同时提出了一个可泛化的框架,能够提升大语言模型在金融之外各类应用中的可信度与对齐水平。我们的代码和数据可在https://github.com/pegasi-ai/shield获取。

英文摘要:

Hallucinations in large language models pose a critical challenge for applications requiring factual reliability, particularly in high-stakes domains such as finance. This work presents an effective approach for detecting and editing factually incorrect content in model-generated responses based on the provided context. Given a user-defined domain-specific error taxonomy, we construct a synthetic dataset by inserting tagged errors into financial question-answering corpora and then fine-tune four language models, Phi-4, Phi-4-mini, Qwen3-4B, and Qwen3-14B, to detect and edit these factual inaccuracies. Our best-performing model, fine-tuned Phi-4, achieves an 8% improvement in binary F1 score and a 30% gain in overall detection performance compared to OpenAI-o3. Notably, our fine-tuned Phi-4-mini model, despite having only 4 billion parameters, maintains competitive performance with just a 2% drop in binary detection and a 0.1% decline in overall detection compared to OpenAI-o3. Our work provides a practical solution for detecting and editing factual inconsistencies in financial text generation while introducing a generalizable framework that can enhance the trustworthiness and alignment of large language models across diverse applications beyond finance. Our code and data are available at https://github.com/pegasi-ai/shield.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑