RAG System: How It Works, Limits and Costs
· DigifyNow
A RAG system (retrieval-augmented generation) answers questions from your own documents. Up front, it splits manuals, contracts or tickets into chunks and stores them as numeric vectors (embeddings). For each question it pulls the best-matching chunks. Those hits go to a language model together with the question; the model writes the answer and can cite the source. How well this works depends mostly on the search and on whether the documents are clean and current.
What is a RAG system, in simple terms?
A RAG system is a search engine with a language model behind it. RAG stands for retrieval-augmented generation: text generation that is supplemented by looking things up first. A language model like GPT or Claude only knows its training data. It doesn't know your maintenance manual, your price list or the warranty rules you changed last month. So before every answer, the RAG system looks up that content and hands it to the model. Think of it as opening the right binder for a new colleague before they answer a customer's question.
A concrete example: a field service technician types "What does the message 'pump overpressure' mean on a Type B unit?" The system finds the matching page in the manufacturer's manual and two resolved tickets about the same message. The model sums up both in three sentences and cites the manual page and the ticket, so the technician can verify the answer. If the message isn't in any document, the search finds nothing relevant, and a properly configured system says so. In other words, a RAG solution doesn't replace documentation. It makes your existing documentation accessible through questions. How to build that foundation is covered in our article on knowledge base setup and software.

What does RAG do? The two phases of the process
Every RAG system works in two separate phases. The first runs up front and then again whenever the documents change. The second runs every time someone asks a question.
- Loading: Documents are pulled from their sources, such as a file share, SharePoint, the CRM or a ticketing system, and the text is extracted. Scanned PDFs first need text recognition (OCR).
- Splitting (chunking): The text is divided into chunks, ideally along headings and paragraphs rather than a fixed character count. Each chunk carries metadata: source, date, department and who is allowed to see it.
- Embedding: An embedding model converts each chunk into a numeric vector. Chunks with similar meaning end up close to each other in vector space.
- Storing: Vectors and metadata go into an index. That's usually a vector database or a regular database with a vector extension.
- Retrieving: The question is converted with the same embedding model. The system fetches the most similar chunks and filters them by permissions. It often combines this with a classic keyword search and re-sorts the hits (reranking).
- Answering: The question, the hits and an instruction like "answer only from these excerpts, cite the source, say so if nothing fits" go to the language model together. The model writes the answer.
One key point: the model doesn't learn anything. Your documents aren't baked into the model afterwards; they're sent along as context with every question. That's why a change in the manual takes effect right after the next indexing run, with no retraining.
How do a RAG system and AI fit together?
A RAG system usually runs two different AI models. The embedding model translates text into vectors and thereby defines what counts as "similar." The language model (LLM) writes the answer. In between sits ordinary software: ingesting documents, filtering permissions, ranking hits, assembling the prompt and logging the answer. This matters in practice, because most errors happen in that software layer, not in the language model. A stronger model won't make up for bad search results. If it gets the wrong chunk, it writes an answer that sounds convincing and is still wrong.
A RAG assistant is also the usual knowledge source behind a chatbot. How the system prompt, knowledge search and tool calls work together there is explained in the article AI Chatbot: How It Works and Its Limits. On the legal side: if you use such a system in your own business, you are a deployer under the EU AI Act. Under Art. 4, as amended by the amending regulation, deployers take measures to support the AI literacy of their staff. They are not required to guarantee a specific level of literacy. Whether further obligations apply depends on the use case and has to be checked case by case.

Why do RAG systems fail in practice?
Almost every failure of a RAG system can be traced back to a specific point in the chain. The most common causes:
- Scanned PDFs without OCR: To the software, they're just images. The content is missing from the index entirely, and nobody notices until a question comes back empty.
- Broken tables: Price and dimension tables often lose their column mapping when the text is extracted. The model then reads numbers with no context.
- Badly cut chunks: If the condition is in one chunk and the exception in the next, the search may only find one of them.
- Outdated versions: If both the old and the new price list are in the index, the model may answer from the old one. Without a date in the metadata, there's no way to filter it out.
- Missing permission checks: If permissions aren't filtered at search time, a trainee might end up seeing excerpts from payroll records.
- Exact terms: Pure vector search struggles with part numbers, error codes and names. You need keyword search on top.
- Wrong type of question: "How many orders did we have in March?" is a calculation, not a text search. That calls for a query against the ERP or CRM database, not RAG.
On that last point: figures and master data live in structured systems. What's stored there is explained in the articles What is an ERP system and What is CRM. An assistant can query those systems through an API, but that query is no longer retrieval from documents.
What types of RAG systems are there?
"RAG system" describes an architecture, not a product. In practice there are five approaches, which differ in how much you build and run yourself. Chat subscriptions like ChatGPT or Claude let you upload files into projects; see the help pages at support.claude.com. For developers, OpenAI documents a file search feature in its API at developers.openai.com. n8n describes AI and vector store nodes in its documentation at docs.n8n.io. What each plan includes changes regularly, so check the current documentation before you decide.
| Approach | Good fit for | Where it hits its limits | What you control |
|---|---|---|---|
| Chat subscription with file storage (e.g. ChatGPT, Claude) | Individuals or small teams with a manageable set of fixed documents | No automatic sync with your drives, no per-document permissions within a project, little control over chunking and search | Which files get uploaded |
| Cloud API with built-in file search (e.g. OpenAI) | Your own application without running a vector database yourself | Chunking and search follow the vendor's defaults, lock-in to their platform | Interface, permission checks, data ingestion |
| Workflow tool with AI nodes (e.g. n8n) | Prototypes and internal processes that collect documents from several sources | With many sources, permissions and versions, the workflows get hard to follow. Self-hosted, it needs maintenance and backups | Workflow, sources, model choice |
| Open-source frameworks (e.g. LangChain, LlamaIndex) | Development teams that want to customize every step of the chain | Not usable without developers, operations and updates are entirely on you | Everything, including model and storage location |
| Custom development | Many sources, per-document permissions, ERP or CRM integration, your own interface | Highest effort to build and maintain, not worth it for a dozen PDFs that never change | Everything, including how answer quality is evaluated |
If you don't want to hand your data to a cloud provider, you can also run the embedding and language models yourself. The trade-offs are covered in the article Local AI for Business.

