AI architecture · Playbook

Prompt, retrieve or fine-tune? A playbook for adapting a language model to your problem

Every team building with language models hits the same fork: the base model is not quite right. Do you write better prompts, give it your documents through retrieval, or train it further on your data? Each fixes a different problem, costs differently and fails differently. Choosing by fashion rather than by the problem is how projects burn months. Here is how I decide.

PlaybookSumanta Mukhopadhyay8 min read5 sources
#ai#llm#rag#architecture
PLAYBOOK · AI ARCHITECTURE · PLAYBOOK28 Nov 2026 · 21:20 GST

Start by naming the gap

"The model is not good enough" is not a diagnosis. Before choosing a technique, write down which of four gaps you actually have, because each points to a different fix.

Instruction gap
It does not know what you wantfix: prompts, examples, structured outputs
Knowledge gap
It does not know your factsfix: retrieval
Behaviour gap
It knows, but will not act consistentlyfix: fine-tuning
Capability gap
It cannot do the task at allfix: a different model or a different design
Four different gaps, four different fixes. Most failed projects treated one gap as another.

The order matters too. Prompting is the cheapest change and the fastest to test; retrieval adds a data pipeline; fine-tuning adds a training pipeline and a model to maintain. Climb only as far as the evidence requires.

Step 1: exhaust the prompt, honestly

A surprising share of "we need fine-tuning" problems are prompt problems: vague instructions, no examples, no output schema. Write a clear task description, add a handful of worked examples covering the hard cases, and constrain the output with a schema. Then measure on an evaluation set built from real inputs. If quality climbs and then plateaus, you have learned where the ceiling is, which is the evidence you need for the next step. See structured outputs and evaluation sets that predict production.

Step 2: retrieve when the gap is knowledge

Retrieval-augmented generation combines a model with a search step over your own documents, so answers draw on current, specific facts that can be cited1. It is the right tool when knowledge changes often, must be attributable, or is too large or sensitive to train into weights. It is the wrong tool for teaching style or format: retrieving more examples of a format is a weak substitute for a model that has learned it.

The hard work in retrieval is not the model; it is chunking, metadata, access control and evaluation of what gets retrieved. Most retrieval failures are search failures. See RAG to production, choosing embedding models and long context versus RAG.

Step 3: fine-tune when the gap is behaviour

Fine-tuning changes how the model behaves: following a house format every time, using domain terms correctly, making a narrow classification reliably, or using retrieved passages the way you want. Parameter-efficient methods have made it far cheaper. LoRA trains small low-rank matrices alongside frozen weights, cutting the number of trainable parameters dramatically2, and QLoRA showed fine-tuning on a quantised base model can preserve quality while fitting large models on far less hardware3.

The cost that remains is operational: a training dataset to curate and refresh, an evaluation gate for every new version, and a model whose behaviour you now own. Fine-tuning on facts is the classic mistake; facts change, and the model will state outdated ones confidently.

Combine them, and serve them efficiently

The strongest systems often combine all three: a fine-tuned model that has learned the task's format and how to use evidence, fed by retrieval for current facts, guided by a short, stable prompt. LoRA also changes the serving picture. Serving engines such as vLLM can load multiple LoRA adapters on one base model and choose the adapter per request4, and Kubernetes' Gateway API inference extension can route requests to servers that already have the right adapter loaded5.

Flowchart of an inference scheduling request: critical requests choose from pods with the required LoRA adapter loaded or standard pods, non-critical requests go to pods with capacity, then candidates are filtered by lowest queue and cache use
Adapter-aware scheduling: requests go to servers that already have the needed fine-tuned adapter loaded. Source: Kubernetes blog, Gateway API Inference Extension authors · CC BY 4.0

That makes many small task-specific variants practical: one base model, many adapters, routed per request. See LLM inference serving and Kubernetes inference gateways.

The decision, side by side

QuestionPromptRetrieveFine-tune
FixesUnclear instructionsMissing or changing factsInconsistent behaviour or format
Time to first resultHoursDays to weeksWeeks
Ongoing workPrompt versions and evalsIndex freshness, access controlDatasets, retraining, eval gates
CitationsNoYesNo
Provider portabilityHighHighLower: tied to a base model
Common mistakeStopping before adding examplesIgnoring search qualityTraining on facts
  1. NameWhich gap: instruction, knowledge, behaviour or capability?
  2. MeasureBuild an evaluation set from real inputs first
  3. PromptInstructions, examples, schema; record the ceiling
  4. Retrieve or tuneRetrieval for knowledge, fine-tuning for behaviour
  5. CombineFine-tuned behaviour plus retrieved facts where both gaps exist
  6. OperateVersion prompts, indexes and adapters; gate each change on the eval set
The playbook: measure first, climb only as far as the evidence requires.

If you cannot say what score on your evaluation set would justify fine-tuning, you are not ready to fine-tune.

The CTO's take

The adaptation choice is a product and operations decision as much as a technical one. Prompting keeps you portable across providers; retrieval makes answers current and auditable; fine-tuning buys consistency at the price of owning a model. Decide based on the gap you measured, not the technique in the news. If you are about to commit budget to fine-tuning, a week spent on an evaluation set and better prompts is the cheapest insurance you can buy.

If you want a second opinion on how to adapt models for your product, I am a fractional CTO and AI architect based in India, the United States and the UAE, working globally. You can analyse your challenge and bring the result to a call.

References
  1. 1
  2. 2
  3. 3
    QLoRA: Efficient Finetuning of Quantized LLMsarXiv (Dettmers et al.) · 2023
  4. 4
    LoRA AdaptersvLLM documentation
  5. 5
    Introducing Gateway API Inference ExtensionKubernetes blog · 5 Jun 2025
FAQ

Common questions

When should you fine-tune instead of using RAG?

Fine-tune when the problem is behaviour or form, such as a consistent output format, a domain style or a narrow classification task, and prompting with examples has plateaued. Use retrieval when the problem is knowledge that changes or must be cited.

Can you combine RAG and fine-tuning?

Yes, and it is often the best answer: fine-tune for behaviour, such as how to use retrieved passages and what format to answer in, and retrieve for facts that change.

What do LoRA adapters change operationally?

They make fine-tuned variants small and cheap to store, and modern serving engines can load several adapters on one base model, so many task-specific variants do not each need their own servers.

Keep reading

Related

Open to advisory, fractional CTO & select builds

Let's talk about what you're building.

The fastest route is a free 30-minute call. Prefer to write? Send a message and I'll reply personally within two business days.

Start a conversation

How would you like to reach me?

Book a 30-min callFastest. Pick any open slot on my calendar.→ Write in GmailOpens a pre-filled draft in your browser.→ Use my email appOutlook, Apple Mail or your default client.→

I reply personally within two business days. Time zones from the Americas and Europe to the Middle East and Asia-Pacific.