Retrieval-augmented generation (RAG) is the technique that lets an AI assistant answer questions from your documents — policies, contracts, manuals, tickets, product specs — instead of from whatever it absorbed during training. Before answering, the system searches your content, finds the relevant passages, and instructs the model to answer using only those passages, with citations. It is the standard architecture behind almost every serious "chat with our knowledge base" product, and a production version typically costs $20,000–$80,000 to build.
That's the definition. The rest of this article covers what decision-makers actually need: how it works without the jargon, what drives the cost, the three places RAG projects genuinely fail, and the limits no vendor pitch will volunteer.
The Problem RAG Solves
A language model on its own has two flaws that make it unfit for business Q&A. First, it knows nothing about your company — your pricing, your policies, your customers. Second, when it doesn't know something, it doesn't say so; it produces a fluent, confident, wrong answer. That behavior is fine for drafting a marketing email and disastrous for telling a customer what your warranty covers.
RAG fixes both by changing the model's job. Instead of "answer from memory," the job becomes "answer from these passages we just handed you, and say so if they don't contain the answer." The model stops being an oracle and becomes a very good reader.
How RAG Works, in Plain English
Think of it as an open-book exam with a librarian:
- Indexing (done once, updated continually). Your documents are split into passages ("chunks") and stored in a search index that matches by meaning, not just keywords — so "can I get my money back" finds the refund policy even though it shares no words with it.
- Retrieval (every question). When a user asks something, the system pulls the handful of passages most relevant to the question.
- Generation (every question). Those passages are placed in front of the language model with the question and strict instructions: answer from these sources, cite them, and admit when they don't cover it.
The critical business implication: the knowledge lives in the index, not the model. Update a policy document tonight, and tomorrow's answers reflect it. No retraining, no vendor ticket. This is exactly why RAG — not fine-tuning — is the right tool for company knowledge.
What a RAG System Costs to Build
Across the projects we scope, production RAG builds cluster into three tiers:
| Tier | Scope | Typical cost | Timeline |
|---|---|---|---|
| Pilot | One clean document set (few hundred docs), internal users, basic citations | $15K–$30K | 4–6 weeks |
| Production | Multiple sources (wiki, tickets, PDFs), permissions, evaluation suite, monitoring | $30K–$80K | 8–14 weeks |
| Enterprise | Millions of documents, per-user access control, compliance/audit, self-hosted models | $80K–$200K+ | 3–6 months |
Ongoing running costs for most mid-market deployments land at $500–$3,000/month — model API usage, the search index, and hosting.
What actually moves the number, in order of impact:
- Document quality and format. Clean HTML and Markdown are cheap to ingest. Scanned PDFs, tables, spreadsheets, and 15 years of duplicated, contradictory SharePoint files are where budgets go to die.
- Access control. If HR docs must be invisible to non-HR staff, the retrieval layer needs to respect permissions per user. This routinely adds 20–40% to a build and is required for most internal deployments.
- Evaluation rigor. A test suite of real questions with verified answers — the thing that separates a demo from a product — adds cost up front and saves multiples of it after launch.
- Volume and freshness. Millions of documents, or sources that change hourly, push infrastructure and pipeline complexity up a tier.
Notice what's not on the list: the AI model. Model choice is a swappable line item; data readiness is the project.
Where RAG Projects Fail
RAG demos are easy; RAG products are not. The failure modes are consistent enough that we check for all three before quoting any AI integration project.
1. Garbage in the index
The system retrieves the "best matching" passage — and it's a 2019 pricing sheet, a draft policy that was never approved, or one of four contradictory versions of the same procedure. The model then writes a beautifully cited wrong answer. No retrieval algorithm fixes contradictory sources; only content curation does. Plan for a real content audit before indexing, and read why data quality decides AI success before believing any demo.
2. Bad chunking
How documents are split into passages sounds like a trivial detail and quietly determines answer quality. Split a refund policy mid-table and the model retrieves half a rule. Chunk too small and answers lack context; too large and retrieval gets vague and costs balloon (you pay per token for every retrieved passage, every query). Getting chunking right for your document types — contracts vs. tickets vs. manuals need different treatment — is exactly the unglamorous engineering that separates experienced teams from tutorial-followers.
3. No evaluation
Most failed RAG projects were never actually measured. The team eyeballed ten answers, they looked plausible, it shipped — and users discovered the 20% failure rate in production. A serious build maintains a suite of 100+ real questions with verified answers, scores every pipeline change against it, and tracks accuracy after launch. If a vendor can't describe their evaluation process, that's your answer about the rest of their process.
The Honest Limits of RAG
RAG is the right default for knowledge access, and it is not magic. Set these expectations before you fund a project:
- It won't reach 100% accuracy. Well-built systems on clean corpora reach 85–95% on evaluation sets. That's transformative for support deflection and internal search — and it means human escalation paths are mandatory, not optional. Design them in, as we describe in customer support automation done right.
- It answers questions; it doesn't reason across the whole corpus. "What does our parental leave policy say?" — excellent. "Analyze all 5,000 contracts and find our aggregate liability exposure" — that's a data pipeline and analytics problem wearing a chatbot costume, and it needs different architecture.
- It inherits your documentation's flaws. If the answer isn't written down anywhere, RAG cannot produce it. Some "AI projects" are actually documentation projects, and it's cheaper to know that up front.
- Freshness isn't free. "Fresh as your index" only holds if ingestion pipelines actually re-index on change — that automation is part of the build, not an afterthought.
- It's overkill for small corpora. Under a few hundred pages of stable content, stuffing documents directly into a large context window with good prompting may hit the same accuracy for a fraction of the cost. We cover that decision in the LLM integration guide.
Frequently Asked Questions
What is retrieval-augmented generation in simple terms?
RAG is a way of connecting an AI model to your company's documents. When someone asks a question, the system first searches your content for the most relevant passages, then has the model answer using only those passages — with citations. It's an open-book exam instead of answering from memory, which makes answers current, traceable, and far less prone to hallucination.
How much does a RAG system cost to build?
A focused pilot over one clean document set runs $15,000–$30,000. A production system with multiple sources, user permissions, and proper evaluation typically costs $30,000–$80,000, and large enterprise deployments run $80,000–$200,000+. Ongoing costs are usually $500–$3,000/month. Document quality is the biggest cost driver — messy source content can double a budget.
Is RAG better than fine-tuning?
They solve different problems. RAG gives a model access to knowledge — current, citable, updatable. Fine-tuning teaches a model behavior — style, format, a narrow skill — but does not reliably teach facts. For "answer questions about our business," RAG is almost always the right choice; some mature systems layer both.
Does RAG stop AI hallucinations?
It reduces them substantially but doesn't eliminate them. Grounding answers in retrieved text and instructing the model to admit gaps gets well-built systems to 85–95% accuracy on evaluated question sets. The remaining risk is managed with citations users can check, confidence thresholds, and human escalation for high-stakes answers.
Can RAG work with our existing tools like SharePoint, Confluence, or Zendesk?
Yes — ingesting from standard business systems is routine, via their APIs, and connectors for common platforms are well-trodden. The real work is deciding what should be indexed (excluding drafts, duplicates, and stale content) and mirroring your permission model so users only get answers from documents they're allowed to see.
Related Reading
- Fine-Tuning vs RAG: Which Does Your AI Project Need?
- LLM Integration: A Practical Guide for Business Applications
- Why Data Quality Decides AI Success
Thinking about a knowledge assistant over your own documents? Our AI & machine learning team builds and evaluates RAG systems end to end — get in touch and we'll tell you honestly whether your data is ready.
