Finetune-RAG: Fine-Tuning Language Models to Resist Hallucination in Retrieval-Augmented Generation

Zhan Peng Lee, Andre Lin, Calvin Tan
5/16/2025
cs.CL

No official code found. Best implementation: Pints-AI/Finetune-Bench-RAG (47 stars, Apache-2.0, last commit 2025-06-12).

Abstract

Retrieval-Augmented Generation (RAG) has emerged as a powerful framework to improve factuality in large language models (LLMs) by grounding their outputs in retrieved documents. However, ensuring perfect retrieval of relevant information remains challenging, and when irrelevant content is passed downstream to an LLM, it can lead to hallucinations. In this work, we propose Finetune-RAG, a simple and effective fine-tuning approach that features the first-of-its-kind RAG training dataset constructed to mimic real-world imperfections. Experimental results show that Finetune-RAG improves factual accuracy by 21.2% over the base model. We also propose Bench-RAG, an LLM-as-a-judge evaluation pipeline that stress tests models under realistic imperfect retrieval scenarios. Our codebase and dataset are fully open sourced for community use.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Fine-tuning LLMs to resist hallucination in Retrieval-Augmented Generation by training on mixed factual and fictitious contexts.

470PythonMay 14, 20251 years agoApache-2.0

Similar Papers

Cite this paper

@article{lee2025finetunerag,
  title  = {Finetune-RAG: Fine-Tuning Language Models to Resist Hallucination in Retrieval-Augmented Generation},
  author = {Zhan Peng Lee and Andre Lin and Calvin Tan},
  year   = {2025},
  eprint = {2505.10792},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.10792v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.10792.svg)](https://codeofpaper.com/paper/2505.10792)

Discussion