Enterprise RAG Architecture: What You Need Before You Start Building
The six layers a production system needs, why chunking and access rules decide quality, and what it costs.
Co-Founder & Director of Engineering
· 5 min read

On this page · 10 sections
- 01Why the simple version fails
- 02The six layers of an enterprise RAG architecture
- 03Get the access model right first
- 04Where the model fits
- 05Chunking and metadata decide your quality
- 06You cannot skip evaluation
- 07What it costs to build properly
- 08Five questions to settle before week one
- 09A common mistake worth avoiding
- 10Request a RAG architecture assessment
Enterprise RAG architecture looks simple on a whiteboard. Search your documents, pass the results to a model, and return an answer. So far, three boxes and two arrows.
Then you build it for real, and it turns out to be about a dozen boxes. Most of them have nothing to do with the model.
So here is what a production system actually contains, and what you need settled before anyone starts coding.
Why the simple version fails
The three-box demo works beautifully on twenty clean PDFs. It falls apart on twenty thousand mixed files.
In practice, precision drops as the corpus grows. Meanwhile, stale documents compete with current ones. Access rules get ignored. Worse, nobody can tell whether a wrong answer came from bad search or bad reasoning. And there is no way to measure any of it.
The original RAG paper described the pattern back in 2020. Turning that pattern into something a bank or a hospital can run is where the engineer lives.
The six layers of an enterprise RAG architecture
A real enterprise RAG architecture has six layers. Skip one and you will add it later, under pressure.
- Ingestion. Pulling content from SharePoint, Confluence, S3, a CRM, or wherever it lives. This layer handles formats, and it has to run on a schedule so new content appears.
- Parsing and chunking. Turning files into passages. Tables, headers, footnotes, and nested clauses all need specific handling. Split badly here and everything downstream suffers.
- Indexing. Embeddings in a vector store, plus a keyword index. Usually both, because each catches what the other misses.
- Retrieval. Finding the right passages for a question. Crucially, filtered by the user's access rights before anything is returned.
- Generation. The model call, with instructions to answer only from the retrieved text and to cite it.
- Evaluation and monitoring. Knowing whether any of the above still works this month.
Get the access model right first
This is the decision that sinks projects late.
Naturally, your HR files, board papers, and salary data all have different readers. A system that searches everything and answers anyone has become a leak with a chat box on top.
So access rules must apply during retrieval, per user, against the identity system you already run. Filtering results afterwards does not count, because the model has already read the text.
Map your permission model before you design anything else. If those rules live in people's heads, write them down first. Retrofitting access control into a finished system is slow, costly, and sometimes means starting again.
Where the model fits
People assume the model choice is the big decision. Usually it is not.
For document questions, most current models perform similarly once retrieval is good. If your answers are wrong, the cause is almost always the passages you fed in. Swapping models rarely fixes that.
So treat the model as a component you can change later. Keep the interface clean, run your test set against two or three options, and pick on cost and latency rather than reputation.
That said, do plan for change. Models get deprecated on someone else's schedule, and an enterprise RAG architecture that hard-codes one provider will cost you a rewrite.
Chunking and metadata decide your quality
Two unglamorous choices drive most of your accuracy.
First, how you split documents. A 500-token chunk that cuts a clause in half produces a confident answer built on nonsense. Respect structure instead. Keep headings with their content, and keep tables intact.
Second, metadata. Tag every passage with source, date, department, document type, and version. Then your retriever can prefer this year's policy over the 2019 one. Without tags, it cannot tell them apart, and neither can the model.
Hybrid search usually wins in enterprise settings too. Vectors handle meaning, while keyword matching catches part numbers, acronyms, and product codes that vectors blur together.
You cannot skip evaluation
Ask any vendor how they measure quality. A vague answer means they have not shipped one of these.
You need two separate measures. Retrieval accuracy asks whether the right passage was found. Answer quality asks whether the model used it properly. They fail in different ways, so measuring them together hides the real fault.
So build a test set of fifty to a hundred real questions with known answers. Run it before launch, then run it again after every change. Also track how often the system declines to answer, because a model that never says "I don't know" is inventing things.
What it costs to build properly
A focused build over one content set, with one or two integrations, runs three to four months at $40,000 to $60,000.
A full enterprise RAG architecture costs more. Several sources, access-aware retrieval, hybrid search, an evaluation harness, and Slack or Teams delivery put you in the $70,000 to $100,000 band across four to five months. Most of our custom LLM and RAG work sits there.
Then add inference, which grows with use. Add upkeep at 15% to 20% a year as well, since your content keeps changing and retrieval has to keep pace.
Five questions to settle before week one
Answer these and your build gets considerably easier.
- Which content, exactly? Name the sources. Resist indexing everything.
- Which version wins? Most firms hold three copies of the same policy. Pick the real one.
- Who can see what? Document the access rules before design starts.
- What does good look like? Write the test questions now, not after launch.
- Who owns it in month nine? Content drifts and accuracy slips without a named owner.
Our 4-Month AI Framework walks through the same questions, along with the build-versus-buy matrix.
A common mistake worth avoiding
Teams often index everything they own on day one. It feels thorough. It is the fastest way to a bad system.
More content lowers precision. A tight, curated corpus beats a comprehensive mess, every time. Start with one content set that people genuinely ask about, measure how it performs, then expand based on the questions users actually bring you.
Request a RAG architecture assessment
The right enterprise RAG architecture depends on your sources, your access model, and the questions people actually need answered.
Book a 30-minute call with our founders. You will leave with an architecture recommendation, a timeline, an investment range, and an ROI estimate. No sales pitch.
Topics
- Enterprise RAG architecture
- RAG
- Retrieval augmented generation
- Custom LLM applications
Written by
Co-Founder & Director of Engineering
Usman brings 8+ years of experience building enterprise systems. He specializes in system architecture, DevOps, and data pipelines that power production AI.
Work with EdgeFirm
Ship this in your stack in 4 to 5 months.
A 30-minute call with the founders who will write your code. Fixed price, full IP ownership, no offshore handoff.
Book Strategy CallOr get the 4-Month Framework

