When an LLM application disappoints, teams often jump directly to a technique: add retrieval, fine-tune a model, or keep expanding the prompt. Those are not interchangeable upgrades. Each changes a different part of the system, introduces a different failure surface, and demands different evidence before it is justified.
Prompting changes the instructions and examples supplied for a request. Retrieval changes the evidence available at inference time. Fine-tuning changes model parameters so a behavior is more likely across requests. None guarantees truth, and none repairs an unspecified task. The first engineering job is therefore diagnosis: determine whether failures come from missing knowledge, unclear behavior, inadequate base capability, bad context selection, or a downstream contract.
The useful decision is rarely a permanent vote for one technique. It is a staged adaptation plan with a baseline, measurable hypothesis, ownership model, and exit criteria. This article builds that plan and uses a support-triage example to show why different slices of one product can warrant different adaptations.
Diagnose the Gap Before Choosing a Technique
Collect representative failures and label the mechanism, not merely the visible symptom. “Wrong answer” is too broad. Ask what information and capability a successful run required, whether that information was available, and what the model did with it.
A practical taxonomy includes:
| Failure mechanism | Diagnostic question | Likely first intervention |
|---|---|---|
| Ambiguous task | Would two competent reviewers interpret the instruction differently? | Clarify contract and prompt |
| Missing request-specific facts | Did the model lack current or private evidence needed for this case? | Retrieval or explicit context |
| Stable behavior mismatch | Does the model repeatedly use the wrong format, tone, classification boundary, or procedure despite clear examples? | Prompting, then consider fine-tuning |
| Base capability limit | Does it fail even with complete evidence and a clear demonstration? | Stronger model, task decomposition, or specialized component |
| Context-use failure | Was the right evidence present but ignored, confused, or contradicted? | Context redesign, reranking, shorter evidence, or model change |
| Output-contract failure | Is the semantic answer usable but malformed or unsafe for downstream code? | Schema-constrained generation and validation |
Run counterfactual probes. Give the model a minimal, unambiguous instruction and manually place the exact necessary evidence next to the question. If quality becomes acceptable, the base model likely has the capability; the production problem lies in instruction or evidence delivery. If it still fails, adding a retrieval system will merely deliver evidence the model cannot use.
Separate knowledge from policy. A current refund window is changing factual evidence and should remain in an owned source of truth. The rule that a refund above a threshold requires escalation is executable business policy and should usually be deterministic code. Training either into model weights makes updates opaque and enforcement probabilistic.
Build slices before selecting a remedy: common versus rare intents, stable versus fast-changing facts, short versus long inputs, languages, risk tiers, and cases requiring citations. A technique can improve the global average while damaging one slice. The decision should name which slices it targets and which it intentionally leaves to another path.
Start with Prompting as the Cheapest Falsifiable Baseline
Prompting is the fastest way to test whether explicit instructions, a response schema, and a small number of demonstrations are sufficient. It has no training pipeline and can be changed or rolled back as application configuration. That makes it the default diagnostic baseline, not necessarily the final architecture.
A strong prompt defines the task, input boundaries, allowed evidence, output contract, abstention behavior, and a few examples chosen to clarify decision boundaries. Keep facts that change per request outside static instructions. Use structured output rather than teaching a prose format through dozens of examples. Place deterministic rules in code and expose their results as inputs.
Prompting is a good fit when:
- The base model already performs the task with clear examples.
- Instructions and a modest context fit within latency and token budgets.
- Behavior changes frequently and needs rapid iteration.
- Training examples are scarce or cannot be approved for parameter updates.
- The application can validate the output contract independently.
Its weaknesses appear as the prompt grows. Long demonstrations consume input tokens on every request, increase prefill latency, and can conflict with retrieved evidence. Prompt wording can be brittle across model revisions. Examples may cover familiar cases without teaching a stable boundary. A prompt is also visible context, so it cannot protect secrets or enforce authorization.
Use prompt experiments to generate evidence. Compare a concise zero-shot contract, a few-shot version, and a decomposed workflow on the same evaluation cases. If a small prompt closes the gap, stop. Adaptation complexity is not a quality metric. If performance plateaus, inspect whether errors are knowledge-related or behavioral before adding another layer.
Choose Retrieval When Answers Depend on External Evidence
Retrieval-augmented generation is appropriate when the answer depends on information that is current, private, too large to place in every request, or must be attributed to an inspectable source. Retrieval keeps knowledge outside model weights so owners can update, revoke, authorize, and audit it independently.
This is a decision criterion, not a claim that retrieval automatically grounds an answer. The system must still select relevant evidence, respect access controls, preserve source identity, and verify that generated claims are supported. Those mechanics form their own engineering discipline; the adaptation decision begins with whether external evidence is intrinsically part of the task.
Prefer retrieval when:
- Facts change faster than a training and deployment cycle.
- Different users or tenants are allowed to see different material.
- The answer needs source references or an evidence trail.
- The corpus is large but only a small subset is relevant per request.
- Deletion or correction must take effect without retraining a model.
Retrieval is a poor remedy for a behavior the model already exhibits despite receiving the correct passage. It also does not solve calculations, authorization, workflow state, or deterministic policy. If a model consistently labels urgency incorrectly from a clearly supplied rubric, adding more policy documents can worsen distraction. Clarify the rubric, use a classifier or fine-tune behavior, and enforce high-impact thresholds in code.
Account for retrieval’s lifecycle. Corpus ingestion, permissions, freshness, indexing lag, empty results, conflicting documents, and source retirement become production concerns. Every request pays retrieval latency and context tokens unless caching applies. When no trustworthy evidence is found, the correct output may be abstention or escalation rather than an ungrounded model answer.
Choose Fine-Tuning for Repeated, Stable Behavior Change
Fine-tuning is useful when many representative input-output examples define a stable behavior that prompting cannot deliver reliably or economically. It can shape classification boundaries, consistent transformation, domain-specific style, tool-selection patterns, or compact structured responses. It can also reduce a large demonstration prompt when the learned behavior generalizes.
Fine-tuning is not a dependable database. Facts encoded in weights are difficult to update selectively, cite, delete, or permission by user. A model can memorize training details without recalling them reliably, and a later fine-tune can alter unrelated behavior. Use retrieval or deterministic systems for authoritative changing knowledge.
Evidence for fine-tuning should include:
- A prompt baseline that has reached a documented plateau.
- Enough approved, diverse examples to represent important slices.
- Stable labels and reviewer agreement on the desired behavior.
- A holdout set protected from prompt and training iteration.
- A deployment case that justifies training, hosting, and maintenance cost.
- A plan for regressions in general capability, safety, and calibration.
Dataset quality dominates dataset volume. Remove contradictory labels and near-duplicate templates that create false confidence. Preserve difficult cases instead of filtering them until the task looks clean. Balance or weight examples according to the desired product behavior, not only observed traffic; rare high-risk cases may need deliberate representation.
Fine-tuning also creates a versioned artifact and a new supply chain. Track base model, training recipe, dataset snapshot, code, hyperparameters, and evaluation results. Decide whether provider-hosted tuning, adapters, or self-hosting meets privacy and serving requirements. Plan how to retire examples after policy changes and how to determine whether a new base model makes the fine-tune unnecessary.
Compare the Strategies on Whole-System Constraints
Quality is necessary but not sufficient. Compare techniques across the request path and maintenance lifecycle.
| Criterion | Prompting | Retrieval | Fine-tuning |
|---|---|---|---|
| Changes | Per-request instruction and examples | Per-request evidence | Learned response behavior |
| Fresh facts | Manual prompt update; poor at scale | Strong when sources are maintained | Weak; requires new data and training |
| Source attribution | Only for supplied context | Natural when source IDs survive | Not inherent |
| Tenant authorization | Limited to context construction | Can filter evidence before generation | Weights cannot provide row-level access |
| Initial iteration | Fast | Moderate system work | Slowest setup |
| Per-request overhead | Prompt tokens | Search plus evidence tokens | Potentially shorter prompt; model-dependent serving |
| Ongoing ownership | Prompt and eval versions | Corpus, index, retrieval, and evals | Dataset, training, model registry, serving, and evals |
| Rollback unit | Prompt configuration | Retriever/corpus configuration | Model artifact and serving route |
Estimate cost per successful task, not cost per model call. Let be inference cost, retrieval cost, expected human-review cost, and the probability that the system completes the task acceptably. A simple comparison is
The equation is intentionally incomplete but useful: a cheaper call that causes retries or escalations may cost more per completed task. Add training and maintenance amortization for fine-tuning, plus indexing operations for retrieval. Keep latency distributions and capacity limits alongside monetary cost; an average can conceal a slow retrieval tail.
Data governance can decide the strategy before quality does. Confidential examples may be permitted in a request but not in a provider’s training process. A right-to-delete requirement is easier to honor in an external corpus than in weights. Conversely, sending a large sensitive document on every request may be less acceptable than a narrowly approved specialized model. Involve data owners rather than treating governance as a late infrastructure check.
Work Through a Support-Triage Decision
Suppose a software company wants a system that receives support messages and produces three outputs: an issue category, an urgency recommendation, and a draft response based on the customer’s product version and support plan.
The team first builds a prompt baseline with a schema and examples. On a versioned evaluation set, category assignment is mostly acceptable, but two distinct failure clusters remain:
- Draft responses cite obsolete setup steps because the product documentation changes every release.
- Urgency labels are inconsistent for terse messages whose impact is implied rather than stated.
The first cluster is a knowledge-freshness problem. Current documentation, release notes, and plan entitlements are external evidence with access and version constraints. Retrieval is justified for the draft-response stage. The system must filter by product version and customer permissions, return source IDs, and abstain when documentation conflicts. Fine-tuning on today’s manuals would make tomorrow’s correction expensive and untraceable.
The second cluster is behavioral. Reviewers have a stable urgency rubric and a substantial history of adjudicated messages, but even a concise prompt with boundary examples remains inconsistent. The team trains a small classification adaptation for urgency only. It does not ask that model to draft answers or memorize documentation. High-severity recommendations still pass deterministic policy checks and, where required, human review.
Common category assignment stays prompt-only because it meets its release criteria. The final product is therefore a composition:
This decomposition localizes ownership. Documentation teams own source freshness. Support operations own urgency labels and review policy. Application engineers own schemas and orchestration. Each component can be evaluated and rolled back independently.
The tradeoffs remain visible. Retrieval adds latency and can return irrelevant or stale passages. Fine-tuning adds a training lifecycle and may drift when support language changes. Prompt-only categorization may regress after a base-model update. The architecture does not eliminate those risks; it assigns each risk to the component best able to measure and control it.
Evaluate Incrementally and Demand Causal Evidence
Use an ablation ladder rather than comparing unrelated end states. Establish a base prompt, then add one change at a time: clearer schema, demonstrations, manually supplied ideal evidence, production retrieval, or a fine-tuned model. Keep cases and decoding policy fixed. This identifies which mechanism produced the improvement.
For retrieval candidates, report answer quality conditional on evidence quality as well as end-to-end quality. If answers are correct when ideal evidence is supplied but poor with production retrieval, tuning the generator attacks the wrong component. Measure empty retrieval, relevant-source recall, unsupported claims, freshness, authorization, latency, and abstention.
For fine-tuning, compare against the strongest practical prompt on an untouched holdout. Segment by labels, input style, language, and risk. Test general capabilities that must not regress, plus calibration and behavior on inputs unlike training examples. Run memorization and privacy checks appropriate to the data. A fine-tune that wins only on near-duplicates is not adaptation; it is an expensive lookup with uncertain behavior.
For every strategy, include malformed inputs, conflicting evidence, prompt injection within data, no-answer cases, and changes to downstream schemas. Evaluate complete task success, latency, token use, review effort, and failure severity. Use canaries or shadow traffic after offline gates because user behavior and live distributions can invalidate a laboratory win.
Set explicit stop rules. Adopt prompting if it meets quality and cost criteria. Add retrieval only if evidence delivery closes a measured knowledge gap. Fine-tune only if stable behavior remains deficient and the gain survives holdout evaluation. Reject an adaptation when its improvement is smaller than uncertainty or its operational burden outweighs the task value.
Operate Hybrids Without Losing Accountability
Hybrid designs are common because applications contain multiple failure mechanisms. They become dangerous when layers accumulate without a theory: a long prompt, retrieval, a fine-tune, retries, and a judge can mask which component is responsible. Record prompt, corpus snapshot, retriever, model, adapter, schema, and policy as one traceable configuration, while retaining metrics for each stage.
Assign update triggers. A documentation change rebuilds or invalidates retrieval artifacts. A label-policy change creates a new fine-tuning dataset and may invalidate previous approvals. A base-model change reruns prompt, context-use, and safety evaluations. Monitor source freshness, retrieval misses, slice quality, model drift, latency, and cost per successful task.
Design fallbacks by failure type. Retrieval timeout may permit a clearly labeled response without proprietary facts, or it may require escalation. A fine-tuned classifier outage can route to the prompt baseline if that baseline meets a minimum standard. Schema or policy failures should fail closed, not cascade through increasingly unconstrained generations.
The main failure mode is using model adaptation to hide a product or data problem. No technique resolves conflicting policies, undefined labels, inaccessible source ownership, or an impossible latency budget. Repair those contracts first. Then choose the smallest adaptation whose causal mechanism matches the remaining gap.
Prompting, retrieval, and fine-tuning are best understood as separate control knobs. Prompting communicates the task now. Retrieval supplies evidence now. Fine-tuning changes recurring behavior for future requests. Diagnose which dimension is missing, test the simplest intervention, and compose techniques only where distinct slices justify them. That discipline produces a system whose quality gains can be explained, evaluated, and maintained instead of an adaptation stack that merely feels sophisticated.