Skip to main content
QUICK REVIEW

[论文解读] Enhancing LLM Factual Accuracy with RAG to Counter Hallucinations: A Case Study on Domain-Specific Queries in Private Knowledge-Bases

Jiarui Li, Ye Yuan|arXiv (Cornell University)|Mar 15, 2024
Machine Learning in HealthcareComputer Science被引用 19
一句话总结

论文提出一个端到端的基于RAG的问答系统,通过CMU/LTI私有知识库来提高领域特定查询的事实准确性,同时消融实验显示在嵌入和核心模型微调有助于还是有害于性能。

ABSTRACT

We proposed an end-to-end system design towards utilizing Retrieval Augmented Generation (RAG) to improve the factual accuracy of Large Language Models (LLMs) for domain-specific and time-sensitive queries related to private knowledge-bases. Our system integrates RAG pipeline with upstream datasets processing and downstream performance evaluation. Addressing the challenge of LLM hallucinations, we finetune models with a curated dataset which originates from CMU's extensive resources and annotated with the teacher model. Our experiments demonstrate the system's effectiveness in generating more accurate answers to domain-specific and time-sensitive inquiries. The results also revealed the limitations of fine-tuning LLMs with small-scale and skewed datasets. This research highlights the potential of RAG systems in augmenting LLMs with external datasets for improved performance in knowledge-intensive tasks. Our code and models are available on Github.

研究动机与目标

  • 通过利用外部数据源,减少领域特定和时效性查询中的LLM幻觉。
  • 创建一个面向CMU/LTI的专门数据集和评估框架,以支持基于RAG的问答。
  • 开发并评估一个结合检索与生成的RAG管线,用于给出事实性、具上下文感知的答案。
  • 研究嵌入模型微调和核心模型微调对系统性能的影响,以及小规模、偏见数据集的局限性。

提出的方法

  • 构建一个RAG问答管线,包含一个上下文检索器和一个使用LLaMA-2作为核心生成器的生成模型。
  • 通过网络爬虫、预处理和自动标注来策划一个面向CMU/LTI的数据集,以生成问答对。
  • 使用两阶段检索:先按相似性筛选前5个片段,然后用跨编码器重新排序器进行再排序。
  • 在QA数据集上微调嵌入和核心模型;使用Recall、F1、Cosine Similarity和BLEU等指标进行评估。
  • 通过消融研究和案例研究评估系统,以评估各组件的影响。
Figure 1: Overview of our system design. The process begins with a Web Crawler , which consists of a Recursive Crawler and a Filter to gather raw data. This raw data is sanitized and stored in an S3 storage bucket. The Dataset Generator relies on an Annotation Model to prompt annotations and filter
Figure 1: Overview of our system design. The process begins with a Web Crawler , which consists of a Recursive Crawler and a Filter to gather raw data. This raw data is sanitized and stored in an S3 storage bucket. The Dataset Generator relies on an Annotation Model to prompt annotations and filter

实验结果

研究问题

  • RQ1外部CMU/LTI上下文的检索是否能提升领域特定问题的LLM生成答案的事实准确性?
  • RQ2嵌入模型微调和核心模型微调如何影响RAG设置中的检索质量和答案生成?
  • RQ3所提出的端到端RAG系统在时效性领域查询上的性能提升与局限性有哪些?
  • RQ4哪些质量度量(IAA/Cohen’s Kappa)能指示用于训练/微调的整理数据集的可信度?

主要发现

  • 基于RAG的问答管线在没有RAG的基线相比,提升了Recall和F1分数。
  • 嵌入模型微调在召回和F1上带来提升,表明语义理解更好。
  • 核心模型微调提供召回提升,但由于数据集规模或偏见,可能降低F1,指示过拟合或生成问题。
  • 将嵌入和核心模型微调与RAG结合,与仅嵌入相比,带来边际收益或F1下降,凸显小规模、偏见数据集的权衡。
  • 该数据集达到了相当高的标注者一致性(Cohen’s Kappa = 0.67)。
Figure 2: Hierarchical knowledge base file system keeps the structural information of the relation between original files, enrich the semantic providing to the retriever.
Figure 2: Hierarchical knowledge base file system keeps the structural information of the relation between original files, enrich the semantic providing to the retriever.

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。