lumo

Module 12 · Lesson 1 of 9Free

Prompting, RAG or fine-tuning: choosing the right fix

Level
Intermediate
Topic
Fine-tuning and model customization
Reading time
16 min

When you finish this page you can

  1. Explain what a prompt, retrieval and fine-tuning each change in a model call, and why fine-tuning is a poor way to add facts.
  2. Choose a fix for a model problem with three questions about knowledge, describable behaviour and narrow, stable tasks.
  3. Estimate what each fix costs in time, data and running cost, including the costs that come after a training run.
  4. Say what fine-tuning options exist for Claude models as of October 2026, and what fine-tuning an open-weight model commits you to.
  1. Hosted and open-weight models: the tradeoffs16 min
  2. Few-shot prompting: teaching by example8 min
  3. RAG: grounding answers in your own documents14 min

Video lesson · coming soon

Three problems land in one week

Deskora is a help desk app. A shop’s support team uses it to answer customer emails from one shared inbox. Each customer problem becomes a ticket: one customer’s whole conversation with the support team. Deskora’s AI features draft replies, summarise long tickets and route each new ticket to the right queue.

Tomás, the Deskora engineer who builds those features, gets three reports in the same week:

  1. A stale rule. Priya, a support agent at a kitchenware shop, sees a draft that says free delivery starts at $60. Her shop lowered it to $40 last Monday.
  2. The wrong voice. Ines runs a small tea shop that writes to customers like friends. Its drafts read like a bank letter: “Dear valued customer, we sincerely apologise for any inconvenience.”
  3. A server rule. A pharmacy chain wants to move its support onto Deskora. Its customers mention medicines, so its contract says ticket text must never leave its own servers. That includes the router, the model call that puts each new ticket in a queue.

Kwame, the Deskora engineer on call, has one answer for all three: “Fine-tune it.”

This lesson answers one question: which fix fits each problem, and what does each one really cost?

The $40 threshold, the tea shop and the pharmacy are this lesson’s scenario. The pharmacy’s 9,000 tickets a day and every time estimate below are assumptions. Deskora’s 120,000 tickets a day and 60,000 drafts a day are facts used across this course.

Each fix changes a different part of the call

Every one of Deskora’s AI features is a model call: text goes in, the model writes text back. There are three places Tomás can change what comes out.

Diagram not drawn yet: three-places-to-change-a-model-call.svg

One model call, left to right. On the left, three inputs feed the call. 1: the prompt, holding instructions and a few example replies, labelled “you edit it; next call”. 2: retrieved passages, such as a help-center article, fetched from a search index at the moment of the call, labelled “you edit the source; next search”. Both enter the context window box. 3: the model’s weights, drawn inside the model box itself, labelled “changed only by a training run; days to weeks”. On the right, a dashed arrow returns the draft. A note under the weights says “habits, format, narrow skills; facts unreliably”.

A prompt and retrieval change what the model reads on this call. Fine-tuning changes the model itself.
  • The prompt holds instructions and examples. You change it by editing text, and the next call uses it. Few-shot prompting showed how a few examples carry a style that’s hard to put in words.
  • Retrieval finds passages, such as a help-center article, and puts them in the prompt at the moment of the call. This is RAG, short for retrieval-augmented generation. Change the source and the next search finds the new text.
  • Fine-tuning trains an existing model further on your own examples. It changes the model’s weights: the billions of numbers that decide what it writes. What it learns is a habit that applies to every call, whatever the prompt says.
Check yourselfAnswer in your head first, then reveal
Kwame’s plan for the stale rule: fine-tune the drafting model on 500 replies that say free delivery starts at $40. Will every draft now quote $40?Show answerHide answer
Not reliably, and it would be wrong for most shops. Models learn new facts slowly through fine-tuning, and the fact sits in weights shared by all 1,500 shops, so other shops’ drafts could start quoting Priya’s threshold. The next change would need another training run.

Training teaches habits, not reliably facts

Many engineers believe fine-tuning is how you teach a model your company’s knowledge. It sounds right: training is how the model learned everything else.

Research says otherwise. One study compared retrieval with fine-tuning on raw text about a topic. Retrieval consistently did better, both for facts the model had seen before and for new ones 1. A second study found that models learn examples with new facts much more slowly than other examples. As those facts are learned, the model makes things up more often 2. Its authors conclude that models gain facts mainly in pretraining, and that fine-tuning mostly teaches them to use what they know 2.

