Guide

RAG for business – how AI answers from company documents and what it costs

This guide is for management boards and managers who want employees to find answers in procedures, contracts or manuals more quickly. We explain without jargon how RAG works, when it makes sense and when something simpler will do. We also use an example to show what it costs and what needs to be prepared before launch.

Author: Kacper Włodarczyk, CEO of ALGORCOMPPublished: May 30, 2026Reading time: 11 min readArtificial intelligenceFor: Mid-sized company
RAG for business – how AI answers from company documents and what it costs

What RAG is – an explanation without jargon

An ordinary AI chat answers from what it learned from public texts. It does not know your price list, procedures or supplier contracts. Asked about them, it guesses or answers in generalities.

RAG works like an employee who checks the files before answering. The system first searches the company’s documents for a few passages that match the question. Then the language model – the program that writes the answers – composes an answer from them and points to the source document.

As a result, a new document is available as soon as it is added to the collection. There is no need to retrain the model, and every answer can be checked against its source.

For example, an engineer asks in Microsoft Teams about the permissible dimensional tolerance for a particular product. The assistant finds the right process sheet and gives the value with a link to the document. Our case study of a knowledge assistant for production engineers shows how this works in practice.

When RAG makes sense and when something simpler will do

RAG pays off when people often look for answers in a large collection of documents that change. When there are few questions or only a handful of documents, a simpler solution is enough.

RAG is often confused with further training a model on your own data (fine-tuning). Fine-tuning changes how the model writes, but it does not guarantee that it will give a current fact. For questions about procedures, price lists and contracts, RAG works better, because you only need to swap the document.

The table below helps you match the solution to the situation.

What to choose depending on the situation
SituationWhat to chooseWhy
A few to a dozen or so documents, occasional questionsUploading the files to an AI chat, or a good search engineAll the material fits into a single query to the model
Hundreds or thousands of documents in SharePoint, frequent questions from employeesAn off-the-shelf tool: Microsoft Copilot or an agent in Copilot StudioDocument search is built in and permissions work straight away
Documents in several systems, e.g. the ERP, the document workflow system and a network driveA custom-built solution, e.g. on the Azure AI Search service in the Microsoft cloudThe sources need to be connected and access rules designed
Questions that require calculation, e.g. “how much did we sell in Q3?”A report or data model in Power BI, not RAGRAG searches text; it does not add up tables
The model should adopt the company’s style and vocabulary, not factsFine-tuning the modelRAG supplies knowledge but does not change the way the model writes
RAG for business – how AI answers from company documents and what it costs

What a RAG system is made of

In Microsoft’s off-the-shelf tools, most of these elements work without your involvement. In a custom-built solution, each one is a separate design decision. Below we describe them in the order a document passes through them.

Most quality problems arise in the first two steps. If a table in a PDF is badly converted to text, no model will fix it later.

  • Fetching documents. The system fetches files from SharePoint, drives or other systems and extracts the text. Scans need OCR, which reads text from an image.
  • Splitting into passages. A long document is split into pieces, ideally by chapter. Passages that are too small lose context; ones that are too large blur the answer.
  • Converting text into numbers. Each passage gets a series of numbers describing its meaning (an embedding). This lets the system find passages with a similar meaning even when the question uses different words.
  • Vector database. It stores these series of numbers together with information on where each passage comes from and who may see it.
  • Search. Good systems combine searching by meaning with ordinary keyword search. This matters for catalogue numbers, symbols and abbreviations, such as “KSeF”.
  • Answer. The language model receives the question and the passages found, writes the answer and cites the sources.

Off-the-shelf tool or custom-built solution – comparing the options

For most mid-sized companies working in Microsoft 365, the sensible order is an off-the-shelf tool on one set of documents first, and only then, if needed, a custom build. A custom solution gives more control, but it has to be maintained for years.

The prices in the table are vendors’ list prices from October 2026; for Microsoft, with annual billing. Check the current price list before you decide.

The main ways to run RAG in a company
OptionFor whomHow you payLimitations
Microsoft Copilot with a Microsoft 365 Copilot licenceCompanies that keep their documents in SharePoint, OneDrive and TeamsUSD 30 per user per month; the Business version is USD 21 for organisations with up to 300 usersIt searches everything the user has access to – harder to limit it to “official” documents only
An agent in Copilot StudioAn assistant for one department, e.g. quality or HR, available in TeamsCredits bought for the whole organisation, or pay-as-you-goYou choose the sources, but there are limits on their number and on file size
Azure AI Search and an AI modelMany data sources, custom access rulesA fee for search service capacity plus model usage; there is a free tier for testing (50 MB)Requires developers’ work and ongoing maintenance
The popular PostgreSQL database with the free pgvector extensionCompanies with their own IT team that already use PostgreSQLNo licence fees; you pay for the server and the workMaintenance and security are entirely your responsibility
A cloud vector database, e.g. PineconeCustom-built solutions with a large number of documentsFree plan up to 2 GB; Standard plan with a minimum charge of USD 50 a monthData goes to yet another provider – a data processing agreement (DPA) is needed
An AI assistant searches company documents and answers an employee’s question, citing the source

RAG will not fix an outdated procedure – it will just quote it faster and with more conviction.

What RAG costs – a worked example

Let us show the costs for a hypothetical company that wants to give employees access to 20,000 documents averaging 5 pages. An AI model counts text in tokens, which are fragments of words. Let us cautiously assume 1,000 tokens per page, because Polish text splits into more tokens than English.

