用多阶段优化提示词,减少大模型幻觉。
Multi-stage Prompt Refinement for Mitigating Hallucinations in Large Language Models
- 分阶段用小模型修正提示词的错别字、标点等问题
- 在幻觉测试中,优化后提示词胜率超85%
- 可与现有纠错方法结合,适合提升模型可靠性
大型语言模型在自然语言理解与生成任务中表现优异,但仍存在幻觉问题,即生成看似合理但错误的信息。尽管多种因素导致幻觉,但提示词本身不规范(如歧义表述、语法错误、信息不全)的影响尚未充分研究。为此,本文提出多阶段提示词优化(MPR)框架,通过多轮迭代,利用微调的小模型分别修复标点、拼写、术语误用等问题,并引入自省与排序机制增强上下文相关性。在幻觉基准测试中,经MPR优化的提示词相比原始版本,胜率超过85%,显著降低幻觉并提升输出准确性。有趣的是,MPR可与现有事后纠错方法兼容,具备轻量、可扩展优势,适用于多种场景以增强大模型可靠性。
原文摘要 · Abstract (English)
Recent advancements in large language models (LLMs) have shown strong performance in natural language understanding and generation tasks. However, LLMs continue to encounter challenges with hallucinations, where models generate plausible but incorrect information. While several factors contribute to hallucinations, the impact of ill-formed prompts, prompts with ambiguous wording, incorrect grammar, or incomplete information, was relatively under explored. To address this, we introduce Multi-stage Prompt Refinement (MPR), a framework designed to systematically improve these ill-formed prompts across multiple stages. Each stage addresses specific errors such as punctuation, typographical mistakes, and misuse of key terms, using small language models (SLMs) fine-tuned for these tasks. MPR iteratively enhances the clarity of prompts with additional context and employs a self-reflection mechanism with ranking to prioritize the most relevant input. Experimental results on hallucination benchmarks show that prompts refined by MPR achieve over an 85~\% win rate compared to their original forms, demonstrating its effectiveness in reducing hallucinations and improving LLM output accuracy. Interestingly, we reveal that MPR can be combined with existing post-hoc hallucination mitigation frameworks, further enhancing its versatility. MPR provides a lightweight and adaptable solution for enhancing LLM reliability across various domains.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。