Fine-tune, RAG or prompt?
For engineers
A support assistant gives stale, invented and badly formatted answers. Sort the gaps, build the eval set, try prompts, add retrieval, fine-tune only on evidence, and price build, buy or wrap.
Before you train anything, name the gap: a model that lacks facts needs retrieval, a model that behaves badly needs better prompts first, and only a measured, stable behaviour gap justifies fine-tuning. Build the test set before you choose, then let the numbers pick the fix.
The situation
Northwind Outdoor sells camping gear online. Its support team answers about 1,800 tickets a week: return windows, warranty cover, "will this tent fit a 4-person family", delivery times. The team built a first assistant on a hosted model. Three complaints reached the product manager, Dana:
- It quotes a 60-day return window. The policy changed to 30 days in September.
- It invents tent specifications that are not in the catalogue.
- Replies are chatty, but the support lead wants three short parts: a one-line answer, the policy quote, and the next step.
An engineer says: "Let's fine-tune a model on our old tickets. That fixes all three." Dana wants proof before spending money.
Why it matters
The three complaints look like one problem ("the model is wrong") and are really three. The first two are knowledge gaps: the facts are missing, stale or unknown. The third is a behaviour gap: the model knows enough but does not follow the house style. Training on old tickets would teach the old 60-day policy into the weights, where it cannot be cited, checked or updated without another training run.
How the work goes
- Sort each complaint as knowledge or behaviour. Facts that change, are private or must be quoted belong in retrieval or a tool. Format, tone and consistent labels are behaviour.
- Build the eval set first. Take 150 real tickets, cover every ticket type and customer type, add edge cases such as an empty message, a non-English message and a policy question the company does not answer, and write grading criteria where there is no single right wording. Version the set.
- Measure a prompt baseline. Put the three-part format in the instructions, add three short examples, and use structured output. Run the eval. This costs hours, not weeks.
- Add retrieval for the facts. Index the current policy pages and the catalogue, give the model only the passages found, and tell it to say when the passages do not answer. Re-run the eval and read the failures: are they missing passages, bad ranking or a model that ignored the passage?
- Fine-tune only on evidence. If format errors stay high after prompting and examples, and you have hundreds of approved, current replies, a small tuning run may help. Compare it with the prompt baseline on the same set, and price the upkeep: new data, re-training on every policy change, and a re-test whenever the base model changes.
- Choose build, buy or wrap. A finished support-agent product, a wrapper over a frontier API, and a self-hosted open-weight model differ in speed, control and total cost. Decide with the eval results and a full cost line, not the demo.
Before and after
Before: "Fine-tune on 12,000 old tickets." The tickets contain the old return window, three agents' different styles and a few wrong answers. After: retrieval supplies the current 30-day policy, a prompt sets the format, and the eval set shows which gaps remain.
What goes wrong
- Training facts into weights. The model repeats the September policy until the next run, and nobody can see where an answer came from.
- Judging by demo. Five good answers in a meeting say nothing about the 150 tickets you did not try.
- Hiding the upkeep. A tuned model has a data pipeline, a re-test and a retirement date. The one-off training cost is the small part.
- Reaching for a bigger system first. If a prompt and three examples fix the format, a training pipeline is cost with no benefit.
The skill in this scenario is the order of questions: what is missing, how will we know, what is the cheapest fix that passes, and what will it cost to keep.
Steps
Sort each complaint into knowledge or behaviour
Write each complaint on one line and label it. Stale or invented facts are knowledge gaps: route them to retrieval or a tool. The wrong answer shape is a behaviour gap: try prompting first. Training is not an option yet, because nothing has been measured.
Complaint triage Complaint Gap First fix Quotes the old 60-day return window Knowledge (changed fact) Retrieve the current policy Invents tent specifications Knowledge (missing fact) Retrieve the catalogue; allow "I do not know" Replies are long and unstructured Behaviour (format) Instructions, examples, structured output Build the eval set before choosing a fix
Sample 150 real tickets across return, warranty, fit and delivery questions. Add edge cases: an empty message, a message in Spanish, a question the policy does not answer. Store a reference answer where one exists and grading criteria where it does not. Record where each case came from and version the set.
Eval set plan, version 1 150 cases Slice Cases Grading Returns and refunds 40 Reference answer Warranty 25 Reference answer Product fit and specs 40 Criteria: matches catalogue Delivery 20 Reference answer Edge and adversarial 25 Criteria: refuses or escalates Measure a prompt baseline
Add the three-part format to the instructions, three short examples and a structured-output schema. Run the eval set and record format pass rate and factual pass rate separately. Every later change is compared with this number.
Baseline run Check Pass rate Three-part format 91% Facts match current policy 62% Specs match catalogue 55% Add retrieval for the facts and read the failures
Index the current policy pages and the catalogue. Pass the top passages with the question and tell the model to answer only from them. Re-run the set and sort every failure: passage not found, wrong passage ranked first, or passage found and ignored.
Fine-tune only if a measured behaviour gap remains
If format errors stay high after prompting and examples, and you hold hundreds of current, approved replies, run a small tuning job and compare it with the prompt baseline on the same eval set. Price the upkeep: new data, retraining after policy changes, and a re-test whenever the base model changes.
Choose build, buy or wrap with the full cost line
Compare a vendor support-agent product, a wrapper over a frontier model API and a self-hosted open-weight model. Count integration, evals, retraining, hosting, monitoring and the cost of being locked in, not only the price per token. Pick the cheapest option that passes the eval set.
Skills this scenario uses
Where to study
- Optimizing LLM accuracy (OpenAI) (opens in a new tab)DocsFree
Frames the choice between prompt engineering, retrieval and fine-tuning as separate problems: context versus model behaviour.
- Model optimization guide (OpenAI) (opens in a new tab)DocsFree
Shows the loop of writing evals, prompting, and fine-tuning only after a measured baseline.
- Develop test cases (Claude docs) (opens in a new tab)DocsFree
How to design test cases and grading for a task before changing prompts or models.
- Prompt engineering overview (Claude docs) (opens in a new tab)DocsFree
The prompt-level changes to try first: clear instructions, examples and structured output.
- Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (opens in a new tab)PaperFree
The original RAG paper: combining a model with an external, updatable document index.
- Lost in the Middle: How Language Models Use Long Contexts (opens in a new tab)PaperFree
Evidence that models use information in the middle of long inputs less reliably.
- LoRA: Low-Rank Adaptation of Large Language Models (opens in a new tab)PaperFree
Explains the parameter-efficient tuning method behind many low-cost fine-tunes.