The whole collection is therefore 20,000 × 5 × 1,000 = 100 million tokens. At USD 0.13 per million tokens, the one-off conversion into a searchable form costs USD 13, or USD 2 with the cheaper model. You will pay the same again to reprocess everything, e.g. after changing the model.

Questions also need processing, but this costs next to nothing. 200 questions a day of 50 tokens each over 22 working days gives 220,000 tokens, or about USD 0.03 a month.

A bigger item is the model that writes the answers. With each question you send the passages found, e.g. five of 500 tokens each, about 3,000 tokens in total. Per month, that is 4,400 questions × 3,000 = 13.2 million tokens, which you multiply by the current price of the chosen model.

The biggest cost has no price in any price list. It is the time of the people who choose the documents, remove old versions, sort out permissions and check the answers. The table below brings all the components together.

RAG cost components in the hypothetical example (20,000 documents, 200 questions a day)
ComponentWhen you payOrder of magnitude
Converting 100 million tokens of text into a searchable formOnce, and again when the model changesUSD 2–13
Processing questionsMonthlyUnder USD 1
Vector database or search serviceMonthlyFrom a free plan for small collections to capacity-based fees
Model that writes the answersMonthly13.2 million tokens × the model’s price
Licences for an off-the-shelf tool, if you choose one instead of buildingMonthly or annuallyE.g. USD 21 or USD 30 per user per month
Work on documents, permissions and testingAt the start and with every major changeDepends on the state of the documents – usually the largest item

How to prepare documents so the answers are accurate

The quality of answers depends more on the documents than on the choice of AI model. The list below is the minimum worth doing before launch.

These steps are useful even without AI. An ordinary search engine will also search a well-organised set of procedures faster.

  • Choose one collection to start with, e.g. quality procedures or HR regulations, rather than the whole company drive.
  • Remove or mark outdated versions. If the collection holds three versions of the price list, the assistant may quote the oldest.
  • Appoint an owner for the collection – a person responsible for keeping it current who decides what goes into it.
  • Check permissions. Anyone who asks the assistant will see a document that is open to everyone in SharePoint.
  • Fix illegible scans and broken tables. They are a common cause of wrong answers.
  • Add descriptions: effective date, department, document type. They let you narrow the search, e.g. to procedures currently in force.

How to check whether the assistant answers well

Before launch, prepare a set of several dozen questions that employees really ask. For each one, record the answer approved by the owner of the collection.

Assess three things separately: whether the system found the right document, whether the answer matches it, and whether the assistant admits it does not know when the answer is not in the documents.

The last point is the most important. An assistant that says “I could not find this in the documents” is safer than one that always gives some answer. In Copilot Studio, you can switch off answers that are not based on sources.

Repeat the test after every change: a new model, new documents, a different way of splitting the text. Providers regularly retire older models, so you will face such a change sooner or later.

Who sees which documents – permissions and data

The assistant should not show employees more than they can see in their own folders. Microsoft’s off-the-shelf tools check the permissions of each person signed in through Microsoft Entra ID. In a custom-built solution, you have to design and test this yourself.

For services outside Microsoft 365, find out in which region the data is stored and whether the provider uses it to train models. If the documents contain personal data, you need a data processing agreement.

If the assistant is to answer customers, from 2 August 2026 it must tell them they are talking to AI. This is an obligation under Article 50 of the AI Act, not just good practice.

Related topics in the knowledge base

Read next

FAQ

RAG in a company – frequently asked questions

Questions management boards and managers ask after their first conversation about a knowledge assistant.

Does RAG eliminate made-up AI answers?
Not completely, but it reduces them, because the model answers from the passages it is given. Errors happen when the system finds the wrong passage or the documents contradict each other. That is why every answer should include a link to its source.
Can Polish and English documents be in the same collection?
Yes. Current models for converting text into numbers support many languages, so a question in Polish can find an English document. Check this with test questions, though, especially for industry-specific vocabulary.
Will the assistant replace search in SharePoint?
Not entirely. Search is better when you know the file name or want to browse a list of documents. The assistant is better when you need an answer and do not know which document to look in.
Do we need our own server to keep data inside the company?
Usually not. The cloud services of large providers let you choose the region where data is stored, e.g. in the European Union. Your own server makes sense for especially sensitive data, but it also means doing your own maintenance and security.
What should we do when documents contradict each other?
Resolve this before launch rather than relying on AI. The assistant will pick one of the documents, and not always the right one. It is worth passing contradictions found during testing to the owner of the collection as a list to sort out.

About this page

About the author

Kacper Włodarczyk — CEO of ALGORCOMP

Kacper Włodarczyk

CEO of ALGORCOMP

Kacper specializes in implementing Microsoft 365 Copilot, Copilot Studio, Power Platform (Power Automate, Power Apps, SharePoint) and AI agents for mid-sized B2B companies in Poland. He leads dozens of projects covering AI strategy, Power Platform governance, document workflow automation and sales processes. In his writing he focuses on the practical side of AI adoption in organizations — from the first proof of concept to company-wide rollout — with particular attention to data security, compliance (GDPR, NIS2, the AI Act) and return on investment.

Meet the team

Want employees to find answers in documents faster?

In a free consultation, we will identify a starting set of documents, assess whether an off-the-shelf Microsoft tool is enough and tell you what to prepare before launch.

Featured

Related articles