AI Interviews · Question

When would you fine-tune a model, use RAG, or just improve the prompt? Walk through how you choose.

Domain deep dive question reported at OpenAI (2025). Sources, confidence and an answer card.

Researched · updated

eng-083 AI Engineer Fine-tuning vs RAG vs prompting Domain deep dive Medium confidence
On this page

What they’re really asking

If you only remember one thing, say this in the first minute: “I start from the failure, not from a technique. First I collect real bad outputs and turn them into a small test set, so every change gets a score. If the model is missing facts, I look up the right documents at request time and put them in the prompt. If it behaves wrong, I fix the instructions and examples. I only train the model when the test set shows a gap prompting can’t close, on a narrow task with enough volume to pay for the labels, the serving and the upkeep.”

The rest of this page explains each part of that answer, so you can say it with understanding.

The interviewer wants to know whether you have a decision procedure or just a favourite tool.

You already make this kind of decision in backend work. A large language model (LLM) is a program that reads text and writes text, and you can change how it behaves in three ways. Each has a backend twin:

  1. Improve the prompt. The prompt is the text sent with every request: instructions, examples and the user’s message. Changing it is like changing configuration: instant, versioned, easy to roll back.
  2. Add retrieval. Before calling the model, look up the documents that answer the question and paste them in. This is like a database read at request time: the facts live in a store you control. The interview name is retrieval-augmented generation, RAG.
  3. Fine-tune. Train the model further on your own examples, which changes its internal numbers (its weights). This is like forking a dependency: exactly the behaviour you want, but now you own a custom build that must be tested, hosted and redone when the upstream model changes.

The good answer is the one you’d give for software: configuration first, a data store when the problem is data, and a fork only when you must and can afford to maintain it.

This came up in a first-hand account of a 60-minute technical deep dive in an OpenAI forward-deployed engineer loop, next to RAG internals and guardrails. The candidate says the interviewer “pushed hard on evaluation” gaijineer.cofirst-hand.

Clarify first

Ask a few questions before choosing. Each one points at one of the three fixes.

  • “What is failing? Can I see examples?” Missing knowledge, wrong behaviour or format, or too slow and costly?
  • “How fresh are the facts, and who may see them?” Facts that change, or differ per user, point to retrieval.
  • “What volume and latency?” These decide whether a smaller fine-tuned model is even worth considering.
  • “Is there a test set?” Assume not, and say you’d build 50–200 labelled cases first.
  • “Which models are allowed?” A managed API only, or open-weight models you can host yourself?

Answer

Words you need first

  • Token. Models read and write text in pieces called tokens, roughly ¾ of a word each. Providers bill per million tokens.
  • Eval set. Real inputs, each with the right answer or a pass/fail rule. Running the model over it gives a score. It is the AI version of a test suite; running it is called “an eval”.
  • LoRA (low-rank adaptation). The usual way to fine-tune cheaply. It freezes the original model and trains a small add-on, called an adapter, tens of megabytes in size (about 27 MB for an 8-billion-parameter model).

The procedure

Say the steps in order.

  1. Build the eval first. Read 20–50 real failures, name the patterns, label cases. OpenAI’s own optimization guide says to write evals first and that prompt engineering “may be all you need” (fetched 2026-10-12).
  2. Prompt first for behaviour and format: clear instructions, the hard cases as examples, an output schema. The applied-LLMs authors put it this way: “Only if prompt engineering cannot achieve the desired level of performance should you consider finetuning” (applied-llms.org, 2024-06-08).
  3. Retrieval for knowledge: private, changing or permissioned facts. A removed document stops appearing in answers. A fact trained into the weights doesn’t, and training can’t enforce who sees what.
  4. Fine-tune a narrow, stable, high-volume behaviour that prompts measurably fail at: a strict output format, a domain-specific language, a label set where a small model must match a large one. Use LoRA on an open model unless you truly need to retrain every weight. Use preference tuning (training on “this answer is better than that one” pairs, for example DPO) only when you have such pairs and a behaviour plain examples can’t teach.
  5. Combine when both problems exist: fine-tune the format or style, retrieve the facts.

One example, start to finish

Take a fictional software company, Northwind, with two LLM features and one problem each.

