Practical guide · AI engineering
Prompting, RAG, or fine-tuning: how to choose
These methods solve different failures. Prompting clarifies the task. Retrieval supplies facts at run time. Fine-tuning changes the behavior the model has learned. Diagnose the failure before you choose the technique, then compare the change against the same fixed cases.
Published November 29, 2026 · 16 minute read
The short answer
Use prompting when the model already knows enough but the instructions, examples, or output contract are unclear. Use RAG when answers depend on private, changing, or source-specific knowledge. Use fine-tuning when you need consistent learned behavior across many calls, such as a stable format, classification boundary, tone, or specialized task pattern. Combine them when the product needs both current facts and consistent behavior.
Start with the failure, not the technique
A weak answer does not tell you which intervention will help. The model may lack the facts, misunderstand the instructions, retrieve the wrong passage, violate a format, or fail only on one user segment. Collect representative failures and label their causes before changing the system.
OpenAI's model optimization guide recommends an evaluation loop in which you write evals, improve prompts or fine-tuning, and measure again. The order matters. Without a fixed evaluation set, a rewrite can make the visible example better while harming other tasks.
- Save the input, expected outcome, actual output, and evidence the answer should have used.
- Label the failure as instruction, knowledge, retrieval, behavior, policy, tool, or model-capability related.
- Fix one class at a time and rerun the same cases.
A decision table
| Observed failure | First move | Why |
|---|---|---|
| The model misunderstands a clear, stable task | Prompting | Clarify the instruction, constraints, and success criteria. |
| The output format varies | Schema plus examples, then fine-tuning if needed | A typed contract is cheaper to test before training. |
| The answer needs current or private facts | RAG or a tool | Supply authorized evidence when the request runs. |
| The right source exists but is not retrieved | Repair retrieval | Prompt or training changes cannot expose a passage the model never receives. |
| The model repeatedly applies the wrong style or decision boundary | Fine-tuning | Examples can teach a stable pattern used across many calls. |
| The task needs current facts and a specialized response pattern | RAG plus fine-tuning | Retrieval supplies knowledge while training shapes behavior. |
| The model cannot reason through the task even with good evidence | Change model or workflow | None of the three methods creates a missing base capability reliably. |
What each method changes
Prompting
Changes the instructions and examples inside a request. It is fast to revise and easy to roll back, but longer prompts cost tokens and can become hard to maintain.
RAG
Changes the evidence available at run time. It supports citations, freshness, deletion, and access control, but it adds ingestion and retrieval failures.
Fine-tuning
Changes learned behavior using labeled examples. It can shorten prompts and improve consistency, but requires clean data, held-out tests, and model-version operations.
AWS's RAG versus fine-tuning guidance draws the practical distinction between supplying external knowledge and adapting model behavior. Google's tuning decision guide likewise starts from the task and available data rather than treating tuning as a universal upgrade.
Three worked examples
Support answers from a changing help center
The product changes weekly and answers should cite the current help article. Use RAG, filter results by product and locale, and evaluate retrieval separately from answer quality. Fine-tuning on last month's articles would make deletion and correction difficult.
Classifying thousands of recurring tickets
Start with a written taxonomy, clear examples, and structured output. If a strong model still crosses the same category boundaries and the labels are stable, fine-tune on reviewed examples. Keep a held-out set that includes ambiguous and rare tickets.
Drafting account briefs
Retrieve current CRM notes and approved company sources, then prompt the model with a brief template and citation rules. Add fine-tuning only if the same style or extraction errors persist across many evaluated accounts.
When to combine methods
Production systems often combine all three in layers. A small system prompt defines the job and output contract. Retrieval adds permitted evidence for this request. A fine-tuned model applies a stable domain pattern. Keep the responsibilities separate so a retrieval regression does not get misdiagnosed as a training problem.
Anthropic's context engineering guidance argues for the smallest high-signal context that can produce the desired outcome. That principle applies across the stack: retrieve only useful evidence, keep instructions concise, and train only on examples that express the behavior you want.
A seven-step evaluation workflow
- Define the user promise and the final state that counts as success.
- Collect representative, difficult, ambiguous, and unanswerable cases.
- Record a baseline with the current prompt, model, data, latency, and cost.
- Label each failure by cause before selecting an intervention.
- Make the smallest change that should fix one failure class.
- Rerun the full set, inspect regressions by slice, and repeat trials for variable tasks.
- Set a release rule, preserve the artifacts, and add reviewed production failures to the set.
OpenAI's fine-tuning cookbook example demonstrates the training-data and evaluation loop for chat models. Treat it as an implementation pattern, then adapt the labels, holdout set, and grader to the actual product outcome.
Common wrong turns
- Fine-tuning on facts that change. Put changing knowledge in retrieval or a tool.
- Adding RAG when the source material already fits cleanly in the prompt. Compare the simpler path first.
- Training before the labels are stable. The model will reproduce inconsistent reviewer decisions.
- Judging only the final prose. Measure retrieval, citations, schema validity, policy compliance, latency, and cost separately.
- Changing the prompt, retriever, model, and training data together. You will not know which change helped.
Decision worksheet
User promise: What exact outcome must be correct?
Failure slice: Which inputs fail repeatedly?
Knowledge: Is the required information current, private, or source-specific?
Behavior: Is the desired pattern stable enough to label consistently?
Evidence: Can the system show which source supported the answer?
Release rule: What measured improvement justifies the added complexity?