All writing

Fine-Tune vs. Prompt Engineer vs. RAG: A Decision Table for 2025

Most teams pick their LLM adaptation strategy based on what their last hire knew how to do, not what the problem actually requires. That single misalignment quietly wastes months and burns inference budget on the wrong abstraction.

There are exactly three levers for making a foundation model useful to your specific domain: prompt engineering, retrieval-augmented generation (RAG), and fine-tuning. Each solves a different failure mode. Conflating them is the most expensive mistake I see teams make repeatedly — especially teams that have shipped something and are now wondering why it degrades under real usage.

Let me give you the decision framework I actually use.

The Three Failure Modes Each Lever Fixes

Prompt engineering fixes reasoning gap — the model has the knowledge but responds in the wrong format, tone, persona, or structure. You're not fighting missing knowledge; you're shaping output behavior. This is cheap, reversible, and should always be your first move.

RAG fixes knowledge gap — the model's training data doesn't include your documents, your products, your policies, or anything that changes faster than a training cycle. You're injecting relevant context at inference time. RAG doesn't change model behavior; it changes what the model knows in the moment.

Fine-tuning fixes behavior gap — the model can't reliably exhibit a specific pattern of reasoning or output style even when prompted well. Think: a highly specific output schema it keeps violating, a specialized jargon domain where it hallucinates plausible-sounding wrong terms, or latency-sensitive production paths where you need to strip system prompt tokens.

If you're reaching for fine-tuning before you've confirmed the other two can't solve it, you're skipping steps. Fine-tuning is not an upgrade — it's a different tool with a different maintenance burden.

The Decision Table

SymptomRoot CauseRight Lever
Wrong tone, format, or personaReasoning gapPrompt engineering
Hallucinating facts you own (policies, products)Knowledge gapRAG
Too slow / too expensive at scaleToken overheadFine-tune on distilled examples OR prompt compression
Correct answer but inconsistent output schemaBehavior gapFine-tune
Stale information (changes weekly/monthly)Knowledge gapRAG, not fine-tune
Specialized jargon consistently wrongBehavior + knowledge gapRAG first, fine-tune if RAG insufficient
Can't follow multi-step domain-specific logicDeep behavior gapFine-tune (or rethink task decomposition)
Works in demo, degrades under user varietyPrompt brittlenessStructured prompting + few-shot, then evaluate

Print this. Tape it to your sprint planning board. The number of production escalations this table would have prevented is not small.

Why RAG Is Almost Always the Right First Move

RAG ships in days, not weeks. A basic retrieval pipeline — chunking strategy, embedding model, vector store, retrieval call, context injection — is a weekend of real engineering. The hard parts are data quality, chunking granularity, and retrieval precision, not the plumbing itself.

More importantly, RAG keeps your knowledge layer mutable. Fine-tuning a model on your product catalog embeds that catalog into weights — and then your catalog changes. Now you're retraining, re-evaluating, and re-deploying to track updates you could have handled with a document upsert. The maintenance math is brutal.

One trap I see constantly: teams RAG their entire document corpus without thinking about retrieval quality, then blame the LLM when answers are wrong. That's almost never an LLM problem. If your top-k retrieved chunks aren't the right chunks, no model will save you. I wrote about the specific pipeline mistakes that kill RAG accuracy here — bad chunking and missing metadata filters account for the majority of production RAG failures I've diagnosed.

When Fine-Tuning Actually Earns Its Cost

Fine-tuning has a real cost structure: compute for training runs, an evaluation harness you have to build and maintain, versioning discipline, and the operational risk of a model that can't be hot-patched with a prompt change. You pay this upfront and you pay it again every time the underlying base model updates.

That cost is worth paying in three scenarios:

1. Latency-constrained inference at high volume. If you're running thousands of calls per minute and your system prompt is 2,000 tokens of behavioral instructions, fine-tuning that behavior into a smaller model can cut input token cost significantly. The gains are large enough at scale to justify the engineering overhead. Token efficiency math matters here — a fine-tuned 8B model doing what your prompted 70B was doing is a different unit economics story entirely.