FeatureThe failureWhat to doWhat to say in the interview
Support assistantIt misquotes the refund policy, which changes monthly and differs by plan.Retrieval over the current policy pages, filtered by plan. Tell it to quote the clause and escalate when none matches.”This is missing knowledge. A policy change should be a document edit, not a training run.”
Ticket classifierLabels are good, but a top-tier model sorts 50,000 tickets a day for about $9,600 a month.Run the same eval on two smaller API models first.”If a smaller model passes, a prompt change saves most of the bill.”
Ticket classifier, if both small models failA fine-tuned 8-billion-parameter open model matches the big one on the eval.Price it: labels, serving, upkeep.”The training run is $4. The GPU and the people are the cost.”

The same choices as a table you can sketch:

FailureFirst fixFine-tune when
Missing or changing factsRetrieval with citationsAlmost never
Wrong format or styleInstructions, examples, an output schemaPrompts fail on a measured share at high volume
Too expensive or slowA smaller API model, caching, batch jobsA small fine-tune passes the eval and pays back

Close with the cost

A LoRA training run is cheap: Together lists Llama 3.1 8B LoRA training at $0.34 per million training tokens (fetched 2026-10-12), so Northwind’s run costs the $4 job minimum. The labelling, the serving and the retraining when the base model changes are not cheap. Northwind’s fine-tune runs for about $6,440 a month against $9,600, so about $14,160 of one-time labelling and engineering pays back in about 4.5 months. Against a cheap model that also passes the eval, it never pays back.

Say it like this: “I compare the fine-tune against the cheapest model that passes the eval, not against the model we started with.”

The arithmetic behind the numbers (for a Staff-level follow-up)

All volumes and labour rates are assumptions; list prices were fetched 2026-10-11 (API) and 2026-10-12 (Together).

  • Today’s bill: 1,000 uncached input + 2,000 cached input + 400 output tokens per ticket on Claude Sonnet 5 ($2, $0.20 and $10 per 1M) = $0.0064 per ticket × 50,000 × 30 = $9,600 a month.
  • Training: 2,000 examples × 1,000 tokens × 3 epochs (passes over the data) = 6M tokens × $0.34 per 1M = $2.04, billed at the $4 minimum.
  • Monthly run cost: one dedicated H100 GPU (the chip that runs the model) at $5.49/hour × 730 hours ≈ $4,010, plus 15% of an engineer at an assumed loaded $194K a year ≈ $2,430. Total ≈ $6,440.
  • One-time: labelling 2,000 examples × 2 min ≈ 67 hours × an assumed $100/hour ≈ $6,700, plus two weeks of an engineer ≈ $7,460, plus $4 ≈ $14,160.
  • Payback: 14,160 ÷ (9,600 − 6,440) ≈ 4.5 months.

Senior vs Staff

Prompt, RAG or fine-tune

Senior

  • Maps each failure to a fix, names the data and the eval, and explains LoRA and RAG correctly.

Staff

  • Prices the fine-tune end to end, includes platform risk (a fine-tune dies with its base model), and says what result would reverse the choice.

In plain words: a Senior answer picks the right fix. A Staff answer also prices it, plans for the provider changing the ground under it, and says what would change their mind.

Small-team version

Default to a managed model with a versioned prompt, retrieval in the database you already run, and an eval that runs in CI. Fine-tuning is the most over-proposed fix you will hear. Say yes only when you have all four:

  • an eval gap that prompting and retrieval didn’t close;
  • a few hundred good examples, and someone who owns them;
  • a payback calculation that includes serving and upkeep, like Northwind’s above;
  • a plan for platform risk.

That last point is concrete. A fine-tune is tied to its base model. OpenAI’s deprecations page (fetched 2026-10-12) says self-serve fine-tuning job creation ends for active customers on Jan 6, 2027. A LoRA adapter on an open model you can host anywhere carries less of this risk, but then you own serving.

In money: the eval costs about $2 a run at 200 cases (an assumed 3,000 input and 400 output tokens each on Claude Sonnet 5, about 1 cent a case), the training run $4, and the serving GPU about $4,010 a month. Spend the first week on the eval and on trying cheaper models; that often ends the discussion.

Pitfalls

  • Fine-tuning to add knowledge. Facts change and need permissions; training freezes them for everyone.
  • Choosing before an eval exists. Without a score you are arguing from single examples.
  • A weak baseline. Comparing the fine-tune with a first-draft prompt instead of the best prompt and cheapest model flatters the fine-tune.
  • Pricing only the training run. It is the smallest line; labels, serving and upkeep dominate.
  • Treating it as either/or. Retrieval for facts and a fine-tune for format can work together.

Go deeper

Family