R

Retrieval-Augmented Fine-Tuning

A training technique combining RAG-style retrieval with fine-tuning so models learn to reason over domain documents.

What it is

Retrieval-Augmented Fine-Tuning (RAFT) is a model training method that teaches a model how to use retrieved documents when answering domain-specific questions — including how to ignore irrelevant or distracting documents. Unlike RAG alone (which retrieves at inference time) or fine-tuning alone (which bakes knowledge into weights), RAFT trains the model to reason critically about retrieved context. It is aimed at enterprise uses where accuracy on a company's own internal content matters most.

Why it matters

Standard RAG can struggle when retrieved documents are noisy or only partly relevant; RAFT trains the model to handle that. For Salesforce customers in regulated industries like financial services or healthcare, a RAFT-tuned model can reduce wrong answers on internal policy and product documentation. It is a step beyond prompt engineering alone, and it costs more effort to set up.

Key components

  • domain document corpus
  • distractor document training
  • chain-of-thought supervision
  • fine-tuning pipeline
  • retrieval integration

How it connects

RAFT training happens outside Salesforce. The resulting model can be brought into Salesforce through Einstein Studio's bring-your-own-model options, with the Trust Layer governing its outputs.

Good to know

RAFT requires labeled training data that includes both relevant and distractor documents — budget for dataset curation before assuming a quick win.

Need Help Implementing This?

We specialize in putting AI and Agentforce to work for Salesforce customers. Let's talk about your use case.

Book Intro Call