Skip to content

This site is shown in English. Switch language if you prefer.

Menu

Monday to Saturday, 9:30 am to 6:30 pm India time (IST)

Contact us

RAG vs fine-tuning vs prompt engineering: which approach fits your use case

Chief Technology and AI Officer

  • Published
  • 11 min read
A question bubble enters a violet junction that splits onto three coloured tracks. One leads to a card of written instructions, one to a stack of documents with a search lens and a database, and one to sliders and a model chip being tuned. A test checklist sits below the junction.
Table of contentsContents
  1. What each approach changes
    1. Prompt engineering: change what you ask
    2. RAG: change what the model can read
    3. Fine-tuning: change the model
  2. The three approaches compared
  3. What fine-tuning is good for, and what it is not
  4. Vendor support in November 2026
  5. Effort and cost per route
  6. A decision tree by data, change rate and accuracy
  7. Combining the approaches
  8. Pros and cons at a glance
  9. How we decide at AcmaSoft
  10. Frequently asked questions

Share this article

What prompt engineering, retrieval-augmented generation and fine-tuning each change, the data and effort they need, where vendors stand in November 2026, and a decision tree by data volume, change rate and accuracy.

When a language model gives weak answers on your use case, three fixes are on the table. You can write better instructions and examples (prompt engineering), give the model the right documents at question time (retrieval-augmented generation, or RAG), or train the model further on your own examples (fine-tuning). Teams often jump to fine-tuning because it sounds like the serious option. In most business projects it is the last one to try, and in late 2026 it is also the option whose vendor support is changing fastest.

This guide compares the three approaches by what each one changes, the data and effort it needs and how it fails, then gives a decision tree based on data volume, how often your knowledge changes and how accurate the output must be. It sits within our guide to building LLM applications, which covers the architecture around the model.

Key takeaways

  • Prompt engineering changes what you ask, RAG changes what the model can read, and fine-tuning changes the model itself.
  • Start with a test set and prompting, add RAG when answers must come from your own or changing documents, and fine-tune only for a measured gap in format, style or a narrow skill.
  • Fine-tuning does not keep facts current: every change to the knowledge means new training data and a new training run.
  • Vendor support is shifting: OpenAI is winding down its self-serve fine-tuning platform, while Amazon Bedrock and Google's platform still offer supervised and reinforcement tuning.
  • Many production systems combine all three, and the choice is a measurement on your own test set, not an opinion.

What each approach changes

Prompt engineering: change what you ask

You improve the instructions, add examples of good answers, structure the input and break a hard task into steps. Nothing about the model changes, and every improvement can be tested in minutes. Anthropic’s prompt engineering guide assumes three things before you start: a clear definition of success criteria, a way to test against them, and a first draft prompt. It also notes that not every failing test is best fixed by prompting; latency and cost are sometimes easier to improve by choosing a different model.

RAG: change what the model can read

Before the model answers, your system searches your documents and puts the most relevant passages into the prompt. The model is unchanged, but it now answers from your current content and can cite it. Updating the knowledge means updating the documents. Our article on retrieval-augmented generation explained step by step covers chunking, permissions and evaluation.

Fine-tuning: change the model

You train an existing model further on examples of inputs and the outputs you want, so its weights change. Amazon Bedrock describes supervised fine-tuning as training on labelled input and output pairs so the model learns which outputs to generate for which inputs, and also offers reinforcement fine-tuning, where reward functions score responses instead of labelled answers, and distillation, where a large teacher model’s answers are used to train a smaller student model. On open models, parameter-efficient methods such as LoRA train only a small number of extra parameters; Hugging Face describes its PEFT library as cutting compute and storage costs significantly while performing comparably to full fine-tuning.

The three approaches compared

Prompt engineering, RAG and fine-tuning compared
QuestionPrompt engineeringRAGFine-tuning
What changesThe instructions and examplesThe context the model readsThe model's weights
Best atFormat, tone, steps, simple rulesAnswers from your own, current documents with citationsConsistent format or style, a narrow skill, a smaller model doing a big model's job
Keeps knowledge currentOnly what fits in the promptYes, update the documentsNo, retrain to change it
Data you needA test set and a few examplesYour documents, with owners and access rulesMany high-quality labelled examples plus a test set
Time to first resultHoursDays to weeksWeeks, including data preparation
Explains its answersNoYes, with citations to sourcesNo
Ongoing workRe-test when the model changesKeep the index in step with sourcesRetrain when data, rules or the base model change
Main riskPrompt becomes long and fragileWrong or stale passages retrievedModel learns errors in the data; locked to one base model

Source: Anthropic prompt engineering overview; OpenAI model optimisation guide; Amazon Bedrock model customisation; Hugging Face PEFT; checked 13 Nov 2026

What fine-tuning is good for, and what it is not

OpenAI’s model optimisation guide lists the practical advantages of fine-tuning over prompting alone: training on more examples than fit in one context window, shorter prompts that lower token cost and latency, training on proprietary data without sending it in every request, and training a smaller, cheaper model for a specific task. Notice what is missing from that list: keeping facts up to date. A fine-tuned model knows what was in its training data on the day it was trained.

