Open models Guide 17 of 25

Fine-tuning, RAG, or prompting: choosing the right lever

Teams often reach for fine-tuning first and regret it. Prompting fixes instructions, retrieval fixes knowledge, and tuning fixes behavior and cost — and the order you try them in matters.

  • 9 min read
  • Updated 
  • 8 sources

Key takeaways

  • Prompting, retrieval, and fine-tuning fix different failures: unclear instructions, missing knowledge, and inconsistent behavior or high per-call cost.
  • Do not fine-tune to teach facts. Studies show retrieval beats tuning for knowledge, and training on new facts can make a model hallucinate more.
  • Fine-tuning earns its keep on narrow, stable, high-volume tasks, where a small tuned model can replace a long prompt on a large one.
  • As of October 2026, OpenAI is winding down self-serve fine-tuning. Teams that still need to tune should favor portable LoRA adapters on open-weight models.
  • Build the eval set first. It decides which lever worked, and together with your training data it is the asset that survives a model change.
On this page 7 sections

Every project built on a large language model (LLM) reaches the same moment. The demo worked, the pilot is close, and the model still gets too many cases wrong. One engineer wants better prompts, another wants to connect the model to company data, and a third wants to train a custom model.

The debate is usually framed as a choice between three competing techniques, and that framing is wrong. Prompting, retrieval-augmented generation (RAG), and fine-tuning change different things, so they fix different failures. Pick the wrong lever and you spend weeks training a model to memorize a price list that changes next month. Or you keep piling rules into a prompt that a small tuned model could have absorbed once.

The answer also shifted in 2026. OpenAI began winding down its self-serve fine-tuning platform in May, while tuning open-weight models with small adapters has become cheap and well understood. This guide explains what each lever does, what the evidence says, and the order in which to try them.

What does each lever actually change?

A model produces its answer from two inputs: its weights, fixed during training, and the context you send with each request. Every customization technique edits one of those two.

  • Prompting changes the instructions and examples in the context. It tells the model what the task is, what good output looks like, and which rules apply.
  • RAG also changes the context, but automatically and per request. A retrieval step finds documents relevant to this question and inserts them, so the model answers from current, specific material instead of memory.
  • Fine-tuning changes the weights. You train the model further on examples of the behavior you want, so it does the task well with less instruction.

That split gives you a diagnostic. If the model lacks the information, you have a knowledge problem, and knowledge belongs in context. If it has the information but uses it badly or inconsistently, you have a behavior problem, which prompts or tuning can fix. If the output is right but each call is too slow or expensive, you have an efficiency problem, and a smaller tuned model is often the answer.

AspectPromptingRAGFine-tuning
What changesInstructions and examples, per callDocuments inserted, per callModel weights
Best forDefining the task, output format, fast iterationPrivate, fresh, or large knowledge; citationsConsistent behavior, narrow tasks, shorter prompts
Weak atVery long rule sets; cost grows with prompt lengthQuestions the retriever cannot find answers forAdding or updating facts
Typical time to a first resultHoursDays to weeksWeeks, mostly data preparation
How you update itEdit textRe-index documentsRetrain and re-evaluate
Hidden costTokens on every callThe retrieval pipeline and its qualityTraining data, evals, and serving

Why is fine-tuning the wrong way to teach a model facts?

The most common mistake is tuning a model on internal documents so it “knows the business,” and the research against it is unusually consistent. A 2023 Microsoft study compared RAG with unsupervised fine-tuning, meaning continued training on raw document text, as ways to inject knowledge. Retrieval won consistently, both for knowledge the model had met in pretraining and for entirely new facts. Models struggled to absorb new facts through training, though showing them many paraphrased versions of each fact partly helped.

A 2024 study from Google Research and the Technion went further. In controlled closed-book question-answering experiments, training examples carrying facts new to the model were fitted far more slowly than examples consistent with what it already knew. As the model eventually fit them, its tendency to hallucinate rose roughly linearly. The authors read this as support for the view that most of a model’s knowledge comes from pretraining, while fine-tuning mainly shapes how it uses that knowledge.

The operational case points the same way. Facts change, and retraining whenever a policy or price moves is slow and fragile. Retrieval lets you update an index in minutes, cite the source document, and filter results by the user’s permissions — none of which weights can do.

