Choosing Models: Prompting, RAG or Fine-tuning
Choosing a model is a constraints problem. Hard limits (data residency, licence, latency, schema validity) remove options first; then cost, quality and team skills decide. Interviews probe prompting versus RAG versus fine-tuning, small versus frontier and open versus proprietary models, self-host versus API, routing and cascades, multimodal basics, reasoning models, when an agent is warranted, and how to explain non-100% accuracy.
Key points
- 1
Escalation path: build a small eval set, try prompting first, add RAG when failures come from missing or stale knowledge, fine-tune when behaviour or format gaps remain. Combine RAG (facts) with fine-tuning (behaviour) when you need both.
- 2
Weights are a poor database: in published comparisons RAG beat unsupervised fine-tuning for injecting both familiar and new knowledge. Fast-changing or private facts belong in retrieval, which can also cite sources.
- 3
Small fine-tuned models can beat large prompted ones on narrow tasks (a 770M T5 trained with distilled rationales beat few-shot 540B PaLM on the paper's benchmarks) at far lower cost and latency. What you give up is breadth on out-of-distribution inputs, so keep a fallback.
- 4
Open-weight means downloadable weights under a licence, not open source: the OSI Open Source AI Definition also requires the training code and detailed data information. Licences may restrict uses or scale, so check them before you build.
- 5
Self-hosting buys data control, version pinning and deep customisation. Its cost is fixed GPU spend, idle capacity, operations and upgrade work. Break-even volume = fixed monthly cost / API price per unit; below it the API usually wins.
- 6
Data residency is about where data is processed and stored. Encryption in transit or short retention does not satisfy it; an in-country provider region or in-country self-hosting does.
- 7
Routers choose a model per query up front; cascades try the cheap model and escalate when a check fails. Router cost = share_small x relative_cost + share_large (70% at 1/20 cost gives 33.5% of baseline). Cascades pay for two calls on escalated requests.
- 8
RouteLLM routers trained on preference data cut costs by more than 2x in some settings and transferred to new model pairs. FrugalGPT cascades matched the best single model at up to 98% lower cost. Pick routing thresholds from a cost-quality curve on held-out data, and audit routed traffic.
- 9
Vision-language models: a ViT/CLIP encoder turns patches into features (224 px with 16 px patches gives 196 tokens). Late fusion bridges pretrained models with a projector (LLaVA) or gated cross-attention and a Perceiver resampler (Flamingo). Early fusion (Chameleon) puts image and text tokens in one stream and can generate both, but needs training from scratch.
- 10
Reasoning models help on hard multi-step problems with checkable answers and waste compute on simple tasks (overthinking). A common design is a standard model by default, with hard requests routed to a reasoning model.
- 11
Use a coded workflow when the steps are fixed and an agent when the number of steps or the next action depends on intermediate results. Errors compound: 95% per step over 5 steps is about 77% end to end.
- 12
Explaining non-100% accuracy: LLMs generate probable text, so report a measured error rate on representative data, the error types and their impact, and the controls (validation, human review for high-stakes cases, monitoring). Treat model-version migrations like dependency upgrades: pin versions, run regression evals, canary, keep a rollback.
Common traps
Proposing fine-tuning to keep up with facts that change daily; that is a retrieval problem.
Equating open-weight with open source or with unrestricted commercial use.
Claiming self-hosting is always cheaper: at low or bursty volume, idle GPUs and operations work make the API cheaper.
Saying temperature 0 makes an LLM accurate: it makes output more repeatable, not more correct.
Reaching for an agent for a fixed pipeline: workflows are cheaper, faster and easier to test.
Judging a cheap routed model by how confident it sounds: routing errors are silent, so audit samples per route.
Assuming a newer model version is a drop-in upgrade: prompt-format sensitivity can swing accuracy a lot, so re-run evals before switching.
Read the source
Further reading
Suggest a resourceNo extra reading for Choosing Models: Prompting, RAG or Fine-tuning yet. Found a guide, video or cheat sheet that made it click? Share it and help the next learner.
Test yourself on Choosing Models: Prompting, RAG or Fine-tuning
Ten questions, with the answer and explanation after each one.