RAG assistants from DigifyNow
This section describes our own offering and is not part of the comparison above. DigifyNow builds AI assistants that answer based on a company's documents and systems. We start by clarifying which sources are actually needed and who is allowed to see what. Then come data preparation, search and integration, and finally training for the employees who will use the assistant. What's included is on the page about AI assistants for businesses. If what you need is an automated process rather than a question-and-answer tool, AI automation of workflows is the better fit.
How much does a RAG system cost?
There's no flat price, because costs come from very different places. There's a one-time setup, plus ongoing usage and maintenance. These factors drive the effort:
- Data volume and formats: Clean Word files are ingested quickly. Scans, nested tables and email archives need OCR and dedicated preparation.
- Sources and integrations: Every connected system (file share, SharePoint, CRM, ticketing system) needs its own sync that tracks changes and deletions.
- Permissions: If everyone sees the same thing, it's simple. Per-document permissions have to be carried over from the source systems and checked on every search.
- Model usage: Cloud models usually bill by tokens processed. Every question sends the retrieved chunks along, so costs rise with the amount of context and the number of questions.
- Operations: hosting the vector database, regular indexing runs, logging and model updates.
- Quality testing: a set of real test questions with expected answers that is rerun after every change.
A reliable number is only possible once the sources, data volume, number of users and permission model are settled. How subscription, token and operating costs for AI break down in general is explained in the article AI Costs: Subscriptions, Tokens and Operations.

Is RAG still relevant?
Yes, but where it's used has shifted. Language models today handle much longer contexts than they used to. With a handful of documents, you can often just send everything along and skip the search entirely. That approach has limits, though: thousands of files won't fit in any context window, every question with full context burns a correspondingly large number of tokens, and per-document permissions can't be enforced that way. For that, you still need a search step in front of the model.
At the same time, search is increasingly becoming a tool used by an AI agent. The model then decides on its own whether to search and for what. If the first query turns up nothing, it phrases a second one, and if needed it queries structured systems. One open standard for connecting data sources and tools this way is the Model Context Protocol, documented at modelcontextprotocol.io. The core idea stays the same: retrieve the relevant content first, then answer.
When outside help is worth it
If a team only has a few fixed documents, a chat subscription with file storage is often enough, and you don't need anyone from outside for that. Help pays off when several sources need to be connected, per-document permissions apply, answers need to be verifiable with sources, or the assistant should also pull data from your ERP or CRM. Have these ready: a list of sources with the approximate number of files, a collection of real questions from day-to-day work, and who is allowed to see which documents. In a free initial assessment of your project, we work out which approach fits your data.

Frequently asked questions
What's the difference between RAG and fine-tuning?
RAG sends the model relevant excerpts from your documents with every question; the model itself stays unchanged. Fine-tuning retrains a model on examples, which changes its style or behavior. For knowledge that changes, RAG is the usual route: a new indexing run is enough, and sources can be shown. Fine-tuning is a better fit when the model needs to learn a fixed answer format or a particular tone.
Does a RAG system need a vector database?
Not necessarily a dedicated one. It needs an index in which embeddings and metadata can be searched. That can be a specialized vector database, an existing database with a vector extension, or storage that a cloud provider supplies with its file search. With very few documents, you can even skip search altogether and put everything directly into the context.
Can a RAG system run fully on-premises?
Yes. All the building blocks, meaning OCR, embedding model, index and language model, are also available as self-hosted software. In that case, the documents never leave your own network. The server for the language model usually needs a powerful GPU. Updates, backups and monitoring are then your responsibility rather than the cloud provider's.