So fine-tuning is good at habits: a format, a tone, one narrow skill done the same way every time. Facts that belong to one customer, or that change, belong in the prompt.

No Claude model can be fine-tuned today

As of October 2026, Anthropic offers no customer fine-tuning for current Claude models. The one route was Claude 3 Haiku on Amazon Bedrock. That model reached end of life in most Bedrock regions, the US ones among them, on 10 September 2026. In its last regions it is a legacy model, and Bedrock allows no new fine-tuning jobs on legacy models 3.

So for Tomás, fine-tuning means an open-weight model: one whose weights you download, train and then serve yourself. That is the trade Hosted and open-weight models described, plus a training step.

Three questions pick the fix

Tomás uses the same three questions for every problem, in this order.

Diagram not drawn yet: prompt-rag-fine-tune-guide.svg

A flowchart, top to bottom. Start: “The output is wrong.” Question 1: “Is a fact missing, private or out of date?” Yes leads to a box “Retrieval: fix or add the source; put a short fact in the prompt.” No leads to Question 2: “Can you describe the behaviour, or show it in a few examples?” Yes leads to “Prompt: instructions and examples; test on the eval set.” No leads to Question 3: “Is it one narrow task with a stable format, and must a small model you run do it, at high volume or under a data rule?” Yes leads to “Fine-tune an open-weight model, often by distillation; needs labelled data, evals and serving.” No leads to “Keep improving the prompt and collect failing cases.” A side note says the three fixes combine.

Ask about knowledge first, behaviour second, and fine-tune only for a narrow, stable job a small model must do.
  1. Is a fact missing, private or out of date? Use retrieval, or put a short fact in the prompt. Training won’t hold it reliably.
  2. Can you describe the behaviour, or show it in a few examples? Use the prompt. It costs input tokens and an afternoon.
  3. Is it one narrow task with a stable format, which a smaller model you run must do? Then fine-tuning fits. The usual reasons are volume past what the API costs, or a rule that keeps text away from any provider. Often the training labels come from a large model, which is Distillation.

The fixes combine. A fine-tuned model still reads a prompt, and a prompted model still gets retrieved passages. The questions only decide where each part of the problem goes.

The $40 rule is a stale source

Tomás starts with question 1. Tunde, a customer, asked whether his $45 order ships free. The draft said no, free delivery starts at $60.

Every draft cites its sources, so Tomás opens the citation. It points to the shop’s “Delivery times and costs” article, last edited in March. Hana, the shop’s manager, announced the $40 threshold on the shop’s home page and in her team chat. She never edited the help-center article.

Retrieval worked. It found the right article, and the article was wrong. Hana edits it, and Deskora’s update job re-indexes it within minutes, as built in Keeping a RAG index fresh.

Retrieval (chosen) Fine-tuning instead
Time 10 minutes of Hana’s time Weeks: a new model, data, evals, serving
Data needed One corrected article Hundreds of replies that state the new rule
Running cost Unchanged A new model to serve for every shop
Next change Edit the article again Train again

No model changed. The fix was the source.

The tea shop’s voice fits in a prompt

The tea shop fails question 1: no fact is wrong. It passes question 2. Ines can describe her voice, and her past replies show it.

Tomás adds a style note to the tea shop’s settings, plus three of its own sent replies as examples. Deskora puts both in the drafting prompt, before the ticket. He picks examples that make no promises. The model copies everything examples share, and drafts must never promise a refund or replacement; the support agent decides.

Extra input tokens per draft (estimate)

100-token style note + 3 examples × about 270 tokens = about 900 tokens

Thinking and the reply itself are assumed not to change. This counts one drafting call per draft and leaves out retries.

The tea shop’s drafts a day

40 drafts × 900 tokens = 36,000 input tokens a day

40 drafts a day is the average shop in this course.

Cost on Claude Haiku 5.5

36,000 × $0.10 ÷ 1,000,000 = $0.0036 a day, about 11 cents a month

Input price as of October 2026 5.

If every shop adds a style

60,000 drafts × 900 tokens × $0.10 ÷ 1,000,000 = $5.40 a day

Before prompt caching, which bills a repeated prefix at a tenth of the input price on this model.

Before release, the change runs Deskora’s drafting eval set: about 300 labelled tickets that every prompt change is tested on. That way a playful tone doesn’t cost accuracy elsewhere. The whole fix is an afternoon of work.

Fine-tuning for tone would mean moving drafting off Claude Haiku 5.5 onto an open model Deskora serves. It would also need hundreds of replies per shop, and a new training run whenever a shop changes its voice. That trade can make sense for one fixed house style at very large volume. It doesn’t for 1,500 shops with 1,500 voices.

