RAFT: Adapting Language Model to Domain Specific RAG

AI-generated keywords: Large Language Models Pretraining RAG-based Prompting Fine-tuning Retrieval Augmented FineTuning (RAFT)

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.
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Authors: Tianjun Zhang, Shishir G. Patil, Naman Jain, Sheng Shen, Matei Zaharia, Ion Stoica, Joseph E. Gonzalez

License: CC BY 4.0

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.

Submitted to arXiv on 15 Mar. 2024

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

AI assistant instructions?

Results of the summarizing process for the arXiv paper: 2403.10131v2

In the realm of large language models (LLMs), pretraining has become a standard practice for incorporating vast amounts of textual data. However, the most effective approach for integrating new knowledge into these models remains an open question. To address this challenge, this paper introduces RAFT - a novel training recipe that enhances LLMs' ability to answer questions in an "open-book" in-domain setting. By training the model to disregard distractor documents and focus on citing relevant sequences from retrieved documents verbatim, RAFT improves reasoning capabilities with its chain-of-thought-style responses. This approach is specifically tailored for domain-specific RAG tasks and consistently boosts performance across datasets such as PubMed, HotpotQA, and Gorilla. The code and demo for RAFT are openly available on GitHub at github.com/ShishirPatil/gorilla. Related works in the field have explored concepts like Retrieval-Augmented Language Models (RALMs) and memorization in neural language models. Recent studies have also focused on fine-tuning pretrained LLMs specifically for RAG tasks. While these works adapt models for varied domains at test time, RAFT stands out by prioritizing testing LLMs on consistent sets of documents. In conclusion, RAFT presents a strategic approach to bolstering a model's performance in domain-specific question-answering tasks within an "open-book" context. Through meticulous design decisions and evaluations across diverse datasets, RAFT demonstrates significant potential for improving LLM capabilities in real-world applications.
Created on 12 Nov. 2024

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 representation

Look 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.