When is prompting enough?

More often than teams expect. Start with a clear task description, a few worked examples, and an enforced output format, then measure. OpenAI’s model optimization guide sets out the same order: write evals for a baseline, prompt with good context and instructions, and treat fine-tuning as an optional later step in a repeating measurement loop. OpenAI has since begun moving the guide into its legacy docs.

Long context windows have widened what prompting alone can cover. In its September 2024 write-up on contextual retrieval, Anthropic suggested that a knowledge base under about 200,000 tokens, roughly 500 pages, could go straight into the prompt rather than behind a retriever. It paired that with prompt caching, which it said cut latency by more than half and cost by up to 90% for repeated context. Windows are larger in 2026, but caching cuts cost and latency, not difficulty: a model can still overlook a detail buried deep in a long prompt, so test answer quality at full length.

Prompting runs out of road in predictable ways:

  • Prompts grow into thousands of tokens of rules and edge cases, and every call pays for them.
  • Behavior on rare cases stays inconsistent, however the instructions are worded.
  • A small, cheap model may not follow a long, intricate prompt at all.

Those are the signals to look further. A wrong answer about a fact the model was never given is not one of them; that is a retrieval problem.

When does fine-tuning earn its keep?

Fine-tuning suits behavior that is narrow, stable, and high-volume: classification, extraction into a fixed schema, a house writing style, or a domain judgment the model should make the same way every time. OpenAI’s guide still offers a useful map of the main methods, which are general techniques rather than features of one vendor.

Supervised fine-tuning (SFT) learns from example answers and suits classification and fixed formats. Direct preference optimization (DPO) learns from pairs of better and worse answers, with no separate reward model, and suits tone and summary focus. Reinforcement fine-tuning (RFT) uses a grader’s scores as the reward and targets hard domain reasoning on reasoning models.

The economic argument is often stronger than the quality one. A tuned model needs fewer instructions and examples per prompt, which cuts token cost and latency. A small tuned model can also match a far larger general one on a single task. LinkedIn’s December 2024 write-up on its EON (Economic Opportunity Network) models shows the payoff at scale.

LinkedIn adapted Llama 3.1 8B with instruction tuning and then preference and safety alignment, using about 200 million tokens of curated training data. In LinkedIn’s testing, the resulting EON-8B beat GPT-4o mini by 4 percentage points at matching candidates to job requirements in its Hiring Assistant, without training on that task. Counting the graphics processing units (GPUs) needed to serve the same load, LinkedIn put it at 75 times more cost-effective than GPT-4 and six times more than GPT-4o.

Read that example carefully, though. LinkedIn built EON as a shared foundation for many products, with a large curated dataset behind it. A single feature with modest traffic rarely clears that bar.

How low-rank adaptation (LoRA) made tuning cheap

Much of today’s tuning leaves the original weights untouched. LoRA, introduced by Microsoft researchers in 2021, freezes them and, for each weight matrix it adapts, trains two thin matrices whose product is added to the frozen one. On GPT-3 175B, the paper reported about 10,000 times fewer trainable parameters and roughly a third of the GPU memory needed for full fine-tuning. Quality matched or beat full fine-tuning on the models tested, and a merged adapter added no inference latency.

The practical consequence is that an adapter is a small file, not a new model. In the paper, a GPT-3 adapter checkpoint took about 35 MB, against 350 GB for the full model. You can keep many adapters for one base model — one per task or customer. A September 2025 study by John Schulman and colleagues at Thinking Machines Lab notes that inference engines such as vLLM can batch requests across many adapters at once.

The same study mapped when the LoRA shortcut costs little or nothing. The original paper adapted only attention weights, but LoRA matched full fine-tuning when applied to every layer, especially the feed-forward multilayer perceptron (MLP) layers. It also needed the dataset to stay within what the adapter could hold, and in some settings it tolerated large batches less well. Its best learning rate was about ten times higher than for full tuning, and for reinforcement learning even rank-1 adapters kept pace.

How did the picture change in 2026?

For teams building on OpenAI’s models, the obvious route to a custom model has long been OpenAI’s own fine-tuning service. That route is closing.

