← All articlesGenerative AI

What is RAG? Retrieval augmented generation explained for businesses

Checked against official sources on · How we verify

In 30 seconds
  • RAG = the AI looks up your documents first
  • Quality depends on documents, not the model
  • Test with 50–100 real questions
  • Internal assistant example: payback ~6 months
  1. Pick one use caseWhere people waste time looking for answers that already exist in the company.
  2. Clean and own the documentsCurrent versions, readable files, access rights per user, one owner.
  3. Measure answer qualityA test set of real questions, run before launch and after every change.

In short: RAG (retrieval augmented generation) is a way of making an AI model answer from your own documents. Before replying, the system searches your manuals, policies or contracts, picks the relevant passages and asks the model to answer using only those, with references. It's the standard approach for company assistants because your documents can change without retraining anything.

The term comes from a 2020 research paper by Lewis and colleagues at Facebook AI Research. Since then it has become the most common way businesses connect large language models to their own knowledge. This guide explains it without jargon, from the point of view of someone deciding whether to invest in it.

What RAG is, in plain English

In short: think of an open-book exam. A model on its own answers from memory, which is general and sometimes wrong. With RAG it first looks things up in your documents, then answers, and can tell you which page it used.

  • Without RAG: you ask ChatGPT about your returns policy and it gives a plausible answer based on what returns policies usually say.
  • With RAG: the system finds your actual returns policy, passes the relevant paragraph to the model and the answer cites it.
  • Why it matters: the answer is grounded in your content, it's checkable, and when the policy changes you update the document, not the model.

How it works, in four steps

In short: documents are split into short passages, indexed by meaning, searched for each question, and the best passages are given to the model to write the answer. Most of the quality is decided in the first two steps, not by the model.

  1. Split. Documents are cut into passages of a few paragraphs, keeping titles and sections so each passage still makes sense on its own.
  2. Index. Each passage is turned into a numerical representation of its meaning (an "embedding") and stored in a search index, so "refund" can match "money back".
  3. Retrieve. When someone asks a question, the system finds the passages closest in meaning, often combined with classic keyword search.
  4. Generate. The model receives the question plus the retrieved passages, with an instruction to answer only from them and to cite them, or to say it doesn't know.

RAG, fine-tuning or ChatGPT as it is?

In short: use RAG when the AI must know your facts, fine-tuning when it must adopt a style or format, and a plain tool when general knowledge is enough. For most SME use cases, RAG is the right first step.

ChatGPT as it isRAGFine-tuning
What it solvesGeneral writing and reasoningAnswers based on your documentsA specific style, format or narrow task
Knows your company's factsNoYes, from the documents it can reachPartly, and goes stale
Updating informationNot applicableUpdate the documentRetrain the model
Shows sourcesNoYesNo
Typical effortLowMedium: mostly document workHigh: training data and retraining

A common misconception is that you need to "train the AI on your data". For facts that change, such as prices, policies or procedures, that's usually the wrong tool: RAG keeps the facts in documents you control.

Business use cases

In short: RAG works best where people waste time looking for answers that already exist somewhere in the company. The four patterns below cover most SME projects.

  • Internal assistant on procedures. Staff ask "how do I process a credit note for a foreign customer?" and get the answer from the internal manual, with the link.
  • Customer answers from product documentation. A support assistant answers technical questions from datasheets and manuals, and hands over to a person when the documents don't cover it.
  • Searching contracts and tenders. Find every contract with a specific penalty clause, or summarise the obligations in a supplier agreement, with references to the exact articles.
  • Private clinics: internal protocols. Staff check operating procedures, consent forms and booking rules. Not diagnosis: clinical decisions stay with clinicians.

Why RAG projects fail

In short: almost never because of the model. They fail because of the documents: outdated versions, scanned PDFs nobody can read, access rights ignored, and no one checking whether the answers are right.

  • Outdated or duplicate documents. If three versions of the same procedure are indexed, the assistant will sometimes quote the old one. Countermeasure: one approved version per document, with an owner and a review date.
  • Scanned PDFs and images. Text that's only a picture can't be searched until it's converted (OCR), and tables often come out scrambled. Countermeasure: check a sample of converted documents before indexing everything.
  • Access rights ignored. If the assistant can read HR files, it can quote them to anyone. Countermeasure: the system must respect the same permissions as your document storage, per user and per role.
  • No quality checks. Without a test set, nobody knows whether answers are right until a customer complains. Countermeasure: the measurement method in the next section.

How to measure answer quality

In short: build a test set of 50–100 real questions with the correct answers, written by the people who know the subject. Run it before launch and after every change, and track three numbers.

MetricWhat it checksHow to read it
Correct answersShare of test questions answered correctly and completelyThe main number; agree the target before starting
Correct sourcesShare of answers citing the right documentIf this is low, fix retrieval before touching the model
Honest "I don't know"Share of out-of-scope questions where the assistant declinesA good sign: it means it isn't inventing

