RAFT: Adapting Language Model to Domain Specific RAG
AI-generated Key Points
- Pretraining is a standard practice in large language models (LLMs) to incorporate vast amounts of textual data.
- RAFT is introduced as a novel training recipe to enhance LLMs' ability to answer questions in an "open-book" in-domain setting.
- RAFT trains the model to disregard distractor documents and focus on citing relevant sequences from retrieved documents verbatim, improving reasoning capabilities with chain-of-thought-style responses.
- RAFT is tailored for domain-specific RAG tasks and consistently boosts performance across datasets like PubMed, HotpotQA, and Gorilla.
- The code and demo for RAFT are openly available on GitHub at github.com/ShishirPatil/gorilla.
- Related works include concepts like Retrieval-Augmented Language Models (RALMs) and fine-tuning pretrained LLMs specifically for RAG tasks.
- RAFT prioritizes testing LLMs on consistent sets of documents compared to other works that adapt models for varied domains at test time.
- In conclusion, RAFT offers a strategic approach to improving LLM performance in domain-specific question-answering tasks within an "open-book" context, demonstrating significant potential for real-world applications.
Authors: Tianjun Zhang, Shishir G. Patil, Naman Jain, Sheng Shen, Matei Zaharia, Ion Stoica, Joseph E. Gonzalez
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 would 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. RAFT's code and demo are open-sourced at github.com/ShishirPatil/gorilla.
Ask questions about this paper to our AI assistant
You can also chat with multiple papers at once here.
Assess the quality of the AI-generated content by voting
Score: 0
Why do we need votes?
Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.
Similar papers summarized with our AI tools
Navigate through even more similar papers through a
tree representationLook for similar papers (in beta version)
By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.
Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.