OpenAI’s deprecations page records that from 7 May 2026, organizations that had never run fine-tuning could no longer start training jobs. From 2 July 2026, the cutoff extended to organizations that had not used a fine-tuned model for inference during the prior 60 days. On 6 January 2027, remaining active customers lose the ability to create new jobs.

Models already tuned keep serving until their base models are retired. That is the hidden risk in any hosted fine-tune: it is bound to one base model snapshot, and when the snapshot goes, the tune goes with it. The same page lists tunes built on GPT-3.5 Turbo, GPT-4, and GPT-4.1 nano for shutdown on 23 October 2026.

The weights were never the durable asset. Your training data and eval set are, because they let you rebuild the tune on whatever model comes next.

For teams that still need a tuned model, the portable route is LoRA adapters on open-weight models such as Llama, Qwen, or Gemma, trained with open tooling. You get control and portability. Unless you pay a provider to host the result, you also take on serving: batching, caching, capacity planning, and model upgrades become your team’s job.

A decision order that works

  1. Build the eval set first. Collect a few hundred real inputs with known-good outputs or grading rules, including the hard cases. Without it, no lever can be judged.
  2. Exhaust the prompt. Clear instructions, a handful of examples, structured output. Many teams can stop here.
  3. Read the failures. Sort each miss into knowledge (did not know), behavior (knew, did it wrong), or efficiency (right, but too slow or costly).
  4. Fix knowledge with context. If it fits, put it in the prompt and cache it. If not, build retrieval and evaluate the retriever separately from the generator.
  5. Fix behavior and cost with tuning. Once prompts are stable and you have hundreds of good examples, train an adapter, often on a smaller model. Compare it against the prompted baseline on the same evals.
  6. Combine, then retest on every model release. Mature systems often use all three: a tuned model for behavior, retrieval for facts, a short prompt for the task. A stronger base model can make a tune unnecessary.

What this means for your team

  • Ask three questions before choosing. Does the model lack information? Does it misbehave with the right information? Is it right but too slow or expensive? The answer picks the lever.
  • Never fine-tune to keep facts current. Anything that changes, needs a citation, or depends on who is asking belongs in retrieval.
  • Tune only with the prerequisites in place. You need a stable task, an eval set, hundreds of high-quality examples, an owner for retraining, and a serving plan. Missing any one usually means the tune quietly decays.
  • Do the cost math at your real volume. Tuning pays when traffic is high, prompts are long, and the task rarely changes. At low volume, a longer prompt on a hosted model usually costs less than the engineering.
  • Keep your data portable. Store training examples and evals in your own repository, versioned like code, so a vendor deprecation becomes a migration rather than a rewrite.
  • Screen training data for new facts. Examples that teach the model things it never knew invite confident errors. Keep facts in retrieval and behavior in training data.

The lever matters less than the measurement behind it. Teams that can show, on their own eval set, which change moved which number make this decision quickly — and revisit it calmly when the next model ships. At SurgeX Labs, no fine-tune is recommended until a prompt-and-retrieval baseline has been measured against it on the same eval set.

Sources

  1. Model optimization (opens in new tab) — OpenAI (API docs), 2026 developers.openai.com

  2. Deprecations: Update to OpenAI’s self-serve fine-tuning (opens in new tab) — OpenAI (API docs), 2026 developers.openai.com

  3. Fine-Tuning or Retrieval? Comparing Knowledge Injection in LLMs (opens in new tab) — Microsoft (arXiv), 2023 arxiv.org

  4. Does Fine-Tuning LLMs on New Knowledge Encourage Hallucinations? (opens in new tab) — Google Research and Technion (arXiv, EMNLP 2024), 2024 arxiv.org

  5. Introducing Contextual Retrieval (opens in new tab) — Anthropic, 2024 anthropic.com

  6. How we built domain-adapted foundation GenAI models to power our platform (opens in new tab) — LinkedIn Engineering, 2024 linkedin.com

  7. LoRA: Low-Rank Adaptation of Large Language Models (opens in new tab) — Microsoft (arXiv), 2021 arxiv.org

  8. LoRA Without Regret (opens in new tab) — Thinking Machines Lab, 2025 thinkingmachines.ai

Where this shows up in our work

Building this? Talk to an engineer.

If this guide maps to a system you’re planning, send a short brief. A senior engineer replies within one business day.