Try it yourself

Send one customer email to Claude Haiku 5.5 twice: once with the tea shop’s style in the system prompt, once without. One call costs under $0.00025: about 300 input tokens × $0.10 per million, and at most 400 output tokens, thinking included, × $0.50 per million. If you don’t have an API key, skip this.

bash
curl https://api.anthropic.com/v1/messages \
  -H "content-type: application/json" \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2026-10-21" \
  -d '{"model": "claude-haiku-5-5", "max_tokens": 400, "system": "You draft replies for support agents at Kettlewick Tea, a small tea shop. Never promise a refund, replacement or discount; the agent decides that. Style: warm and playful, first names, short sentences, at most one light joke. Sign off: Cheers, the Kettlewick team. Example reply: Hi Ama! Oh no, a dented tin is a sad start to tea time. Could you send us a photo of the dent? We will look at it and get back to you today. Cheers, the Kettlewick team", "messages": [{"role": "user", "content": "Draft a reply to this email. Hello, my order 52817 arrived and the jasmine tea tin is crushed. The tea spilled everywhere. What can you do? Ravi"}]}'

An example reply text from one run, shortened; yours will differ:

json
{"type": "text", "text": "Hi Ravi! A crushed tin and jasmine everywhere is not the calm cup we had in mind. Could you send us a photo of the tin and the box? ... Cheers, the Kettlewick team"}

What to look for:

  • The reply follows the voice of one example and the style note. Nothing about the model changed.
  • Delete the "system" field and run it again. The reply usually turns formal and generic.
  • Check that neither version promises a new tin. If one does, the prompt needs that rule stated more plainly.

The pharmacy’s router is a job for fine-tuning

The pharmacy passes questions 1 and 2. Deskora’s router prompt already describes the six categories well, and Claude Haiku 5.5 follows it. But the call can’t leave the pharmacy’s servers, and Claude’s weights can’t be downloaded. So the router must be a model that runs in the pharmacy’s own data centre.

Tomás’s candidate is Qwen3-1.7B, a small open-weight model with 1.7 billion parameters, under the Apache 2.0 licence 4. It fits one modest GPU. Routing is one narrow task with a fixed answer format: a category, an urgency and an order number. That is question 3.

How should the pharmacy’s tickets be routed, if no text may leave its servers?

Keep Claude Haiku 5.5 with today’s router prompt.

Breaks the contract. Every ticket would go to a model provider, so this is off the table, however good and cheap it is.

Run the same router prompt on Qwen3-1.7B, on the pharmacy’s server.

A day of work and no training data. Small models follow long instructions less well. Suppose, as this lesson assumes, it misroutes about one ticket in five, against about one in twenty for Haiku: 1,800 misrouted tickets a day.

Prompt a much larger open-weight model on the pharmacy’s server.

May match Haiku with prompting alone. But it needs a much larger GPU the pharmacy must buy, and the same evals.

Why this choice

Tomás runs the prompted small model first anyway. It costs a day, and its score on the pharmacy’s test set is the baseline the fine-tuned model must beat. Without a baseline, he couldn’t tell whether training helped.

The labels need care. Deskora usually trains a small model on Claude’s labels, but sending the pharmacy’s tickets to Claude for labelling breaks the same rule. So the labels come from the pharmacy’s own agents: a year of tickets already sits in the queues they chose. Tomás never trains a model he ships to one customer on another shop’s tickets. A trained model can repeat pieces of its training text. For a rare category, he can add made-up tickets that contain no real customer text.

When the choice changes. If the prompted small model passes the test set, Tomás ships it and skips training. If the pharmacy accepts a provider that processes text in its own region, hosted Claude is back on the table. If the categories change every month, retraining costs more than a larger prompted model.

This doesn’t save Deskora money

Kwame takes it one step further: “If the small model routes as well as Haiku, move all 120,000 daily tickets onto it.”

Self-hosting open models already did that sum. Routing on Claude Haiku 5.5 costs about $25 a day. Two GPUs plus staff time cost about $62 a day, and self-hosting breaks even near 300,000 tickets a day. So Deskora’s own router stays on Haiku. The pharmacy pays for its rule, not for savings: its 9,000 tickets a day would cost about $1.86 a day on Haiku.

The training run is the smallest cost

The training run is the line people budget for. For a model this small it is a few GPU-hours, an assumption for this lesson. The costs that come after it are larger.

