RAG Architecture for Business Data: Components and Design Decisions
RAG Architecture for Business Data: Components and Design Decisions Retrieval-augmented generation (RAG) is a pattern in which a language model answers from documents your system retrieves at query time instead of from what it memorized in training.
RAG Architecture for Business Data: Components and Design Decisions
Retrieval-augmented generation (RAG) is a pattern in which a language model answers from documents your system retrieves at query time instead of from what it memorized in training. Stanford HAI describes it as retrieving relevant facts from a specific knowledge source, such as a company’s internal documents, before the model generates a response. The model is the easy part. Whether answers are grounded and trustworthy is decided by the pipeline around it: how documents are parsed and chunked, how permissions travel with the content, how candidates are found and ranked, and how you measure each step. This article walks through those components and the decisions inside them. At Ridiculous Engineering, we build custom AI workspaces and knowledge assistants on exactly this kind of architecture, so the tradeoffs below are the ones we work through with engineering and product leaders.
Key Takeaways
- A production RAG system is a set of pipelines, not a model call: ingestion, retrieval, generation and ongoing maintenance each fail in different ways.
- Most bad answers trace back to data quality and retrieval, not the language model. Fix parsing, chunking and ranking before touching prompts.
- Permissions must be enforced at retrieval time, before content reaches the model. The model cannot be trusted to keep secrets.
- Evaluate retrieval and generation separately, against acceptance criteria you set from your own questions.
- Use RAG for knowledge that changes; reserve fine-tuning for stable behavior such as tone and output format.
Table of Contents
- How data flows through a RAG system
- Ingestion: where most answer quality is decided
- Retrieval: finding the right chunks
- Permissions: the decision you cannot retrofit
- Generation: keeping answers grounded
- Evaluation: measure each step, not just the answer
- RAG or fine-tuning?
- Where RAG fits in the business
- Sizing and operating the system
- Building it with Ridiculous Engineering
- FAQ
- Sources
How data flows through a RAG system
The basic loop is short. NVIDIA’s glossary describes it this way: the user’s query is encoded into a vector, the system searches for semantically similar data, the most relevant results are added to the model’s context, and the response is generated from that material. No retraining is involved.
A vector (also called an embedding) is a list of numbers an embedding model produces so that text with similar meaning lands close together. That is what lets a search for “parental leave” find a document titled “family absence policy.”
An enterprise system wraps that loop in more machinery. AWS Prescriptive Guidance lists what a production-level system needs: connectors to enterprise data sources, data processing, embeddings, a vector database, a retriever that ranks by business requirements, a foundation model, guardrails, an orchestrator that manages the workflow, a conversational interface, and fine-grained identity and user management.
It helps to think of three pipelines with different operating profiles:
| Pipeline | What it does | How it runs |
|---|---|---|
| Indexing | Parses, cleans, chunks, embeds and stores documents with metadata | Bulk or scheduled jobs |
| Retrieval and generation | Searches, ranks, filters, builds the prompt, produces the answer | Continuously, at query latency |
| Maintenance | Propagates edits and deletions, syncs permissions, re-embeds on model change | Incrementally, triggered by change |
Teams that budget only for the first two discover the third in month four, when the assistant starts quoting a pricing sheet that was replaced in the spring.
Ingestion: where most answer quality is decided
Microsoft’s Azure RAG design guide describes the data pipeline: documents arrive by push or pull, each file is chunked into semantically relevant parts, enriched with metadata such as title, summary and keywords, embedded, and stored in a search index. Each of those steps is a decision.

