ImageNet classification with deep convolutional neural networks
Alex Krizhevsky, Ilya Sutskever et al.
0
Citations
0
Influential Citations
—
Venue
2024
Year
A training method that enhances the performance of LLMs for open-book in-domain question answering by training them to ignore irrelevant documents, cite verbatim relevant passages, and promote logical reasoning.
Retrieval-Augmented Generation (RAG) has become a cornerstone for grounding LLMs in external knowledge, but standard RAG pipelines often struggle when retrieved documents contain irrelevant or distracting information. The Retrieval Augmented Fine Tuning (RAFT) paper addresses this by introducing a training paradigm that explicitly teaches LLMs to ignore distractors, cite relevant passages verbatim, and produce chain-of-thought reasoning. This is crucial for real-world applications where retrieval quality is imperfect, and models must sift through noise to extract accurate answers. RAFT bridges the gap between fine-tuning and retrieval, offering a scalable way to adapt general-purpose LLMs to specialized domains without sacrificing robustness.

RAFT operates within the standard supervised fine-tuning (SFT) framework but with a carefully constructed training dataset. Each data point consists of a question (Q), a set of documents (Dk), and a chain-of-thought answer (A*) derived from one or more "golden" documents (D*). The key innovation is the inclusion of "distractor" documents (Di) that contain no answer-relevant information. For a fraction P of the training questions, the golden document is retained alongside distractors; for the remaining (1-P) fraction, only distractors are provided. This forces the model to learn to either extract answers from relevant context or rely on memorized knowledge when no golden document is present.

During training, the model is fine-tuned to generate answers that include verbatim citations from the golden document, promoting source-grounded reasoning. The chain-of-thought format further encourages logical step-by-step derivation. At test time, the model receives the question and top-k documents from a standard RAG retriever, and it must produce an answer with citations.




RAFT with RAG significantly outperforms baselines like Llama2-7B-chat with RAG, especially on tasks requiring information extraction and robustness to distractors. On Hotpot QA and HuggingFace datasets, gains reach 30.87% and 31.41% respectively. RAFT even surpasses GPT-3.5 on certain tasks. Ablation studies show that chain-of-thought reasoning improves accuracy and prevents overfitting compared to providing only direct answers.


The optimal proportion of golden documents (P%) varies across datasets, typically between 40% and 100%. Including some training examples without golden documents (e.g., P=80%) often improves performance, challenging the assumption that golden documents should always be present. Training with a mix of golden and distractor documents also makes the model more resilient to variations in the number of test-time documents.

RAFT offers a practical, data-efficient method to adapt LLMs for domain-specific RAG tasks. By explicitly training models to handle distractors and cite sources, it reduces hallucination and improves trustworthiness. The approach is complementary to other fine-tuning techniques and can be integrated into existing RAG pipelines. Its ability to surpass GPT-3.5 on certain benchmarks highlights the potential of specialized fine-tuning over general-purpose models. Future work could explore dynamic adjustment of the golden document ratio or extension to multi-hop reasoning scenarios.
Alex Krizhevsky, Ilya Sutskever et al.
Ashish Vaswani, Noam Shazeer et al.
Douglas M. Bates, Martin Mächler et al.
Diederik P. Kingma, Jimmy Ba