RAFT: Adapting Language Model to Domain Specific RAG
Tianjun Zhang, Shishir G. Patil, Naman Jain, Sheng Shen, Matei, Zaharia, Ion Stoica, Joseph E. Gonzalez

TL;DR
RAFT is a training method that enhances large language models' ability to incorporate and utilize domain-specific knowledge effectively in retrieval-augmented question answering tasks.
Contribution
The paper introduces RAFT, a novel fine-tuning approach that improves LLMs' focus on relevant documents and reasoning in domain-specific RAG settings.
Findings
RAFT improves performance on PubMed, HotpotQA, and Gorilla datasets.
It enables models to ignore irrelevant documents during question answering.
Open-sourced code and demo available at GitHub.
Abstract
Pretraining Large Language Models (LLMs) on large corpora of textual data is now a standard paradigm. When using these LLMs for many downstream applications, it is common to additionally bake in new knowledge (e.g., time-critical news, or private domain knowledge) into the pretrained model either through RAG-based-prompting, or fine-tuning. However, the optimal methodology for the model to gain such new knowledge remains an open question. In this paper, we present Retrieval Augmented FineTuning (RAFT), a training recipe that improves the model's ability to answer questions in a "open-book" in-domain settings. In RAFT, given a question, and a set of retrieved documents, we train the model to ignore those documents that don't help in answering the question, which we call, distractor documents. RAFT accomplishes this by citing verbatim the right sequence from the relevant document that…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques
MethodsRefunds@Expedia|||How do I get a full refund from Expedia? · Attention Is All You Need · Sparse Evolutionary Training · Linear Layer · Layer Normalization · Multi-Head Attention · Linear Warmup With Linear Decay · Dropout · Byte Pair Encoding · Dense Connections
