Skip to main content
AI strategy

Fine-Tuning vs RAG vs Prompting: How to Choose for Your AI Project in 2026

When to use prompting, RAG or fine-tuning for an LLM app, what OpenAI's 2026 fine-tuning wind-down changes, and a checklist to run before you train.

By Jayson Hao6 min read
Tactile paper and metal editorial artwork for Fine-Tuning vs RAG vs Prompting: How to Choose for Your AI Project in 2026
Editorial field noteITL / № 44

Key takeaways

  • Prompting, RAG and fine-tuning fix different failures: instructions, missing knowledge and learned behaviour. Diagnose the failure before choosing.
  • RAG is the default for company knowledge: a 2024 study found it consistently beat unsupervised fine-tuning at injecting both existing and new facts.
  • OpenAI is winding down self-serve fine-tuning: no new jobs for new organizations since May 7, 2026, and none for remaining customers after January 6, 2027.
  • A fine-tuned model inherits its base model's retirement date, so budget for retraining or migration before you start.

What is the difference between prompting, RAG and fine-tuning?

All three adapt a general-purpose language model to your task, but they change different things. Prompting changes the instructions and examples you send with each request. Retrieval-augmented generation (RAG) changes the context: before the model answers, your application searches your own documents or data and inserts the relevant passages into the prompt. Fine-tuning changes the model itself by training its weights on examples of the inputs and outputs you want.

Microsoft's documentation on customizing models describes the three as complementary rather than competing, and calls prompt engineering the starting point. In practice most production systems use a prompt and RAG together, and a smaller number add a fine-tuned model on top. The useful question is not which technique is best, but which failure you are trying to fix.

Match the fix to the failure

Before choosing a technique, collect 30 to 100 real requests, run them through a capable model with a plain prompt, and label why each bad answer is bad. The labels usually fall into a few groups, and each group points to a different fix.

  • The model ignores a rule, skips a step or uses the wrong format: improve the prompt with explicit instructions, a few worked examples and a defined output schema.
  • The model does not know a fact because it is private, recent or changes often (prices, policies, inventory, contracts): use RAG, so the answer is grounded in the current source and can cite it.
  • The right documents are retrieved but the answer is still wrong: fix retrieval quality and the prompt first. Fine-tuning can help a model use retrieved context, but only after retrieval itself is measured.
  • The output is correct but the tone, structure or judgement drifts across thousands of outputs, or the prompt has grown too long and slow: this is where fine-tuning earns its cost.

When prompting is enough

OpenAI's model optimization guide says the prompt engineering process may be all you need for great results, and it puts evaluation first: write evals that establish a baseline, then prompt, then iterate. Prompting needs no training data and no new infrastructure, and a change can be tested in minutes. When a better model is released, a good prompt usually carries over with small adjustments.

The old argument for fine-tuning was that long prompts with many examples are expensive. Prompt caching has weakened it. Anthropic's documentation, for example, prices cache reads at 0.1 times the base input token price, with a cache write costing 1.25 times the base price for the default five-minute lifetime. A long, stable system prompt full of examples is far cheaper to resend than it was, which moves the break-even point for fine-tuning further out.

When you need RAG

Use RAG when correct answers depend on information the model was not trained on: your policies, product catalogue, support history or anything that changed after the model's training cutoff. Microsoft's guidance lists exactly these cases and notes that RAG grounds output in real data and reduces the likelihood of fabrication. Updating the knowledge is a matter of updating the index, not retraining a model, and answers can link back to the source so a person can check them.

Fine-tuning is a poor way to teach facts. In a study by Ovadia and colleagues (revised January 2024), RAG consistently outperformed unsupervised fine-tuning on knowledge-intensive tasks, for knowledge the model had seen in training and for entirely new knowledge. The authors also found that models struggle to learn new facts through unsupervised fine-tuning unless they see many variations of the same fact. The study is older than most of our sources, but newer vendor guidance points the same way: Microsoft's current training documentation says fine-tuning does not replace retrieval for current information.

RAG has its own costs: an ingestion pipeline, a search index, access control that respects who may see which document, and evaluation of retrieval quality. Our guide to RAG evaluation covers how to measure that part.

