[Paper Review] Enhancing LLM Factual Accuracy with RAG to Counter Hallucinations: A Case Study on Domain-Specific Queries in Private Knowledge-Bases
The paper presents an end-to-end RAG-based QA system to improve factual accuracy for domain-specific queries using a CMU/LTI private knowledge base, with ablation showing when embedding and core model fine-tuning helps or hurts performance.
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.
Motivation & Objective
- Motivate reducing LLM hallucinations for domain-specific and time-sensitive queries by leveraging external data sources.
- Create a specialized CMU/LTI-focused dataset and evaluation framework to support RAG-based QA.
- Develop and evaluate a RAG pipeline combining retrieval and generation for factual, context-aware answers.
- Investigate the impact of embedding and core model finetuning on system performance and limitations of small, biased datasets.
Proposed method
- Build a RAG QA pipeline with a Context Retriever and a Generative Model using LLaMA-2 as the core generator.
- Curate a CMU/LTI-focused dataset via a web crawler, preprocessing, and automated annotation to generate QA pairs.
- Use a two-stage retrieval: top-5 chunks by similarity, followed by reranking with a cross-encoder reranker.
- Fine-tune embedding and core models on the QA dataset; evaluate with Recall, F1, Cosine Similarity, and BLEU metrics.
- Evaluate the system with ablation studies and case studies to assess the impact of each component.

Experimental results
Research questions
- RQ1Does retrieving external CMU/LTI-context improve the factual accuracy of LLM-generated answers for domain-specific questions?
- RQ2How do embedding model finetuning and core model finetuning affect retrieval quality and answer generation in a RAG setup?
- RQ3What are the performance gains and limitations of the proposed end-to-end RAG system on time-sensitive domain queries?
- RQ4What quality measures (IAA/Cohen’s Kappa) indicate the reliability of the curated dataset for training/fine-tuning?
Key findings
- RAG-based QA pipeline improves Recall and F1 scores over a baseline without RAG.
- Embedding model finetuning yields improvements in recall and F1, indicating better semantic understanding.
- Core model finetuning provides recall gains but may reduce F1 due to dataset size or bias, indicating potential overfitting or generation issues.
- Combining embedding and core model finetuning with RAG yields marginal benefits or decreases in F1 compared to embedding alone, highlighting trade-offs with small, biased datasets.
- The dataset achieved substantial annotator agreement (Cohen’s Kappa = 0.67).

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.