Skip to main content
    Back to Blog
    6 min read

    RAG vs Fine-Tuning: A Decision Guide for Enterprise LLMs

    When to use RAG, fine-tuning, prompting or a mix, with a decision table and a check of what OpenAI, AWS, Google, Microsoft and open-source options offer today.

    AI EngineeringRAGfine-tuningLLMprompt engineeringenterprise AIvector databaseAI governanceMicrosoft FoundryAmazon Bedrock
    LinkedIn X

    Key takeaways

    • Use retrieval-augmented generation (RAG) when the model needs facts that change, belong to you, or must be cited.
    • Use fine-tuning when you need a steady style, format or narrow skill that prompts cannot deliver.
    • Start with prompt engineering, add RAG for knowledge, and fine-tune last, only if tests show a gap.

    Short answer: Use retrieval-augmented generation (RAG) when the model needs facts that change, belong to you, or must be cited. Use fine-tuning when you need a steady style, format or narrow skill that prompts cannot deliver. Start with prompt engineering, add RAG for knowledge, and fine-tune last, only if tests show a gap.

    As of 26 October 2026, vendor details below were checked against the official pages listed in Sources. Product names and model lists change often, so confirm them before you commit.

    Three tools, three different jobs

    The three options solve different problems, so comparing them as rivals causes confusion.

    • Prompt engineering changes the instructions and examples you send with each request. It costs the least and you can change it in minutes.
    • RAG looks up relevant passages from your own content at question time and hands them to the model. The model answers from that text. The knowledge stays outside the model.
    • Fine-tuning trains a model further on your examples. It changes the model's weights, so it shapes behaviour: tone, structure, tool use, or a narrow task.

    Anthropic's glossary describes RAG as useful for up-to-date information, domain knowledge or explicit citation. Microsoft's overview says fine-tuning does not replace retrieval for current information.

    A rough rule: RAG fixes what the model knows. Fine-tuning fixes how the model behaves.

    Decision table

    QuestionPromptingRAGFine-tuning
    Does the answer depend on documents that change?WeakStrongWeak
    Do you need citations to a source?WeakStrongWeak
    Do you need a fixed tone, format or schema?FairWeakStrong
    Do you need per-user access control on content?Not applicableStrong, if the index supports itWeak
    Is there a narrow, repeated task with many examples?FairWeakStrong
    How fast can you start?HoursDays for a prototypeWeeks, with data prep
    Main running costLonger promptsSearch index plus longer promptsTraining, evaluation, hosting
    Effort to update knowledgeEdit the promptRe-index the documentRetrain

    Read the table as a guide, not a score. One strong "must have" usually decides the choice. The speed row is general guidance, not a vendor figure.

    When RAG is the right choice

    RAG fits when your content is large, changing, or restricted. Typical cases are policy search, support knowledge bases, product documentation and contract lookup.

    Freshness. To update an answer, you update the source document and re-index it. Nothing is retrained.

    Citations. Because the model answers from retrieved passages, the application can show which passages it used. Reviewers can then check the answer. Amazon Bedrock Knowledge Bases, for example, lists citations as a built-in capability.

    Access control. Retrieval can filter by who is asking. Azure AI Search lists document-level access control, and Bedrock's managed knowledge base lists document-level permission filtering at retrieval time. A fine-tuned model cannot do this. Whatever went into training can come out for any user.

    What RAG does not fix. Poor chunking, weak embeddings and messy documents give poor answers. Most RAG quality work is data work: cleaning documents, choosing chunk sizes, testing retrieval, and using hybrid search (keywords plus vectors) where exact terms matter.

    When fine-tuning is the right choice

    Fine-tuning fits when behaviour is the problem. Microsoft's overview lists the cases: aligning style and structure, improving tool selection, reducing prompt overhead, and specialising a smaller model so it meets a task's needs at lower cost and latency.

    Good candidates are classification or extraction with a fixed schema, a brand voice that long prompts cannot hold, and a small model that must match a larger one on one narrow task. Poor candidates are product catalogues, policies, facts that change monthly, and anything where users must see different data. Use RAG for those.

    Microsoft also states that benefits are not guaranteed, so compare the tuned model against your baseline on held-out data.

    How much data? There is no universal number. Requirements vary by provider and model, and Microsoft's guide tells you to check data-format, file-size and minimum-example rules for the model you pick. Start with a small set of high-quality examples, test whether quality improves, and only then collect more. Keep validation and test examples out of the training set.

    Costs by category

    Prices change, so this guide lists categories instead of figures.

    • Prompting: tokens for longer prompts.
    • RAG: embedding, index or vector store, query compute, and extra tokens for retrieved text on every call. Engineering time for ingestion and permissions is often the largest part.
    • Fine-tuning: data preparation, training jobs, storage and hosting for each custom model, repeated evaluation, and retraining when the base model is retired. AWS states that Bedrock bills training by tokens processed (training tokens times epochs) plus monthly storage per custom model.

    Fine-tuning a small model can lower cost and latency at high volume, but only if it reaches the quality you need. Measure it.

    Governance and risk

    Think about where your data goes and who can see it.

    • RAG keeps data in a store you control. You can delete a document and it stops appearing. You can log what was retrieved.
    • Fine-tuning moves data into model weights. Microsoft advises inspecting training data for bias and sensitive information before upload. Deleting a record later does not remove what the model learned, so retraining is the only clean fix.
    • Residency matters. On Microsoft Foundry, Global training copies data and weights to the region where training runs and does not offer data residency. Standard training stays in the resource's region. Check this before you choose a tier.
    • Lifecycle risk. A tuned model depends on its base model. Amazon Bedrock stops new fine-tuning jobs on a model once it enters its Legacy state. OpenAI says fine-tuned models follow the shutdown schedule of the base model.

    Evaluation: do this before you pick

    Build a small test set from real questions before you choose a technique. Include questions with known answers, questions the system should refuse, and a few that need a citation.

    For RAG, score retrieval and answers separately. Did the right passage come back? Did the answer stay inside it? For fine-tuning, compare the tuned model with the best prompted baseline on held-out examples, not on training loss. Microsoft's guide warns against judging a model by training performance alone.

    Re-run the tests whenever the model, prompt, chunking or data changes.

    What the vendors offer as of 26 October 2026

    OpenAI. OpenAI's deprecations page says that from 7 May 2026, creating fine-tuning jobs was not available to organisations that had not previously run fine-tuning. From 2 July 2026, access was limited further to organisations that had run inference on a fine-tuned model in the past 60 days. Active existing customers can no longer create new fine-tuning jobs after 6 January 2027. Inference on fine-tuned models continues until the base model is deprecated. The GPT-4o models and GPT-4.1 are listed for retirement on 14 January 2027, and their fine-tuned versions follow the same schedule. For a new project, plan on a different route.

    Anthropic. Anthropic's documentation says the Claude API does not currently offer fine-tuning and suggests asking your Anthropic contact. AWS documentation lists Claude 3 Haiku as a fine-tunable model on Amazon Bedrock in one Region (us-west-2). Check that model's lifecycle state before you plan around it.

    Amazon Bedrock. Offers supervised fine-tuning, reinforcement fine-tuning and distillation, for models including Amazon Nova, Meta Llama and Claude 3 Haiku.

    Google. Google renamed Vertex AI to Gemini Enterprise Agent Platform on 22 April 2026. Vertex AI Search is now Agent Search. Release notes show supervised fine-tuning in Preview for Gemini 3.1 Flash-Lite and Gemini 3.5 Flash (tuning limited to us-central1 and europe-west4), and reinforcement-learning fine-tuning in Preview for Gemini 3.5 Flash.

    Microsoft. Azure AI Foundry is now Microsoft Foundry. Managed fine-tuning supports supervised fine-tuning, preference tuning (DPO) and reinforcement fine-tuning, depending on the model. Supported models in Microsoft's table include the GPT-4.1 and GPT-4o families, Llama-3.3-70B-Instruct, Qwen3-32B and gpt-oss models, some in preview. Azure OpenAI resources can be upgraded to Foundry resources.

    Open-weight and hosted open-source. Together AI offers LoRA and full fine-tuning with supervised and DPO methods. Fireworks AI offers supervised fine-tuning with LoRA or full-parameter options, plus DPO and ORPO, on models marked as tunable. Hugging Face's PEFT library trains small adapters on your own hardware, cutting compute and storage compared with full tuning. Check each open-weight model's licence.

    RAG tooling and name changes

    • Azure AI Search is still the product name. It supports full-text, vector, hybrid and multimodal queries, and it underpins Foundry IQ, Microsoft's knowledge layer for agents.
    • Amazon Bedrock Knowledge Bases now has a Managed Knowledge Base option, which AWS recommends, and a customer-managed option where you run your own vector store such as OpenSearch Serverless or Aurora.
    • Google's Agent Search replaces the Vertex AI Search name.
    • pgvector adds vector search to Postgres, with HNSW and IVFFlat indexes. It suits teams that already run Postgres and want vectors next to relational data.
    • Dedicated vector databases such as Pinecone, Weaviate and Qdrant suit cases where a general database lacks the scale or features. Test with your own data.

    A sensible order of work

    1. Write the test set.
    2. Try prompt engineering and measure it.
    3. Add RAG if the model lacks your knowledge.
    4. Fine-tune only for a measured behaviour gap.

    FAQ

    Can fine-tuning teach a model my company's documents?

    It can absorb some patterns, but it is a poor way to store facts. Answers can be wrong without warning, you cannot cite a source, and updates need retraining. Use RAG for documents.

    Is OpenAI fine-tuning still available?

    Only for some organisations. Per OpenAI's deprecations page, it closed to organisations that had not used it from 7 May 2026, and active existing customers cannot create new jobs after 6 January 2027.

    Does Anthropic offer fine-tuning for Claude?

    Anthropic's docs say the Claude API does not currently offer it. AWS documents fine-tuning for Claude 3 Haiku on Amazon Bedrock, so check that model's status first.

    Can I use both RAG and fine-tuning?

    Yes. A common pattern is RAG for current facts and citations, with a fine-tuned small model for output format and tone. Add the second only after the first is tested.

    Sources

    1. OpenAI, Deprecations (self-serve fine-tuning update and GPT-4o / GPT-4.1 retirement)
    2. OpenAI, Model optimization guide
    3. Anthropic, Glossary (fine-tuning and RAG entries)
    4. AWS, Customize a model in Amazon Bedrock
    5. AWS, Fine-tuning supported models in Amazon Bedrock
    6. AWS, Amazon Bedrock model lifecycle
    7. AWS, Amazon Bedrock Knowledge Bases
    8. Google Cloud, Gemini Enterprise Agent Platform release notes
    9. Microsoft Learn, Fine-tuning in Microsoft Foundry
    10. Microsoft Learn, What is Microsoft Foundry?
    11. Microsoft Learn, Introduction to Azure AI Search
    12. Together AI, Fine-tuning overview
    13. Fireworks AI, Fine-tuning models
    14. Hugging Face, PEFT documentation
    15. pgvector on GitHub

    Interested in Enterprise AI Updates?

    Occasional AI architecture, governance and platform engineering updates for CTOs and founders. Prefer a feed reader? RSS feed.

    · Chief Executive Officer, ZigmaNeural

    Vinod Kumar leads ZigmaNeural, advising enterprise leaders on AI strategy, connected products and technology investment decisions.

    Reviewed by Ram Sharma on 26 October 2026

    Found this article useful? Share it:

    LinkedIn X