SOLIDWEB / ARTICLE · 24.11.2026

RAG or fine-tuning: What does your AI solution need?

RAG and fine-tuning solve different problems. Here is a practical method for choosing the right approach when AI is to work with your company’s own data.

RAG henter kunnskap, mens finjustering former modellens oppførsel.

The company wants an AI solution that can answer questions about products, procedures, agreements or technical documentation. Two terms will often come up: RAG and fine-tuning. They are often presented as competing technologies, but in practice they solve different problems.

The short version is this: RAG gives the model access to up-to-date information, while fine-tuning changes how the model behaves. If the goal is to provide accurate answers based on the company’s documents, RAG is usually the place to start. A language model does not become familiar with your intranet simply because it has your logo in the corner. Admittedly, that would be a highly efficient form of onboarding.

The choice affects quality, costs, maintenance and security. You should therefore start with the problem to be solved, not with the technology a vendor happened to give the most animations to in the presentation.

What is the difference between RAG and fine-tuning?

RAG retrieves relevant information when the question is asked

RAG stands for retrieval-augmented generation. The solution first searches for relevant content in approved data sources. The most relevant text excerpts are then sent to the language model along with the user’s question. The model formulates the answer using this content as context.

Documents are normally divided into smaller text chunks and tagged with metadata, such as product type, department, date or access level. The search can use semantic representations, traditional keyword search or a combination of both. A good setup ranks the results before passing them to the model.

RAG can be compared to an exam where the candidate is allowed to use a controlled handbook. Fine-tuning is more like teaching the candidate a particular writing style. The handbook makes it easier to find the right rule; the writing style does not automatically make the candidate aware of yesterday’s update to the personnel procedure.

The advantage is that the knowledge base can be updated without retraining the model. You can also show which documents an answer is based on, allow the model to abstain when the evidence is weak and limit which sources each user is allowed to search.

En god RAG-kjede finner riktig innhold og bevarer tilgangskontrollen.
A good RAG pipeline finds the right content and preserves access control.

Fine-tuning changes the model’s response patterns

With fine-tuning, an existing model is trained further on selected examples. This can be useful when the model must consistently classify enquiries, extract specific fields, follow a fixed response format or use a specialised tone and structure.

Fine-tuning, on the other hand, is rarely the best way to store a document archive. It is harder to know exactly which facts the model has learned, update individual details and document the basis for each answer. If prices, products or procedures change frequently, this quickly becomes cumbersome knowledge management.

Some platforms describe the combination of document uploads, search and a language model as a “magical knowledge layer”. Beneath the magic dust, you will usually find text excerpts, metadata and a search engine with access control. These are perfectly excellent components, even without a cape and conference lighting.

When should you choose which?

Start by describing the task in one sentence. “We are going to use AI” is not a task description. “Customer service must find the correct return policy for the right market and product category” is much better.

  • Choose RAG when answers must be based on documents that are updated, when users need traceability, or when different people need access to different sources.
  • Choose fine-tuning when the model must perform the same narrowly defined task consistently, and you have many good examples of the desired result.
  • Use both when the solution needs both up-to-date knowledge and a highly specific response format or workflow.
  • Use neither yet when a good system instruction, a regular search or a simple automated rule solves the need satisfactorily.

The last option is often overlooked. An extra AI plugin promising “intelligent orchestration” may in some cases turn out to be a new button, a new control panel and a remarkably robust invoice. Test the simplest solution first.

An internal reference tool for HR procedures will typically be well suited to RAG, because the documents change and access must be controlled. Automatic categorisation of support cases may be suitable for fine-tuning if standard instructions and examples do not provide sufficiently stable classification. A product assistant can combine RAG for facts with fine-tuning for a fixed and structured response format.

How to build a RAG solution that stands up in the real world

1. Define the questions the solution should answer

Choose one user group and a few tasks. Also define what the solution should not answer. For example, an assistant for product documentation should not improvise legal assessments or HR advice simply because the questions are phrased politely.

2. Clean up the sources before indexing them

RAG does not improve the documents themselves. Conflicting procedures, outdated PDFs and five files called “final_new_latest” will still be conflicting and outdated after they have been given vector representations. Clarify who owns the content, which version is current, and when the material should be reviewed or removed.

Metadata is particularly important. Tag content with document type, validity period, market, product and access level where relevant. This makes it possible to filter before searching and reduces the risk of the model mixing rules that apply to different situations.

3. Preserve access control throughout the entire pipeline

A user should only be able to retrieve text they already have the right to view. It is not enough to hide the document in the user interface if the search index can still deliver the excerpt to the model. Access must be enforced during retrieval, not dressed up after the answer has been generated.

Realistiske testspørsmål avslører om KI-løsningen faktisk er klar.
Realistic test questions reveal whether the AI solution is actually ready.

Also clarify how questions, document excerpts, answers and logs are processed. Consider retention periods, vendor terms, personal data and who can read the logs. Protect the solution against instructions in documents that attempt to override the system rules, and avoid giving the model more tools and permissions than the task requires.

4. Test the search separately from the language model

When an answer is wrong, you need to know whether the system retrieved the wrong document, misinterpreted the right document or lacked the necessary information. Therefore, test retrieval on its own: Does the search find the relevant text excerpts for realistic phrasings, spelling mistakes and short questions?

Create a fixed evaluation set with questions, expected answers, relevant sources and cases where the solution should abstain. Include ambiguous questions and information that does not exist. If the demonstration only works when the project manager asks the question word for word from the script, you do not have a pilot. You have theatre with a search field.

5. Measure the quality that actually matters

Assess both whether the right content was retrieved and whether the answer stays grounded in that content. Useful metrics include the proportion of questions with a relevant result, factual accuracy, correct refusals, response time, cost per task, and how often the user needs to contact a human afterward.

A user's thumbs-up or thumbs-down can provide signals, but is not sufficient quality control. A well-written answer can be wrong, and a correct answer may be less popular because it contains the word “no.” Manually review a sample of conversations and have subject-matter experts assess the results.

A practical decision before you buy

Ask the vendor to explain what happens from the moment a question is entered until the answer is displayed. You should get clear answers about which sources are searched, how access is controlled, how documents are updated, how the system handles insufficient information, and how quality is tested over time.

  1. Describe one specific task and who will use the solution.
  2. Find out whether a good instruction or a standard search is sufficient.
  3. Choose RAG when up-to-date and traceable knowledge is the main requirement.
  4. Consider fine-tuning when the response pattern needs to be stable and specialized.
  5. Build an evaluation set before scaling to more data sources and users.

For most knowledge solutions, a limited RAG pilot is a sensible first step. Fine-tuning should come when you can point to a specific behavior problem that cannot be solved well enough with instructions and examples. That way, the technology becomes an answer to a need—not an expensive group project drawing arrows between boxes.