AI Dojo Open on the typewriterThe typewriter

Explainer

Prompting vs retrieval (RAG) vs fine-tuning

1 min read
Assumes: you know what a token and a context window are.
First published 19 October 2026. Last edited 21 November 2026.

Three ways to get a model to do what you need, from cheapest to most involved.

Prompting means changing what you ask, with clearer instructions, examples or a format to follow. It is usually the cheapest to try, though its extra tokens are paid on every request (see What a reply costs). Retrieval-augmented generation (RAG) means finding relevant documents at the moment of the question and placing them in the context, so the model answers from your material. It suits facts that change, or that the model never saw. Fine-tuning means further training a model on your own examples, which changes its parameters, the numbers set during training. It suits a consistent style, format or narrow task, and is usually not the best way to keep facts up to date. Many working systems combine all three. Choose by what is missing, not by a fixed order: a missing fact calls for the document, a rule never stated calls for a clearer prompt, and a skill still missing despite the rule and examples may call for fine-tuning. When several fixes could work, try the cheapest first.

Going deeper

The term RAG comes from Lewis et al. (2020), who paired a text generator with a learned retriever over a Wikipedia index (arxiv.org); today it often means any pipeline that searches first and then puts the results into the prompt.