Retrieval Aware Fine-Tuning (RAFT), presents a novel recipe to prepare fine-tuning data to tailor the models for domain specific open-book settings, equivalent to in-domain RAG In RAFT, we prepare the training data such that each data point contains a question (\(Q\)), a set of documents (\(D_{k}\)), and a corresponding Chain-of-though style answer (\(A^{*}\)) generated from one of the document (\(D^{*}\)). We differentiate between two types of documents: 'oracle' documents (\(D*\)) i.e. the documents from which the answer to the question can be deduced, and 'distractor' documents (\(D_{i}\)) that do not contain answer-relevant information. As an implementation detail, the 'oracle' document doesn't need to be a single document, but can be more than one document, as is the case in HotpotQA (Yang et al., 2018). Then, for \(P\) fraction of the questions (\(q_{i}\)) in the dataset, we retain the oracle document (\(d_{i}^{*}\)) along with distractor documents (\(d_{k-1}\)). For \((1-P)\) fraction of the questions (\(q_{i}\)) in the dataset, we include no oracle document and only include distractor documents (\(d_{k}\)). We then fine-tune the language model using the standard supervised training (SFT) technique, training it to generate answers from the provided documents and questions. Fig. 2 illustrates the high-level design principal for RAFT.