An assistant that says "I can't find this in the documents" is doing its job. An assistant that always has an answer is the one to worry about.

Worked example: does an internal assistant pay off?

In short: in the example below, an internal RAG assistant for a 20-person team saves about 880 hours a year. At €40 an hour that's €35,200, against one-off costs of €15,200 and running costs of €2,400 a year: payback in about 6 months.

The setup (hypothetical, not a quote). A 20-person team spends on average 30 minutes a day looking for information in manuals, shared folders and old emails: measure your own figure, this is an assumption. The assistant cuts that time by 40%. 220 working days, €40 average hourly cost.

ItemCalculationResult
Time saved per person30 min × 40%12 min/day
Time saved, whole team12 min × 20 people × 220 days ÷ 60880 hours/year
Value of time saved880 h × €40€35,200/year
Build (assumed)supplier quote€12,000
Document clean-up80 internal hours × €40€3,200
One-off costs€12,000 + €3,200€15,200
Running costs (assumed)model usage + hosting + maintenance, €200 × 12€2,400/year
Payback€15,200 ÷ (€35,200 − €2,400) × 12about 6 months

The number that matters most is the share of search time actually saved. At 20% instead of 40%, the value halves to €17,600 a year and payback stretches to about 12 months. Measure today's search time first: our guide to AI implementation costs and ROI explains how.

Data and privacy

In short: with RAG your documents are sent, a passage at a time, to the model that writes the answers. Choose where that happens, keep access rights per user, and treat any personal data in the documents under GDPR.

  • Where the data goes. Check where the vendor processes and stores data, whether it's used to train their models, and sign a data processing agreement.
  • Permissions per role. The assistant should only retrieve documents the person asking is allowed to open.
  • Personal data. HR files, health information and customer records need a legal basis and extra care; often the right answer is to leave them out of the index.
  • Telling people it's AI. A customer-facing assistant must make clear it's an AI system. Our guide to the EU AI Act for SMEs covers the rules.

How to fund it in Ireland

In short: an internal assistant over your own documents is a custom build, so the relevant support is usually Digital Process Innovation, with Digital Discovery to scope it first. A ready-made tool with document search can fit the Grow Digital Voucher instead.

  • Grow Digital Voucher. Through your Local Enterprise Office, for businesses with 1–50 employees in any sector that have completed Digital for Business in the previous two years: 50% of eligible costs, up to €5,000, for ready-made digital tools including AI. Custom or bespoke software is not eligible.
  • Digital Discovery. Enterprise Ireland funds up to 80% of an external expert's fees, maximum grant €5,000, to scope the project before you build.
  • Digital Process Innovation. For a system built around your processes: up to 50% of eligible costs, maximum grant €150,000, covering staff time, consultancy carried out in Ireland and materials. Ask your Enterprise Ireland, Údarás or LEO adviser whether your business qualifies, and agree the project before you commit to suppliers.

With a grant. If the €15,200 one-off cost in our example is approved for 50% funding before you start, your cost falls to €7,600 and payback from about 6 to under 3 months.

Eligibility, sequence and mistakes to avoid in our guide to AI grants for Irish SMEs.

What you need to get started

In short: one use case, a curated set of documents with an owner, a test set of real questions and a clear rule for what the assistant does when it doesn't know.

  1. One use case. For example "answer staff questions on the order and returns procedures", not "an assistant that knows everything".
  2. Curated documents. The current, approved versions only, with a named owner for each area.
  3. A test set. 50–100 real questions with correct answers, written before the build.
  4. A fallback. What happens when the answer isn't in the documents: decline, and route to a named person.

Frequently asked questions

What does RAG stand for?

Retrieval augmented generation: the system retrieves relevant passages from your documents and uses them to generate the answer, usually with references to the sources.

What's the difference between RAG and fine-tuning?

RAG gives the model your documents at the moment it answers, so updating a document updates the answers. Fine-tuning changes the model itself, which suits style or format but goes stale for facts that change.

Can RAG stop AI from making things up?

It greatly reduces the problem but doesn't eliminate it. Instructing the model to answer only from the retrieved passages, showing sources and testing with real questions are what keep errors low.

Does RAG work with scanned PDFs and Excel files?

Scanned PDFs must be converted to text first (OCR), and tables need checking after conversion. Spreadsheets usually work better when queried as data than when treated as text.

Is my data safe with a RAG system?

It depends on the setup. Check where the vendor processes data, whether it's used for training, and make sure the assistant respects the same access rights as your document storage.

Free toolIs your business ready for AI?12 questions, 3 minutes: a score across six areas and the first steps to take. Nothing is saved.Take the check

Official sources

Every rule, date and figure in this guide was checked against these sources on 26 November 2026.

This article is for information only and is not legal advice.