Design a fine-tune that teaches a model to refuse when the retrieved context lacks the answer.
A RAG product is shipping confident hallucinations whenever the retriever misses. Design an SFT recipe that teaches the model to refuse, i.e. say 'I don't have enough information in the provided context', when the retrieved chunks do not actually support an answer. Specify the data shape, how you construct positive vs negative examples, the balance between them, and at least one failure mode to watch.
Build matched (question, chunks, response) triples: half where chunks support the answer, half where chunks look related but do not, with templated refusals. Realistic negatives matter most.
Picture teaching a kid to say 'I don't know' when their notes do not cover a question. You quiz them with two kinds of cards. On half the cards, the notes do answer the question, and the kid is rewarded for using them. On the other half, the notes look related but actually do not answer it, and the kid is rewarded for saying 'these notes do not cover that'. The trick is the second pile has to look real. If you only quiz them with blank notes, they only learn to refuse when the page is empty, and they keep making things up whenever the page has any text on it. The realistic near-miss notes are what teach the actual signal.
Detailed answer & concept explanation~10 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: describe the triple shape, the two matched halves plus partial slice, the three negative-sourcing techniques, the templating discipline, and the precision-recall evaluation.
Real products, models, and research that use this idea.
- Anthropic's Claude Opus 4.7 training reportedly includes grounded-refusal data for RAG and tool-use scenarios, with templated refusal phrasings.
- OpenAI's GPT-5.5 RAG fine-tuning guide recommends a similar matched-population recipe, with explicit examples of perturbed-query negatives.
- Llama 4 Maverick has been fine-tuned by enterprise teams in 2026 for grounded customer-support assistants using exactly this triple structure on Hugging Face TRL.
- Production RAG products at Notion AI and Glean use grounded-refusal fine-tunes to suppress confident hallucinations on retrieval misses, with internal eval sets that track refusal precision and recall.
- Allen AI's Tulu 3 data mixture includes a grounded-refusal slice mined from misses against the AI2 reasoning corpus, demonstrating the recipe at open-data scale.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you decide the precision-recall trade-off for refusal at evaluation time?
QWhat would happen if you used the same refusal phrasing in 100 percent of negatives but a varied phrasing in 0 percent of negatives?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Sourcing negative examples as blank or wildly off-topic context. The model then learns to refuse only on those obvious shapes and keeps hallucinating on the subtle near-miss cases that actually hurt in production.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.