bibtext: @inproceedings{
  zhang2024raft,
  title={{RAFT}: Adapting Language Model to Domain Specific {RAG}},
  author={Tianjun Zhang and Shishir G Patil and Naman Jain and Sheng Shen and Matei Zaharia and Ion Stoica and Joseph E. Gonzalez},
  booktitle={First Conference on Language Modeling},
  year={2024},
  url={https://openreview.net/forum?id=rzQGHXNReU}
  }
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 incorporate new information into the pretrained model either through RAG-based-prompting, or finetuning. 
  However, the best methodology to incorporate information remains an open question. 
  In this paper, we present Retrieval Augmented Fine Tuning (RAFT), a training recipe which improves the model's ability to answer questions in "open-book" in-domain settings. In training 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 to help answer the question. This coupled with RAFT's chain-of-thought-style response helps improve the model's ability to reason. In domain specific RAG, RAFT consistently improves the model's performance across PubMed, HotpotQA, and Gorilla datasets, presenting a post-training recipe to improve pre-trained LLMs to in-domain RAG.
title: RAFT: Adapting Language Model to Domain Specific RAG
authors: Tianjun Zhang Shishir G Patil Naman Jain Sheng Shen Matei Zaharia Ion Stoica Joseph E. Gonzalez