When fine-tuning is worth it

Fine-tuning teaches behaviour, not knowledge. Microsoft's guidance names the good cases: steering output to a specific style, tone or format, and tasks where the instructions are too long or complex to fit in a prompt. Its current training overview adds reducing prompt overhead, improving tool selection and argument accuracy, using retrieved context more effectively, and specializing a smaller model so it meets the task at lower cost and latency. It also says plainly that benefits are not guaranteed and that a held-out evaluation is how you find out.

The method matters too. Supervised fine-tuning learns from prompts paired with ideal responses. Preference fine-tuning (DPO) learns from a preferred and a rejected response to the same input, which suits qualities like tone where there is no single right answer. Reinforcement fine-tuning learns from a grader that scores outputs, which suits tasks with many valid solutions that you can score reliably. Microsoft warns that training on bad data makes the base model worse, and that without a baseline you will not see the regression.

What OpenAI's fine-tuning wind-down means for your plan

On May 7, 2026, OpenAI notified developers that it is winding down its self-serve fine-tuning platform. According to its deprecations page, organizations that had never run fine-tuning lost the ability to create jobs that day. From July 2, 2026, organizations that had not run inference on a fine-tuned model in the previous 60 days lost it too. On January 6, 2027, active existing customers will no longer be able to create new fine-tuning jobs. Inference on existing fine-tuned models continues until the underlying base model is deprecated.

The broader lesson applies to every provider: a fine-tuned model is tied to a specific base model, and OpenAI's own page states that fine-tuned versions follow the same shutdown schedule as their base models. Fine-tuning is still offered elsewhere, including Microsoft Foundry for several OpenAI and open-weight models, but a fine-tune is an asset with an expiry date. A prompt and a RAG index move to a new model far more easily than trained weights do.

Data location matters for Canadian and Japanese companies as well. Microsoft's documentation explains that its Global training type copies data and weights to the region where training occurs, that its Developer tier offers no data residency guarantee, and that only a US data zone is currently supported. If training data must stay in Canada or Japan, confirm that Standard, in-region training is available for your model and region before you design around fine-tuning.

A checklist before you fine-tune

We use these questions when scoping an AI feature. If any answer is no, the project usually goes back to prompting or RAG first.

  • Is there an evaluation set with pass and fail criteria, and a measured baseline for the best prompt plus RAG?
  • Is the remaining gap about behaviour (style, format, tool use, consistency) rather than missing or changing facts?
  • Do you have a few hundred reviewed, representative examples, and permission to use them for training?
  • Is the task stable enough that the examples will still be right in six months?
  • Have you budgeted training, hosting and a retraining cycle when the base model is retired?
  • Does the provider and region meet your data residency rules, and is there an exit plan if the provider changes its offer?

About the author

Jayson Hao

Founder of Innovation Trigger Lab and a University of Toronto Computer Science graduate with an AI/ML focus. He designs and ships production RAG systems, AI chatbots, web platforms and mobile products.

View profile

Frequently asked questions

Is RAG better than fine-tuning?

For adding knowledge, usually yes: research and vendor guidance both favour RAG for private, recent or changing information. For consistent style, format or task behaviour, fine-tuning can do things retrieval cannot, and the two can be combined.

Can I still fine-tune OpenAI models?

Only if your organization is an active existing fine-tuning customer, and only until January 6, 2027, according to OpenAI's deprecations page. Existing fine-tuned models keep working until their base model is deprecated. Microsoft Foundry still offers fine-tuning for several OpenAI models.

How much data do I need to fine-tune a model?

There is no universal number. Microsoft's illustrative example uses hundreds of requests paired with correct responses. Quality and coverage of real cases matter more than volume, and you also need a separate evaluation set the model never trains on.

Can I combine RAG and fine-tuning?

Yes. A common pattern is RAG for facts and a fine-tuned model for format or tone. Microsoft's training documentation also lists teaching a model to use retrieved context more effectively as a fine-tuning goal.

Sources and further reading

  1. 1.
  2. 2.
  3. 3.
  4. 4.
    Training in Microsoft FoundryMicrosoft Learn, November 13, 2026
  5. 5.
  6. 6.