RAG vs fine-tuning: how to give AI your company's knowledge

Two ways to build an AI assistant that knows your business: search your documents at question time, or train a model on examples. A comparison table, an honest recommendation and a list of what to prepare.

RAG vs fine-tuning comes up whenever a company wants an AI assistant that knows its procedures, products and documents. In most business cases we start with RAG. It retrieves the relevant passages from your documents at question time and hands them to the model along with the question, so knowledge stays current and every answer can point to its source. Fine-tuning, which means further training a model on your examples, changes how the model responds: its style, format or the way it classifies text. It is not a good way to teach a model facts that change. Below we explain both approaches in plain words, compare them side by side and list what to prepare before you start.

What is RAG?

RAG (retrieval-augmented generation) is a way to make a language model answer from your documents rather than only from what it learned in training. The model doesn't memorize your documents. Each time, it gets a handful of passages that match the question and writes its answer from them.

Think of an employee who checks the company binder before answering a customer. They don't need to know everything by heart. They need to find the right page fast.

How RAG works: a diagram in two lanes

Picture a diagram with two lanes. The top lane runs in the background; the bottom one runs on every question.

Preparation lane (in the background):

  1. Documents from chosen sources, such as a shared drive, wiki or helpdesk, flow into the system.
  2. Each document is split into passages, from a few sentences to a few paragraphs long.
  3. Each passage is turned into a vector, a numerical representation of its meaning, and stored in an index along with its source and who may access it.
  4. When a document changes, its passages are updated in the index.

Question lane (on every query):

  1. A user asks a question.
  2. The system searches the index for the passages closest in meaning, often combined with keyword search, and drops any the user isn't allowed to see.
  3. The model receives the question, the retrieved passages and an instruction to answer only from them.
  4. The answer comes back with links to its sources, which the user can open and check.

How we build these systems in practice is covered on our RAG development services page.

What is LLM fine-tuning?

LLM fine-tuning is extra training of an existing language model on your examples. You prepare pairs of input and expected output, usually hundreds or thousands of them. Training adjusts the model's internal parameters, so afterwards it responds in a particular way on its own, without a long instruction in every request.

Some providers offer fine-tuning for selected models through their API. Open models can be fine-tuned in-house, for example with LoRA, which trains only a small share of the parameters.

Fine-tuning is good at teaching form: tone of voice, answer structure, sorting text into categories. It is poor at teaching facts. The model may absorb some information from the examples, but it can't tell you where it came from, and when a price list or procedure changes, you have to train it again.

RAG vs fine-tuning compared

RAG Fine-tuning
Where knowledge comes from documents retrieved at question time parameters changed during training
Freshness a document change applies once the index updates a change requires a new training run
Setup cost preparing sources, the index and tests preparing hundreds of examples and training
Running cost longer requests, since they carry passages shorter requests, but a fine-tuned model can cost more per use or need its own server
Factual accuracy high, when search finds the right passages uncertain, the model can blend and invent details
Source citations yes, every answer can point to a document no
Access control passages filtered by the user's permissions none, the model knows the same for everyone
Privacy documents stay in your index, only passages reach the model examples go into training, and their content can surface in answers
Best for company knowledge, procedures, documentation, offers style, format, narrow classification

Freshness

Company knowledge changes every week: prices, policies, procedures, product details. With RAG, the changed document only has to reach the index, which usually happens automatically. With fine-tuning, every change means a new example set, a training run and testing.

Cost and effort

With RAG, most of the work goes into tidying documents, permissions and a test question set. Fine-tuning shifts the effort to preparing examples, and each one has to be right, because the model learns the mistakes too. What makes up the budget for both is covered in our guide to AI implementation cost.

Accuracy and citations

A RAG assistant can show the passage behind its answer. For legal, support or engineering teams, that is the basis of trust: an answer can be checked in seconds. A fine-tuned model can state a wrong answer just as confidently, and there is nothing to open to check it.

Access control and privacy

In RAG every passage carries permissions, so a sales rep won't get an answer based on HR files. Fine-tuning can't do that: whatever the model learned is available to every user. That is why we don't use personal data or confidential documents as training data.

When fine-tuning makes sense

We consider fine-tuning in three situations:

  • Style and tone. The model has to write like your brand, and a prompt with examples doesn't give consistent results.
  • A fixed format. Output must follow a strict structure, such as a report with a set layout, and the model drifts from it too often.
  • Narrow classification at scale. Routing tickets, emails or documents into categories. A smaller fine-tuned model can then be cheaper and faster than a large model with a long prompt.

Before proposing fine-tuning, we try simpler options: a better prompt, a few examples in the request and enforced structured output. They are often enough.

Can you train ChatGPT on company data?