Cost What it means for the pharmacy’s router Estimate (assumed)
Data preparation Map the pharmacy’s queues to the six categories, remove names and card numbers, drop tickets that were moved between queues About a week of engineering
A test set 500 tickets a senior agent checks by hand, at about 30 seconds each About 4 hours of agent time
Evals for every new model Score each trained model against the agents’ labels and against the prompted baseline About a day to set up, then minutes a run
Retraining when the task drifts A new category, a new queue or a new product line means new labels, a new run and a new eval 2–3 days each time
Serving An inference server (the program that runs the model and answers over HTTP), upgrades, on-call, and a : when the GPU is down, tickets go to an unsorted queue for a person About 10 hours a month, as the self-hosting lesson estimated

Preparing data for fine-tuning and Evaluating a fine-tuned model cover the two largest rows.

Drift is the cost that surprises people most. A prompt change takes hours. A fine-tuned model turns each change into a small project.

Diagram not drawn yet: prompt-change-vs-retraining-loop.svg

Two panels. Left, “Change a prompt”: three boxes in a short loop: 1 edit the instructions or examples, 2 run the eval set, 3 ship. Labelled “hours”. Right, “Change a fine-tuned model”: six boxes in a longer loop: 1 collect and label new examples, 2 clean them and remove personal data, 3 train, 4 run the eval set against the baseline, 5 deploy to the inference server with a fallback, 6 watch for drift. A dashed arrow from step 6 back to step 1 is labelled “new category or new queue”. Labelled “days, every time”.

A prompt change is edit, test, ship. A fine-tuned model repeats a data, training and serving loop every time the task changes.

Where this shows up

Tomás has chosen to fine-tune. The next lesson looks at what a training run actually changes inside the model.

Common mistakes

  • Fine-tuning to add facts. Facts learned in training are unreliable and can raise the rate of made-up answers. Put them in a source the model retrieves.
  • Skipping the prompted baseline. Without a score for the prompted model, you can’t tell whether training helped.
  • Budgeting only the training run. Data, evals, retraining and serving cost more than the GPU-hours.
  • One shared model for one customer’s data. Weights trained on one shop’s replies affect every shop that uses them, and can repeat parts of that text.

Check your understanding

Check yourselfAnswer in your head first, then reveal
Hana’s shop starts selling cast-iron pans, and drafts give the wrong care advice. Which fix?Show answerHide answer
Retrieval: add a care article for cast iron to the help center. The model is missing a fact, so this is question 1. Not fine-tuning: a fact trained into shared weights is unreliable and would reach every shop.
Check yourselfAnswer in your head first, then reveal
Deskora adds a seventh routing category, “prescriptions”. What does each router need?Show answerHide answer
The Haiku router needs a prompt edit and an eval run, a few hours. The pharmacy’s fine-tuned router needs new labelled tickets, a new training run and a new eval: the drift cost, days of work.
Check yourselfAnswer in your head first, then reveal
A shop asks Deskora to fine-tune Claude Haiku 5.5 on its past replies. What does Tomás tell it?Show answerHide answer
As of October 2026, Anthropic offers no customer fine-tuning for current Claude models. He offers its style through the prompt and examples on Haiku. Fine-tuning would mean an open-weight model that Deskora trains, tests and serves.
Check yourselfAnswer in your head first, then reveal
The fine-tuned router scores as well as Haiku on the test set. Should Deskora move all 120,000 daily tickets onto it to save money?Show answerHide answer
No. Haiku costs about $25 a day for routing. Two GPUs plus staff time cost about $62, and break-even is near 300,000 tickets a day. Matching quality is necessary, not sufficient: the cost of running the model decides.

Summary

  1. Match the fix to the problem: stale or private knowledge → retrieval (the $40 rule); behaviour you can describe → prompt and examples (the tea shop); a narrow, stable job a small model you run must do → fine-tuning (the pharmacy’s router).
  2. A prompt and retrieval change what the model reads on one call; fine-tuning changes its weights, so it teaches habits and narrow skills, not reliable facts.
  3. As of October 2026 no current Claude model can be fine-tuned, so fine-tuning means an open-weight model you train, evaluate and serve.
  4. Run the prompted model first: it may be enough, and its score is the baseline training must beat.
  5. Data preparation, evals, retraining on drift and serving cost more than the training run; at 120,000 tickets a day, Deskora’s own router stays on Claude Haiku 5.5.

Report a mistake

Tell us what’s wrong in this lesson and we’ll fix it.