AI Hints
Home›RAG Tutorial›Limits and Choices
RAG · Lesson 11 of 120

RAG, Fine-Tuning or Long Context

Choosing.

⏱ 2 min read▶ Video at 10:17🎓 Free
Watch this lesson in the RAG courseWatch on YouTube ↗Full RAG course

RAG isn't the only way to give a model your knowledge. You could fine tune the model, training it further on your data. Or, with a model that reads very long prompts, paste in everything. When is each one the right choice?

RAG, Fine-Tuning or Long Context
From the video: RAG, Fine-Tuning or Long Context
  • RAG
  • Fine-tuning
  • Long context

Three options

RAG fetches only the relevant facts, stays fresh, and shows sources. Fine tuning changes how the model writes, its style and format, but it's slow to update, and poor at storing facts. Long context is simple for a few documents, but slow and costly for many, and accuracy drops as prompts grow.

OptionBest forWeak at
RAGfacts that change, sourcesneeds good search
Fine-tuningstyle, format, toneupdating facts
Long contexta few short documentscost at scale

A simple rule

Use RAG for knowledge, things the model should know. Use fine tuning for behaviour, how the model should write. Use long context when everything fits easily, and costs don't matter. Many real systems combine RAG with a little long context.

keyvalue
KnowledgeRAG
Behaviourfine-tuning
Tiny datalong context
Real systemsoften combine

Summary

RAG is for knowledge, fine tuning for behaviour, and long context for small amounts of text. Next, the foundations quiz.

Key takeaways
  • RAG: facts and sources
  • Fine-tuning: style
  • Long context: small data
Next up: Foundations Quiz — test yourself