Good reasons to fine-tune:

  • A strict output format that prompting does not hold reliably across thousands of calls, such as a fixed JSON structure for a classifier.
  • A house style or tone that is hard to describe but easy to show with examples.
  • A narrow, high-volume task where a small tuned model can match a large general model at a fraction of the cost per call.
  • Specialist vocabulary or classification where you have many labelled examples and the general model keeps getting it wrong.

Poor reasons to fine-tune:

  • “The model does not know our products.” Use RAG or tools; product data changes.
  • “We want it to stop making things up.” Fine-tuning does not add grounding or citations; retrieval with “answer only from these passages” rules does.
  • “We have not written a test set yet.” Without one you cannot tell whether the tuned model is better.

Want a second opinion on your plans?

Tell us what you are working on. A specialist will look at it and reply with practical next steps.

Get in touch

Vendor support in November 2026

Where you can fine-tune depends on the model family, and this has changed this year. Check the current vendor page before you plan a project around it.

Fine-tuning options from three major platforms
PlatformWhat is offeredNote
OpenAI APISupervised, vision and preference (DPO) fine-tuning on listed GPT-4.1 and GPT-4o versionsBeing wound down: closed to organisations that never used it from 7 May 2026; active customers can create new jobs until 6 Jan 2027; tuned models keep serving until their base model is deprecated
Amazon BedrockSupervised fine-tuning, reinforcement fine-tuning and distillationCharged on training tokens times epochs, plus monthly storage per custom model
Google Cloud (Gemini)Supervised fine-tuning, preference tuning and reinforcement fine-tuningSupervised tuning on listed Gemini 2.5, 3.1 and 3.5 models; guidance suggests 100 or more examples

Source: OpenAI model optimisation guide and deprecations page; Amazon Bedrock user guide; Google Cloud tuning documentation; checked 13 Nov 2026

The OpenAI dates come from its deprecations page, and the Google details from its tuning documentation, which advises starting with prompting, moving to tuning only if needed, and notes that high-quality, well-labelled data matters more than quantity. The practical lesson is lock-in: a fine-tuned model is tied to one base model on one platform. When that base model is retired, you retrain. Prompts and retrieval pipelines move between models with far less work, which is one reason our guide to choosing an LLM for your product recommends keeping model calls behind one interface.

Effort and cost per route

The cost of each route is mostly people’s time, not compute. The table below shows where the effort goes; it is a structure for your estimate, not a price list.

Where the effort goes on each route
Cost linePrompt engineeringRAGFine-tuning
Set-up workTest set, prompt iterationsTest set, source mapping, ingestion, chunking, search, permissionsTest set, collecting and cleaning labelled examples, training runs, comparison
InfrastructureNone beyond the model APIVector index (often PostgreSQL with pgvector), sync jobsTraining jobs, storage of the custom model, sometimes dedicated hosting
Per-request costLonger prompts cost more tokensRetrieved passages add input tokensOften lower if a smaller tuned model replaces a larger one
Ongoing workRe-test on each model changeKeep sources and index in sync, review answersRetrain when data or base model changes, re-run evaluation

Source: AcmaSoft project practice; vendor billing models from Amazon Bedrock and Anthropic pricing pages, checked 13 Nov 2026

Two billing facts are worth knowing. On Amazon Bedrock, training is charged on the number of tokens processed (training tokens multiplied by epochs) and each custom model has a monthly storage charge. On Anthropic’s API, cached prompt content is billed at a fraction of the normal input price, which makes long, stable instructions and reference text cheaper to resend; the multipliers are on the Claude pricing page. For full project budgets, see our breakdown of AI development cost; for running costs, our article on LLM cost optimisation covers caching, routing and batching.

A decision tree by data, change rate and accuracy

Prompt engineering, RAG or fine-tuning?

  1. Question 1: Do you have a test set of real inputs with known good outputs?

  2. Question 2: Does better prompting with examples meet your target on the test set?

  3. Question 3: Is the gap missing or outdated knowledge, such as products, policies or records?

  4. Question 4: Does the knowledge change more than a few times a year, or must answers cite sources?

  5. Question 5: Is the answer a live value such as stock, order status or a balance?

    • YesCall the system through a tool, not retrieval
    • NoUse RAG
  6. Question 6: Do you have many high-quality labelled examples of the output you want?

    • YesFine-tune and compare against the prompted baseline
    • NoImprove prompts, add examples or try a stronger model
  7. Question 7: Does all the reference material fit comfortably in one prompt?

    • YesPut it in the prompt with caching
    • NoUse RAG

The three questions underneath the tree are the ones in the title of this section:

  • Data volume. A handful of examples suits prompting. Thousands of clean, labelled examples make fine-tuning possible. A large body of documents suits retrieval.
  • Change rate. Knowledge that changes weekly belongs in retrieval or a tool, never in model weights.
  • Accuracy needs. Where an answer must be traceable, retrieval with citations gives reviewers something to check. Where the output must follow a strict format every time, fine-tuning or structured output features help.

Combining the approaches