When people ask how to train ChatGPT on company data, they rarely mean training a model. They want an assistant that answers from company documents, which is exactly what RAG does. There are three routes:

  1. Off-the-shelf tools where you upload files, such as projects in ChatGPT or Claude. A quick start for a small team and a few dozen documents. The limits are permissions, syncing with company sources and control over where data goes.
  2. A RAG assistant connected to your systems. An index that updates automatically, permissions that mirror your company's, citations and logs. We usually recommend this route when knowledge sits in several systems and access differs between teams. We pick the model from several providers and connect it through their APIs. How we connect models to business systems is described on our LLM integration services page.
  3. A customer-facing assistant. The same technique, but answers based only on public content and a handover to a person for difficult cases. That is the scope of our AI chatbot development.

Combining both

RAG and fine-tuning aren't mutually exclusive. For example, a helpdesk assistant pulls facts from the knowledge base through RAG, while a model fine-tuned on approved replies keeps the tone and structure. Another option is fine-tuning a model that ranks retrieved passages, when search keeps confusing similar documents. Either way, we add fine-tuning only once RAG works and testing shows a specific problem a prompt can't fix.

Where RAG falls short

RAG doesn't answer every question about company data. Know its weak spots before you start:

  • Aggregate questions. "How many contracts expire in March?" means checking every contract, not a few passages. Such questions are better served by a database or system query that the model calls as a tool.
  • Poor sources. Scans without a text layer, tables split across passages and conflicting versions of the same procedure produce bad answers whatever the model.
  • Knowledge that isn't written down. If the answer lives only in an experienced employee's head, it has to be written down first.
  • Questions that need a decision. An assistant can quote your discount policy, but a specific discount should be decided by a person or a clearly defined rule.

A well-run pilot catches these issues on the test set before the assistant reaches the team.

What to prepare before you start

  • A list of knowledge sources with an owner for each: who keeps procedures, offers or documentation current.
  • Version hygiene: which documents are in force and which should stay out of the index.
  • A permissions map: who may see which documents, and whether access groups already exist in the sources.
  • Test questions: a few dozen real questions people ask, each with the correct answer and its source document.
  • Examples of good answers, if a specific tone or format matters to you.
  • Data requirements: whether documents contain personal data and where it may be processed.
  • A success measure: for example the share of correct answers in testing, time spent looking for information, or cases resolved without escalation.

Fine-tuning adds hundreds of checked example pairs and someone to judge whether the result beats the model before training.

Where to start

The safest start is a RAG pilot on one source with one team. After a few weeks you can see how the assistant handles your documents and what a single question costs. If you are not yet sure which process to pick, our AI consulting services help with that. Other uses, from agents to AI features in products, are covered on our AI development services page.

Tell us what questions the assistant should handle and where the knowledge that answers them lives today. We will tell you whether RAG is enough, whether fine-tuning has a place, and which source to start with. Book a call about your AI assistant.

Frequently asked questions

Does RAG stop hallucinations?

Not completely, but it greatly reduces them. The model answers from the passages it retrieved and cites the source, so it is easy to check where an answer came from. When search finds nothing relevant, a well-designed assistant says it doesn't know instead of guessing. We measure quality on a set of test questions before launch and after every change.

Will our company data be used to train the model?

With RAG, documents don't train the model; they are sent along with each question. The major providers state that by default they don't train on data sent through their business APIs, but we check the terms of the specific provider and put them in the data processing agreement. When data can't leave your company, the model can run on your own server.

How many documents do we need to start with RAG?

There is no minimum. A pilot makes sense with a single source, such as a set of procedures or a support team's answer library. Quality matters more than quantity: current versions, a clear owner for every source and no duplicates.

Is fine-tuning expensive?

The training run itself, for a model offered through a provider's API, is often not the biggest cost. Most of the effort goes into preparing and checking hundreds of examples and evaluating the result, and every change in requirements means another training run. That is why, before proposing fine-tuning, we check whether a good prompt with examples gets the same result.

Related services

  • RAG knowledge assistants

    An assistant that answers employees from your company documents, always cites the source and shows each person only what they are allowed to see.

  • LLM integration

    We connect language models to your CRM, ERP, intranet and internal tools through APIs, with cost, quality and data protection under control and a model you can swap.

  • AI chatbots

    An assistant on your website, WhatsApp or help desk that answers from your own content, uses live data from your systems and knows when to hand over to a person.

  • AI consulting

    A short, practical engagement that shows where AI pays off: a prioritized list of use cases, a pilot plan and a team that uses AI tools safely.

  • AI

    AI agents, chatbots, RAG, LLM integration and AI features in products. We start from a task worth automating and measure whether AI actually helps.

All articles

We'll help you decide where to start

Describe in a few sentences what takes your team the most time today. We'll point out what is worth automating first.

We most often start with: