Fine-tuning vs RAG depends on why your answers fail. If the model lacks facts, or the facts change, use retrieval-augmented generation (RAG). If the instructions are vague, improve the prompt. Fine-tune only when the model keeps getting one behaviour wrong despite clear instructions and the right facts. Make the smallest change that fixes the measured failure, then re-test.
The three approaches change different things. A prompt changes what you ask, RAG changes what the model can see at answer time, and fine-tuning changes the model's weights.
| Criterion | Prompt engineering | RAG | Fine-tuning |
|---|---|---|---|
| What changes | The instructions and examples you send | The evidence added to each request | The model's weights |
| Fixes | Wrong format, language, tone or scope | Missing, outdated or company-specific facts | A consistent behaviour that clear prompts cannot hold |
| Does not fix | Facts the model never had | A task the model cannot do with good evidence | Facts that change, or access rules per user |
| Keeping knowledge current | Edit the prompt | Update the documents and re-index | Retrain and re-evaluate |
| Permissions per user | Only what you choose to include | Filter results by the user's access | Not possible inside the weights |
| Effort to try | Low, and easy to roll back | An index, a retriever and an evaluation set | Curated examples, a held-out test set and a retraining plan |
You find out by labelling real failures. Collect wrong outputs from testing or a small pilot, then ask three questions about each one, in this order:
- Instruction: did the prompt say what was wanted, including format, language, audience and what to do when unsure?
- Knowledge: did the model have the information the answer needed, in its context or reliably from training?
- Behaviour: with clear instructions and the right information, does the model still miss in the same way, again and again?
Instruction and knowledge fixes are usually cheaper to test, so rule them out first. Count the labels: the biggest category tells you where to start. If you have no test set yet, start by building a hallucination test set from real questions, with the expected answer and its source beside each one.
Ask the three questions in this order for every labelled failure. Instruction and knowledge fixes are usually cheaper to test, so rule them out before you suspect a stable behaviour.
Prompt engineering is enough when the failures come from instructions the model never received. Typical signs: the output changes shape between runs, the answer arrives in the wrong language, summaries vary wildly in length, or the model invents a format nobody specified. Conflicting constraints or the model's own limits can produce the same symptoms, so test the fix rather than assume it.
State the task, the audience and the purpose. Define the output structure, as a schema your code can validate wherever possible. Give two or three examples of accepted outputs, including an Arabic one if your users write in Arabic. Say what the model should do when the information is insufficient, such as asking a question or declining.
OpenAI's model optimisation guide makes the same point: prompt engineering "may be all you need", and the work should start with evals that record a baseline. Version prompts like code and re-run the test set on every change. Prompt edits are cheap to test and easy to roll back.
RAG beats a longer prompt when the knowledge is too large, changes too often or must respect who may see what. Typical signs of a knowledge failure are outdated prices, invented policy details and confident answers that would be right for a different company. No instruction creates facts the model lacks.
If the knowledge is a few stable pages, put the parts the user may see straight into the prompt. Beyond that, use retrieval: search approved sources at question time, filter results by the user's permissions and cite the passages the answer used. The original RAG paper (Lewis et al., 2020) describes this as pairing the model's built-in, parametric memory with an external index it can read at answer time, and names provenance and updating knowledge as problems for models that rely on weights alone. For the full design, read how enterprise RAG works.
Questions about numbers in a database, such as last quarter's sales by region, need a different tool. Give the model an authorised, read-only query with row and tenant permissions enforced, and calculate totals in code. Text retrieval alone is a poor fit for aggregation.
Each approach changes a different thing. A prompt changes what you ask, RAG changes what the model can see at answer time, and fine-tuning changes the model's weights.
Your RAG answers are wrong. Check retrieval first
If you already run RAG and answers are still wrong, look at the passages that reached the model before you change anything else. When the right passage is missing, the fault is in retrieval: chunks that split a clause from its conditions, missing metadata, weak search settings for Arabic text, or permission filters stricter than the policy intends. Query rewriting, retriever tuning or reranking can help. Do not loosen a valid permission to improve recall.
When the right passage arrived and the answer still drifted, go back to the instruction and behaviour questions. Fine-tuning the answer model does not repair a passage that retrieval never found.
Fine-tune an LLM when a stable behaviour still fails after clear instructions, good examples and the right facts. Fine-tuning adjusts the model's weights from examples of the outputs you want. Good candidates are a business-specific classification scheme the model keeps confusing, a house style it cannot hold across thousands of outputs, or a compact output format at high volume, where long prompts full of examples add cost and latency to every request.
As of October 2026, OpenAI's guide lists supervised fine-tuning for tasks such as classification and specific output formats, preference fine-tuning (DPO) for tone and style, and reinforcement fine-tuning for complex domain tasks graded by experts. The same guide names the trade: shorter prompts and smaller task-specific models in exchange for training work.
Before you fine-tune, try two cheaper alternatives:
- A more capable base model. It may already handle the task, even if each call costs more.
- Smaller steps. Split the task into stages, each with its own prompt and check. This fixes many judgement errors a single prompt cannot.
If you still need fine-tuning, plan for what it requires:
- A curated set of training examples you are permitted to use, with an owner and a privacy review
- A held-out test set the training never sees
- A baseline score from the best prompt-only and RAG versions
- A retraining plan for when the base model or your requirements change
- A full re-evaluation, including regressions, before each version goes live
Where you can fine-tune is changing, so check the provider before you plan a project. As of October 2026:
- OpenAI is winding down its self-serve fine-tuning platform. Since 7 May 2026, organisations that had never run fine-tuning cannot create jobs. From 2 July 2026, organisations with no fine-tuned-model inference in the previous 60 days lost job creation too, and on 6 January 2027 active customers lose it. Existing fine-tuned models keep serving until their base model is deprecated.
- Google Vertex AI documents supervised fine-tuning for Gemini 3.5 Flash, Gemini 3.5 Flash-Lite, Gemini 3.1 Flash-Lite, Gemini 2.5 Pro, Gemini 2.5 Flash and Gemini 2.5 Flash-Lite.
- Amazon Bedrock lists fine-tunable Amazon Nova, Titan, Claude 3 Haiku and Meta Llama models, in the US East (N. Virginia) or US West (Oregon) Region depending on the model.
- Open-weight models can be fine-tuned on infrastructure you control, which also puts the training data, hosting and updates under your control. Our guide to open-weight or hosted Arabic models covers that trade-off for Arabic.
Where the training data and the tuned model live matters for personal data. Check the Region against your data-handling requirements before you upload examples.
Yes, if each addition earns its place. Retrieval for knowledge plus careful instructions for format is the most common pairing. Fine-tuning for a stable behaviour plus retrieval for changing facts is legitimate too. Trouble starts when your team ships several changes at once without a baseline: you cannot tell which one helped, or remove one with confidence.
Anthropic's engineering guidance on building agents recommends "finding the simplest solution possible, and only increasing complexity when needed", and notes that agentic systems often trade latency and cost for better task performance. The post dates from December 2024 and Anthropic marks its tooling details as changed since; the principle still holds. We apply it here: add one change at a time, measure it on the same test set and keep it only if the targeted failures fall while quality, security and cost checks still pass. If you are still deciding which workflows deserve this effort, start with how to choose internal copilot use cases.
How should you re-test after each change?
Treat every prompt, retrieval or model change as a release. Re-run the full test set by slice (language, document type, question type), compare it with the previous version and record what changed and why.
NIST's Generative AI Profile (NIST AI 600-1), published on 26 July 2024 as a companion to the AI Risk Management Framework, is voluntary guidance that can structure this documentation and risk review. As of October 2026, NIST's publication page lists no newer revision. The profile does not certify a system or guarantee accurate output.
Label your failures before you pick a technique. Fix instructions with a better prompt, missing or changing knowledge with retrieval, and a stubborn, stable behaviour with fine-tuning only after cheaper options fail on the same test set. These are TecnoStack's practical recommendations; neither OpenAI, Anthropic nor NIST requires them.
If knowledge failures top your list, our RAG and knowledge search service can start with a readiness review of your documents, their access rules and a question set to test against.
- Lewis, P. et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. arXiv:2005.11401.
- OpenAI. Model optimization guide: evals first, prompt engineering, and supervised, DPO and reinforcement fine-tuning. Accessed October 2026.
- OpenAI. Deprecations: fine-tuning platform availability dates. Accessed October 2026.
- Google Cloud. Tune Gemini models by using supervised fine-tuning: supported models. Accessed October 2026.
- Amazon Web Services. Customize a model with fine-tuning in Amazon Bedrock: supported models and Regions. Accessed October 2026.
- Anthropic. Building effective agents, December 2024.
- National Institute of Standards and Technology. Generative Artificial Intelligence Profile (NIST AI 600-1), 26 July 2024.