Source connectors and freshness
Decide up front which systems are authoritative: the wiki, the contract repository, the ticketing system, the CRM. Connect those, not a shared drive full of drafts. A retrieval system cannot tell a superseded policy from the current one unless you give it a signal, such as a version, an effective date or a status field. Treat deletes as seriously as adds: a document removed at the source must disappear from the index.
Parsing
Business data is rarely clean text. Scanned PDFs, tables, slide decks and email threads all lose structure when naively extracted, and a table flattened into a stream of numbers is useless to retrieve. If your corpus is document-heavy, parsing deserves its own design pass. We cover the extraction side in our guide to AI document processing.
Chunking
Chunking splits documents into pieces small enough to retrieve precisely and large enough to make sense alone. Too small and a chunk loses the sentence that gives it meaning. Too large and the retriever returns a page of noise around one useful line. Splitting along the document’s own structure (headings, clauses, sections) usually beats fixed character counts, and attaching the parent title to each chunk keeps it interpretable. Microsoft’s guidance also notes that the metadata stored with chunks is what allows citations later, so keep source, section and URL on every chunk.
Metadata
Metadata is the cheapest quality lever in the system. Owner, document type, effective date, product line, region and access level all let you filter before you rank. Decide the schema before you index, because adding a field later means reprocessing the corpus.
Retrieval: finding the right chunks
Microsoft’s enterprise AI search documentation breaks query time into steps: process the query, retrieve candidates by keyword, vector or hybrid search, rank them, refine, then generate. Three decisions matter most.
Vector, keyword or hybrid
Pure vector search is good at meaning and weak at exact strings. Business data is full of exact strings: part numbers, contract IDs, acronyms, internal product names. A keyword index handles those well, which is why hybrid retrieval, combining semantic and lexical matching, is the usual production default. If your content leans on specialized vocabulary, it also pays to write source pages so the terms appear plainly; this walkthrough on rewriting content for vector search shows how relevance shifts when wording changes.
Reranking
First-pass retrieval is built for speed and returns a rough candidate set. A reranker is a second model that reads the query and each candidate together and reorders them by actual relevance. It adds latency, so set a budget: retrieve a generous top 50 or so, rerank, and pass only the best handful to the model. Fewer, better chunks also reduce the chance the model blends two conflicting sources.
Query handling
Users type fragments, pronouns and follow-ups: “what about for contractors?” An orchestrator can rewrite the question into a standalone query using the conversation so far before searching. It is a small step that fixes a surprising share of multi-turn failures.
Permissions: the decision you cannot retrofit
If your assistant can answer from HR files, board decks and customer contracts, it must answer each person only from what they may already see. OWASP’s RAG Security Cheat Sheet calls access-control inheritance the most common compliance failure in enterprise RAG: classification levels, department restrictions and role-based access must carry through to the embedded chunks, and checks must be enforced at retrieval time, not just at ingestion.
The design consequences are concrete:
- Store permissions with every chunk. The source system’s access rules become metadata in the index.
- Filter before ranking. If the store returns unauthorized chunks and the application discards them afterward, sensitive text has already moved through your pipeline. Narrow the candidate set by the user’s identity first.
- Never rely on the model to withhold. Access must be enforced before content reaches the language model.
- Log every retrieval with the user’s identity and the chunks’ access metadata, so audits can reconstruct who saw what.
- Sync permission changes. When someone leaves a group, the index has to learn about it. This belongs to the maintenance pipeline.
Retrieved text is also an attack surface. A document can contain instructions aimed at the model. Treat retrieved content as untrusted input when building the prompt; we go deeper in our guide to prompt injection defense.
Generation: keeping answers grounded
By this point, generation is mostly discipline. The prompt places retrieved chunks in the model’s context along with the question, and instructs the model to answer only from them. A few practices carry the weight:
- Require citations. Each claim points to a chunk, which links to the source document. Users verify in one click, and your team can debug in one click.
- Allow “I don’t know.” If retrieval returns nothing relevant, the right output is a refusal that says so, not a fluent guess. Set a relevance threshold and route below-threshold queries to a fallback.
- Keep the context tight. More chunks is not more grounding.
- Separate instructions from content in the prompt so retrieved text is never mistaken for directives.
Note the pairing with the AWS HR example: AWS’s explainer describes a chatbot answering a leave question by retrieving the leave policy plus the employee’s own leave record. That is retrieval from unstructured documents and structured records together, and it is a good model for business assistants: the answer is personal, current and traceable.
Evaluation: measure each step, not just the answer
Microsoft’s Azure guide recommends a structured evaluation process, with each step evaluated independently against acceptance criteria you set, while remembering that the end result is what users experience. In practice:
- Build a test set from real questions. Collect 50 to 200 questions your users actually ask, each paired with the document passage that answers it. Involve the people who know the right answers.
- Score retrieval alone. Did the right chunk appear in the top results? If not, the fix is in parsing, chunking, metadata or ranking, and no prompt change will help.
- Score generation alone. Given the right chunks, is the answer faithful to them and does it address the question?
- Rerun on every change. A new embedding model, chunk size or prompt can help one question type and hurt another. The test set is how you find out before users do.
Separating the scores turns “the AI is wrong sometimes” into a specific failing component. That is the difference between a demo and something an operations team can run.
RAG or fine-tuning?
This is the most common question leaders bring, and the two are not rivals. Intel’s explainer notes that RAG lets organizations inject their own data into language models without retraining or fine-tuning. That fits knowledge that changes: policies, product documentation, pricing, procedures. An index update is cheaper than a training run, and RAG gives you source attribution and per-user access control that fine-tuned weights cannot.
Fine-tuning suits stable behavior: a consistent tone, a structured output format, a classification task. Many systems combine them, using RAG for facts and a tuned model for style. If your content changes monthly and users need citations, start with RAG.
Where RAG fits in the business
The strongest use cases share a profile: a large body of internal text, frequent change, and people who currently lose time searching it. NVIDIA’s enterprise RAG sizing guide models a reference deployment over email, meeting notes, PDFs and markdown, supporting summarization, meeting recap, research report review and multi-turn conversation. Common patterns include internal knowledge assistants for policies and procedures, support teams answering from product documentation and ticket history, and sales or proposal teams drafting from past contracts and case material.
A useful screening question: can you name the documents a correct answer would come from? If yes, RAG is a strong fit. If the answer requires reasoning across data no document states, you need analytics or a different design.