They are not alternatives so much as layers. A typical production assistant uses all three: a carefully written system prompt, retrieval over the company’s documents, and, sometimes, a small fine-tuned model for one step such as classifying the request before retrieval. The order of work matters more than the choice:

  1. Step 1: Write the test set

    Collect real questions or inputs with known good outputs, including the awkward ones. This is the yardstick for every later decision.

  2. Step 2: Get the most from prompting

    Clear instructions, a few examples, structured input and output. Measure against the test set.

  3. Step 3: Add retrieval or tools

    If answers need your own or current knowledge, add RAG for documents and tool calls for live records. Measure again.

  4. Step 4: Try a different model

    Before training anything, test a stronger or cheaper model on the same set. It is often the cheapest improvement.

  5. Step 5: Fine-tune for a measured gap

    Only if a specific gap remains in format, style or a narrow skill, and you have the labelled data. Compare the tuned model against the best prompted baseline.

  6. Step 6: Keep measuring in production

    Add real failures to the test set and re-run it on every prompt, data or model change.

Pros and cons at a glance

Why teams choose fine-tuning

  • Reliable output format or style across very high volumes
  • Shorter prompts and lower cost per call when a small tuned model replaces a big one
  • Proprietary examples are learned once instead of sent in every request

Why they often regret it

  • Facts go stale; every change needs new data and a new training run
  • No citations, so answers are harder to check
  • Tied to one base model and platform, with vendor support changing
  • Needs a large set of clean, labelled examples that most teams do not yet have

How we decide at AcmaSoft

We follow the order above on every generative AI project. The first deliverable is a test set agreed with the client’s team, and the second is a measured baseline with a good prompt. Most of the assistants we build then need retrieval: in Acmafone CRM, our contact centre software, the copilot panel finds answers in the knowledge base for human agents, and in AI Call Studio each voice agent has its own knowledge base next to its call script. In both cases the knowledge changes often, so it lives in documents, not in model weights.

We recommend fine-tuning when the numbers show a gap that prompting and retrieval cannot close and the client has, or can build, a clean labelled dataset. Our machine learning engineers handle the data preparation, training and comparison, and our generative AI development team builds the retrieval and application around the model. If you are still deciding where AI fits, our AI consulting service starts with your use case and data, not with a technique.

Unsure whether your use case needs RAG or fine-tuning?

  • Share a sample of the inputs and the answers you expect. We will build a small test set with you, measure a prompted baseline and recommend the next step with evidence. Start with our generative AI team.

Share this article

About the author:

Chief Technology and AI Officer

Amit leads technology, engineering and the AI practice at AcmaSoft. He sets the technical direction for client projects, from architecture and code quality to the AI and automation work we deliver.

  • Technology and engineering
  • Architecture and code quality
  • AI practice
  • Automation

Get new guides by email

Articles and guides from our team, and company news. Unsubscribe at any time.

About AcmaSoft

AcmaSoft designs and builds websites, mobile apps and custom software, and runs SEO and digital marketing for its clients.

Years of experience
17+
Clients served
650+
Projects delivered
2,000+
Products shipped
300+

Frequently asked questions

Short answers to the questions readers ask most about this topic.

Ask a question
What is the difference between RAG and fine-tuning?

RAG leaves the model unchanged and gives it relevant passages from your documents at question time, so answers stay current and can cite sources. Fine-tuning trains the model further on examples, changing its behaviour, such as format, tone or a narrow skill. RAG adds knowledge; fine-tuning shapes behaviour.

When should I fine-tune an LLM?

When a measured gap remains after good prompting and retrieval, the gap is about format, style or a narrow repeated task, and you have many clean, labelled examples. Fine-tuning also makes sense when a small tuned model can replace a larger model on a high-volume task at lower cost.

Is prompt engineering enough for most business use cases?

For tasks that rely on the model’s general ability, such as drafting, summarising or classifying with clear rules, often yes. Once answers must come from your own or changing information, you need retrieval or tool calls as well. A test set tells you which case you are in.

Can you combine RAG and fine-tuning?

Yes. A fine-tuned model can still receive retrieved passages in its prompt. In practice teams add retrieval first, because it is quicker to build and change, and fine-tune later for a specific step if the measurements justify it.

How many examples do I need to fine-tune a model?

It depends on the task and the platform. Google’s tuning guidance for Gemini suggests thinking in terms of 100 or more examples and stresses that quality matters more than quantity. Whatever the number, you also need a separate test set to prove the tuned model is better.

Can I still fine-tune OpenAI models?

Only if your organisation is an existing, active user. OpenAI closed its self-serve fine-tuning platform to new users on 7 May 2026, and active customers can create new jobs until 6 Jan 2027, according to its deprecations page as checked on 13 Nov 2026. Existing tuned models keep working until their base models are deprecated.

Discuss your project with a specialist

Share what you are planning or trying to fix. We reply with practical advice, a rough timeline and the questions we need answered.

Estimated budget (optional)

Goals, users, key features and any deadline.0 / 2,000

Attachment (optional)

Protected against spam without puzzles. We never share your details.

Choose your region & language

Americas

Asia-Pacific

Europe, Middle East and Africa

Translations are produced automatically by Google Translate.