2. Highly specialized output schemas that prompt engineering can't reliably enforce. Imagine a team generating structured medical coding outputs — ICD-10 codes with specific field formats — where a single malformed response breaks a downstream system. Fine-tuning on high-quality labeled examples produces far more stable schema adherence than even the most elaborate function-calling prompt. JSON mode and structured outputs help, but they don't fix a model that doesn't understand the domain.

3. Proprietary behavioral patterns that are core IP. If your competitive moat is how the model responds — a distinctive analysis style, a specialized reasoning chain, a domain-specific decision heuristic — fine-tuning is the right way to encode that. It's not just a technical choice; it's a product defense. That said: verify the moat is real before you build around it. Most "unique" prompting approaches are one capability release away from being table stakes.

The Hidden Cost of Fine-Tuning Decisions Nobody Budgets For

Training compute is the visible cost. These are the invisible ones:

  • Evaluation harness: You need a reproducible test set that catches regression across versions. Building this properly takes real time — and if you skip it, you're flying blind on every subsequent training run.
  • Data collection and labeling: Good fine-tuning data is high-quality, diverse, and representative of production edge cases. Getting 5,000–10,000 clean examples for a specialized domain often takes longer than the engineering work itself. This is the actual bottleneck — not GPUs.
  • Model versioning discipline: When the base model updates (and it will), you need a decision process for whether to retrain. Without one, you drift behind on capabilities silently.
  • Prompt incompatibility: A fine-tuned model may respond differently to prompts that work well on the base model. Your whole prompt library needs re-evaluation after a fine-tune.

None of this shows up in the "we'll just fine-tune it" proposal. It should.

The Sequencing Rule I Follow

Every domain adaptation decision should follow this order:

code
1. Prompt engineer first — structured prompt, few-shot examples, clear output spec
2. Evaluate on real production samples — not cherry-picked demos
3. If knowledge gap → add RAG, iterate on retrieval quality
4. Re-evaluate. Is the failure mode now behavioral/schema/latency?
5. If yes, AND volume justifies it → fine-tune
6. Never skip step 2 and 4. Evaluation gates everything.

The teams that jump straight to fine-tuning almost always do it because it feels more serious, more engineered, more committed. It's a credibility proxy masquerading as a technical decision. A well-engineered RAG pipeline with tight retrieval beats a hastily fine-tuned model on almost every real-world benchmark that matters for enterprise use cases.

A Quick Note on Hybrid Approaches

RAG and fine-tuning aren't mutually exclusive. The best production systems I've seen use fine-tuning to nail behavioral consistency and RAG to inject current knowledge — the fine-tuned model is good at how to respond, and RAG tells it what to respond about. This is the right architecture for high-stakes, high-volume, knowledge-intensive domains. But you should reach this architecture through iteration, not as your starting point.

If you're thinking about token efficiency at the model selection layer — which you should be if you're running agentic loops — the underlying model choice interacts directly with your adaptation strategy. I covered how token efficiency math shifts with newer model generations here.

What to Actually Do

  1. Audit your current failure mode first. Is the model getting things wrong because it doesn't know something, or because it doesn't behave the way you need? Answer this before touching any code.
  2. Build the evaluation harness before any adaptation work. 50–100 representative production samples with expected outputs. This is the gate that makes every subsequent decision defensible.
  3. Default to RAG for any knowledge that changes more than once a quarter. Fine-tuning on changing knowledge is a maintenance trap.
  4. Gate fine-tuning behind a volume threshold. If you're not running enough inference to justify the operational overhead, prompt engineering plus RAG is almost certainly the better tradeoff.
  5. When you do fine-tune, start with a small, high-quality dataset. 500 excellent examples outperform 5,000 mediocre ones. Data quality is the lever, not data volume.

The best adaptation strategy is the one that solves your actual failure mode with the least ongoing maintenance burden. That's almost never fine-tuning first.

Working on something like this? I take on a few fractional-CTO and AI engagements at a time.

The AI CTO playbook

Get my AI playbooks — straight to your inbox

Practical notes on shipping production AI, scaling teams, and the calls a CTO actually has to make. A few times a month. No spam, no fluff.