Sizing and operating the system
Plan for the three operating profiles separately. Indexing is bulk compute you can schedule off-hours. Retrieval is a latency-sensitive service sized for peak concurrent users; NVIDIA’s reference sizing uses 1,000 users at 10% concurrency, or 100 simultaneous requests, as its working example, which is a useful way to frame your own estimate. Maintenance is the quiet one: change propagation, re-embedding when you swap models, and drift checks as the corpus evolves. Name an owner for each. Systems fail in the gaps between teams, and a RAG system touches data engineering, security and the product team at once.
Whether you assemble this yourself or bring in a partner is a separate question; we compare the options in RAG as a service vs in-house.
Building it with Ridiculous Engineering
We design and build custom AI workspaces and internal knowledge assistants, scoped to your data, your systems and your permission model. These engagements are scoped separately, with pricing on request. Clients work directly with senior engineers from discovery through long-term improvement. If you want the architecture above applied to your own corpus, see our AI development and automation services and request a quote.
FAQ
What is the minimum architecture for a business RAG system?
At minimum you need ingestion with chunking and metadata, an embedding model and index, a retriever, a model with a grounded prompt, and a way to evaluate. Add permission filtering and logging before any sensitive data goes in. Those two are far cheaper to design early than to retrofit.
Why do RAG systems hallucinate even with good documents?
Usually because the right chunk was never retrieved, or the model received conflicting or irrelevant chunks. Score retrieval separately from generation to find out which. Citations and a relevance threshold that triggers “I don’t know” prevent most confident-sounding guesses.
How do you keep a RAG system current?
Treat maintenance as its own pipeline. Propagate document edits and deletions to the index, sync access-control changes, and re-embed when you change embedding models. Version or date fields in metadata help the retriever prefer current documents.
Can RAG respect who is allowed to see what?
Yes, if permissions are stored as metadata on each chunk and enforced at retrieval time, before content reaches the model. Logging each retrieval with the user’s identity supports audits.
Sources
- What is RAG? | Stanford HAI
- What is Retrieval-Augmented Generation? | NVIDIA
- Understanding Retrieval Augmented Generation | AWS Prescriptive Guidance
- Design and Develop a RAG Solution on Azure | Microsoft Learn
- What is enterprise AI search? | Microsoft Azure
- RAG Security Cheat Sheet | OWASP
- What is RAG? | AWS
- What Is RAG? | Intel
- Enterprise RAG Retrieval sizing guide | NVIDIA
- Vector Search SEO