让大模型生成时自动调用知识库,更新事实无需重训练。
KARLA: Knowledge-base Augmented Retrieval for Language Models
- 用特殊标记触发知识库查询,动态补充事实信息。
- 小模型也能达到大模型的准确度,且事实可追溯来源。
- 适合需要高准确性和可解释性的问答与内容生成场景。
我们提出一种新方法,使大语言模型在生成文本时能自动从知识库中提取事实知识。该方法实现:(1) 模型输出中的事实可无需重训练即更新;(2) 输出事实可追溯至知识库,提升透明性与可解释性;(3) 小型模型可达到与大型模型相当的事实准确性。核心思路是训练模型生成特定标记,触发对知识库的查询。实验表明,该方法在短文本和长文本生成中均提升了事实一致性,并支持通过修改知识库实现事实更新,而非依赖参数调整。
原文摘要 · Abstract (English)
We propose a new method that allows an LLM to automatically pull in factual knowledge from a knowledge base during token generation. This means that (1)~factual knowledge in the LLM output can be updated without retraining the LLM, (2)~facts in the LLM output can be traced to the knowledge base for transparency and explainability, and (3)~smaller models can achieve the same factual accuracy as larger models. Our core idea is to train the model to produce special tokens that trigger a query to the knowledge base. Our experiments show that our method improves factual grounding in both short and long-form generation, and allows factual revisions to take effect through KB edits rather than parameter updates.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。