RAFT: Adapting Language Model to Domain Specific RAG
Jun 28, 2024
auto_awesome
Sai Kolasani, a researcher at UC Berkeley’s RISE Lab and Arize AI Intern, discusses RAFT, a method to adapt language models for domain-specific question-answering. RAFT improves models' reasoning by training them to ignore distractor documents, enhancing performance in specialized domains like PubMed and HotpotQA. The podcast explores RAFT's chain-of-thought-style response, data curation, and optimizing performance in domain-specific tasks.
RAFT improves LLM's reasoning by training to ignore distractor documents in specialized domains.
Optimizing document selection in Raft enhances LLM's performance in domain-specific datasets.
Deep dives
Raft: Incorporating Fine Tuning and Retrieval Systems
Raft is a technique aimed at training language models (LLMs) to effectively utilize context during model training. This approach stands out for focusing on teaching the LLM how to leverage context rather than just adhering to specific responses. By implementing detailed reasoning in the training process, Raft helps LLMs effectively navigate a mix of relevant and irrelevant information, enhancing their ability to reason and extract relevant answers.
Role of Raft in Specific Domains
Raft proves beneficial in scenarios where documents have unique formats or when topics are obscure, demanding proficient leveraging of contextual information. While traditional document sources might not necessitate Raft, specialized industries such as medical care rely heavily on efficient document selection for vital decision-making. Understanding the dataset intricacies is crucial to determine the feasibility and usefulness of Raft for enhanced results.
Optimal Number of Documents at Test Time
The effectiveness of Raft can be influenced by the number of documents considered during test time. The study showcased that for different datasets, varying the number of documents, like three documents for Natural Questions, optimized performance. Tailoring the document selection process to the dataset's specificity can significantly impact the overall success of Raft in filtering irrelevant contexts.
Application and Production of Raft
While Raft is a newly emerged technique, potential applications include customer-facing systems aiming for precise LLM responses. Industries like healthcare are exploring Raft for optimizing document selection in critical decision-making tasks. Despite Raft's recent introduction, ongoing discussions with medical companies indicate an interest in implementing Raft to enhance document relevance and decision precision.
Where adapting LLMs to specialized domains is essential (e.g., recent news, enterprise private documents), we discuss a paper that asks how we adapt pre-trained LLMs for RAG in specialized domains. SallyAnn DeLucia is joined by Sai Kolasani, researcher at UC Berkeley’s RISE Lab (and Arize AI Intern), to talk about his work on RAFT: Adapting Language Model to Domain Specific RAG.
RAFT (Retrieval-Augmented FineTuning) is a training recipe that improves an LLM’s ability to answer questions in a “open-book” in-domain settings. Given a question, and a set of retrieved documents, the model is trained to ignore documents that don’t help in answering the question (aka distractor documents). 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.
Read it on the blog: https://arize.com/blog/raft-adapting-language-model-to-domain-specific-rag/