Back to Learn
Deep Dive

RAFT (Retrieval-Augmented Fine-Tuning)

RAFT (Retrieval-Augmented Fine-Tuning) is a training methodology that fine-tunes an LLM to identify and utilize relevant information from a set of retrieved documents while explicitly ignoring irrelevant 'distractor' context. This approach bridges the gap between domain-specific fine-tuning and real-time retrieval by teaching the model to cite evidence and reason through provided context, trading increased up-front training costs for superior performance in specialized RAG pipelines.

Definition

RAFT (Retrieval-Augmented Fine-Tuning) is a training methodology that fine-tunes an LLM to identify and utilize relevant information from a set of retrieved documents while explicitly ignoring irrelevant 'distractor' context. This approach bridges the gap between domain-specific fine-tuning and real-time retrieval by teaching the model to cite evidence and reason through provided context, trading increased up-front training costs for superior performance in specialized RAG pipelines.

Disambiguation

Unlike standard RAG which relies on the model's base 'in-context learning' abilities, RAFT actually updates the model weights to better handle the noise inherent in retrieval results.

Visual Metaphor

"An open-book exam coach: Training a student specifically on how to ignore the 'trick' chapters in a textbook to find the one true answer for the test."

Conceptual Overview

RAFT (Retrieval-Augmented Fine-Tuning) is a training methodology that fine-tunes an LLM to identify and utilize relevant information from a set of retrieved documents while explicitly ignoring irrelevant 'distractor' context. This approach bridges the gap between domain-specific fine-tuning and real-time retrieval by teaching the model to cite evidence and reason through provided context, trading increased up-front training costs for superior performance in specialized RAG pipelines.

Disambiguation

Unlike standard RAG which relies on the model's base 'in-context learning' abilities, RAFT actually updates the model weights to better handle the noise inherent in retrieval results.

Visual Analog

An open-book exam coach: Training a student specifically on how to ignore the 'trick' chapters in a textbook to find the one true answer for the test.

Related Articles