多阶段提示词优化以缓解大语言模型中的幻觉问题
Multi-stage Prompt Refinement for Mitigating Hallucinations in Large Language Models
AI总结:
针对提示词结构不良导致的幻觉问题,提出多阶段提示词优化(MPR)框架,利用微调的小语言模型逐阶段修正错误并增强清晰度,在幻觉基准上实现超85%胜率,可有效减少幻觉并兼容现有缓解框架。
摘要:
近年来,大语言模型(LLMs)在自然语言理解和生成任务中展现出强大的性能。然而,LLMs 仍然面临幻觉问题的挑战,即模型生成看似合理但实际错误的信息。虽然多种因素会导致幻觉,但结构不良的提示词(如措辞含糊、语法错误或信息不完整的提示词)的影响相对未被充分探索。为解决这一问题,我们引入了多阶段提示词优化(MPR)框架,该框架旨在通过多个阶段系统地改进这些结构不良的提示词。每个阶段针对特定错误,如标点符号、拼写错误和关键术语的误用,使用针对这些任务微调的小语言模型(SLMs)。MPR 通过迭代地增强提示词的清晰度,并引入带有排名的自我反思机制来优先处理最相关的输入。在幻觉基准上的实验结果表明,经 MPR 优化的提示词相比原始形式实现了超过 85% 的胜率,证明了其在减少幻觉和提高 LLM 输出准确性方面的有效性。有趣的是,我们发现 MPR 可以与现有的事后幻觉缓解框架相结合,进一步增强了其多功能性。MPR 为提升 LLM 在各领域的可靠性提供了一种轻量级且适应性强的解决方案。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。