Skip to content
Technology

Retrieval-Augmented Fine-Tuning (RAFT)

A training technique that combines retrieval-augmented generation with fine-tuning, teaching models to better leverage retrieved context. Produces models that are both knowledgeable and grounded in source documents.

Why it matters

RAG lets a model pull in outside documents at answer time, but models aren't always good at actually using what's retrieved, and sometimes ignore it. RAFT trains the model specifically to read retrieved passages well and lean on them instead of guessing. For teams building AI over their own knowledge base, this means more answers grounded in the real documents and fewer confident-sounding mistakes.

A concrete example

A company builds an internal assistant over its policy manuals. With plain RAG, the model sometimes retrieves the right page but still answers from memory. After RAFT, it's been trained on examples where the correct answer comes straight from the retrieved text, and also to ignore irrelevant passages. Now when an employee asks about a leave policy, the reply reliably reflects what the actual manual says.

How to use it

Worth considering when you already run retrieval and the model handles the retrieved passages poorly — ignoring them, mixing them with its own priors, or failing to notice when they do not answer the question. Training it specifically to work with retrieved context, including distracting passages, addresses that. It is a refinement of a working retrieval system, not a starting point.

The common mistake

Reaching for it before the retrieval itself is good. If the wrong passages are being retrieved, no amount of training on how to use passages helps — fix retrieval first and re-measure.

Related terms

Put Retrieval-Augmented Fine-Tuning (RAFT) into practice

Access 750+ AI models and 60+ tools through Vincony — start free with 100 credits.