Fine-Tuning LLMs · Lesson 7
RAG-Aware Behaviour & Hallucination Control
You can fine-tune a model to use retrieved context well: answer only from the context, cite passages, and say 'I don't know' when the answer is absent.
Training data should include examples with relevant context, irrelevant or distracting context, and no answer in context — so the model learns to refuse rather than invent. RAFT (Retrieval-Augmented Fine-Tuning) follows this idea.
Measure faithfulness and citation accuracy, and combine fine-tuning with good retrieval rather than replacing it.
Key points
- Teach grounding, citation and abstention
- Include distractor and no-answer examples
- RAFT trains with retrieved documents
- Measure faithfulness after tuning