用自生成示例训练LLM,提升检索增强生成的准确性和可靠性。
Post-training an LLM for RAG? Train on Self-Generated Demonstrations
- 用模型自己生成的示范数据进行微调,避免外源检索文本带来的偏差。
- 在知识问答任务中显著降低幻觉,提升对不确定问题的拒答能力。
- 适合需要高可信度问答的应用,如医疗、法律等专业领域。
大型语言模型在回答知识密集型问题(如“谁赢得了最近的世界杯?”)时常因训练知识不足或过时而表现不佳。通过检索增强生成(RAG)技术,模型可利用上下文检索结果改进回答。尽管微调可提升性能,但传统方法易引入幻觉等不良行为,原因在于训练数据与模型分布不一致且存在检索与答案不匹配等问题。本文提出一种基于自生成示范的训练方法,使模型在生成时自然融入检索内容,避免使用外部不匹配数据。实验表明,该方法能有效教会模型正确处理上下文检索信息,并在把握不准时选择不回答。相比传统RA-IT方法,在非RAG场景下无性能退化,同时在知识问答任务中表现更优。
原文摘要 · Abstract (English)
Large language models (LLMs) often struggle with knowledge intensive NLP tasks, such as answering "Who won the latest World Cup?" because the knowledge they learn during training may be insufficient or outdated. Conditioning generation on retrieved documents -- a technique known as retrieval augmented generation (RAG) -- mitigates these shortcomings by allowing the model to leverage in-context information. Practitioners can improve LLM RAG performance by fine-tuning on retrieval-augmented instructions, but must beware that this can cause undesirable model behaviors like hallucinations. We attribute this degradation to the fact that the training data is likely to be out-of-distribution for the model and may suffer from quality issues, such as misalignment between retrievals and target responses (since retrievals are frequently added post-hoc). We propose a recipe for training RAG-enabled LLMs using self-generated demonstrations, thereby avoiding training on out-of-distribution text and integrating retrievals into the LLM responses. We evaluate our method on knowledge intensive question answering (QA) tasks and show that our method teaches LLMs to properly handle in-context retrievals and abstain from questions it will likely get wrong. Compared to conventional RA-IT methods, our method prevents model degradation in non-RAG settings while exhibiting superior QA performance.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。