arosplatforms™AI consultancy
ar
← AI Glossary
Techniques

Retrieval-Augmented Fine-Tuning

Fine-tuning a model specifically to work well with retrieved context, combining RAG's fresh knowledge with training's learned behavior.

Retrieval-augmented fine-tuning, often abbreviated RAFT, combines the two main ways of specializing a language model. Instead of choosing between RAG, which supplies knowledge in the prompt at inference time, and fine-tuning, which bakes behavior into the model's weights, it fine-tunes the model on examples that include retrieved documents, teaching it the specific skill of answering from provided context. The training data pairs questions with retrieved passages, including deliberately irrelevant distractor documents, and reference answers that reason from the correct sources.

The motivation is that vanilla RAG has a weak link: the model. General models given retrieved context still make characteristic mistakes, leaning on their pretraining memory instead of the documents in front of them, getting misled by plausible but irrelevant retrieved passages, or failing to say so when the context does not contain the answer. Training on retrieval-formatted examples directly targets these failures. The resulting model learns to cite what supports its answer, ignore distractors, and stay inside the evidence. The division of labor is the key insight: retrieval keeps knowledge current and updatable without retraining, while fine-tuning shapes how the model uses that knowledge. Neither alone achieves both.

At arosplatforms this is an optimization stage, not a starting point. We build the RAG pipeline first, measure where it fails on the client's evaluation set, and if the errors trace to the model mishandling context rather than to retrieval quality, we fine-tune on retrieval-formatted examples drawn from the client's own documents and questions. It is a targeted fix applied where the evidence says it will pay.

Have a use for this in your business?

Book a free consultation and we'll show you what's feasible and how we'd ship it.