A RAG architecture connects two workflows. In the first, your sources are read in under control, and in the second, the system answers individual questions with relevant information that the person asking is allowed to see. Between them sit the searchable content, the metadata, meaning extra details such as version or validity, and the access rules. A good design does not only show databases and models. It also shows who is responsible, how current each source is and what happens when information is missing.
An example: a manufacturer of ventilation systems in Tarragona has 45 employees, ten of them service technicians in the field. The maintenance instructions are stored as PDFs on a shared drive, some in several versions. Montse from technical documentation maintains these instructions. Today, a technician calls her when he is standing in front of a unit and does not know which version applies. In future, a knowledge assistant should answer this question with a reference to the right section.
Key takeaways
- For a first assistant, a modest setup is usually easier to check. Additional building blocks should close a gap you have demonstrated.
- Documents that someone may not see should not reach the model in the first place.
- If an answer is wrong, first find out whether retrieval or the writing of the answer failed.
- The setup is enough when it fulfils the agreed task reliably and in a way you can check.
For an initial company assistant, a modest architecture is usually easier to evaluate. Start with a clear task, an approved collection of sources and test questions you can repeat. Additional retrieval stages or autonomous tools should address a demonstrated gap. They are not prerequisites for calling the design RAG.
01 / 17
Derive the design from the task
First state what the assistant must do for its task to count as complete. Should the assistant find a section in an instruction manual, combine several documents or explain a current state from a program? These tasks need different paths to the information. If a technician wants to know whether a replacement filter is in stock, he needs a live inventory query. A document index is not a substitute for it.
Also record who asks, which sources are allowed, how current the answers must be and what a wrong answer causes. An internal assistant for manuals can work with different boundaries from an application whose answer triggers an approval. These differences influence how you identify users, how you evaluate and when a person takes over.
A reference architecture helps you identify the building blocks but does not replace your own selection. Google, for example, shows a managed RAG design with retrieval and model services (
Google: RAG reference architecture). That does not mean every small company needs the same infrastructure.
02 / 17
Path one: how does an original source become an approved search collection?
The first path brings Montse's instructions into the assistant. It runs through these steps:
- Ingestion begins with a clearly identified source, such as the folder with the maintenance instructions.
- A connector, meaning a connecting program, collects content and metadata under a defined technical identity, such as a dedicated account.
- Extraction converts the original format, for example a PDF, into usable text or structured data.
- The application then forms suitable passages and, where needed, numerical values for retrieval.
Before a document becomes active in the assistant, at least its source identity, version, validity and the question of who may see it must be settled. Documents that were not read completely need a recognisable state. An empty extraction result is not successfully processed business knowledge. If a scanned data sheet produces no text, for example, it has not been processed successfully, even if no error was reported.
This path runs whether or not anyone is asking a question. Its failures can therefore stay unnoticed for a long time if monitoring covers only the chat window. For each source, track the last state that was read in completely and successfully, and how far it lags behind required changes.
03 / 17
Path two: how does a question become a supported answer?
The second path starts when a technician asks: "How do I change the filter on the type A unit?" It runs through these steps:
- The application authenticates the person asking, meaning it checks who they are, and determines the area in which it may search.
- It may prepare the question for retrieval, for example by recognising a product code or clarifying an unclear time reference. This preparation must not silently change the user's task.
- It then searches for suitable passages, optionally reorders them and assembles a bounded context from them.
- The model receives the selected information together with the instruction to write an answer.
- The answer should contain the relevant statements, the source and understandable limitations.
Checks after the answer can validate formatting, source attribution or prohibited actions. They do not replace the access control before. Restricted documents should be blocked before they reach the model, not removed from an answer after generation.
04 / 17
Which fields does a RAG search object need?
For each search object in a RAG index, for example a passage from Montse's instructions, we propose these fields as the minimum:
| Field | Why it matters |
|---|---|
| Document and chunk identity | Associate and remove content reliably |
| Text with necessary context | Preserve meaning and exceptions |
| Source and section | Generate inspectable evidence |
| Version and effective period | Distinguish current and historical questions |
| Audience and organizational scope | Limit access |
| Processing version | Trace extraction and indexing changes |
| Activation state | Exclude drafts, blocked and incomplete objects |
This is a proposed minimum contract, not a universal database schema. Further fields follow from the task. A complex classification that is not actually needed for filtering or checking creates more maintenance work without necessarily improving the answers.
Stable relationships between the parts matter. When Montse replaces an instruction manual with a new version, the application must know all passages and other derivatives that came from the old version. A filename alone is often not enough for this, because it can change or be reused.
05 / 17
Retrieval and context assembly are separate decisions
Retrieval should find suitable passages. Context assembly decides which of them actually reach the model and how they are arranged. Many hits are therefore not automatically a good basis for the answer.
A classic text search can help find exact terms such as a type number. A semantic search can connect different wording, such as "swap the filter" and "filter change". Azure documents the combination of both approaches as hybrid search (
Azure AI Search: hybrid search). Whether hybrid search works better for your documents needs to be shown by your own set of test questions.
Limit repetition and keep important neighbouring passages. Ten similar passages from the same old manual should not push out a current exception. The context needs the different relevant pieces of evidence, not the largest possible token count.
06 / 17
An illustrative service-manual trace
In this example, Montse's maintenance instructions describe the filter change on the type A unit. The instructions have an approved version, a section with the working steps and, right next to it, a note that the unit must be shut down first. An older version remains available for historical questions, such as questions about earlier work.
A technician who is allowed to see the instructions asks for today's procedure. The application filters by unit type, valid version and his access rights and passes the working steps and the shutdown note to the model together. The answer names the necessary prerequisites and links to the relevant section.
If extraction loses the shutdown note, the test should fail, even if the remaining steps look correct. The system must not improvise binding maintenance guidance from general model knowledge if the source is unavailable. The example shows how the architecture should work, not an equipment test that was actually carried out.
07 / 17
Which source states and answer outcomes should RAG distinguish?
Distinguish at least these source states in a RAG collection:
- new
- processing
- reviewed
- active
- blocked
- deleted
Not every business needs the same names for them. What matters is a clear rule for when a document becomes active. A failed import must not accidentally overwrite the last valid version.
The assistant's answers also need distinct outcomes:
- answered
- clarification required
- insufficient evidence
- conflicting sources
A single generic error text for all cases makes both use and operations harder. The technician needs to know whether he should ask more precisely or whether there simply is no instruction.
Also decide when an older version may be used. For general background information, a labelled older state may be acceptable, while revoked access or withdrawn safety instructions may require blocking. The architecture must be able to carry out this decision.
08 / 17
Preserve authorization across the whole path
The technical account that reads in the documents and the person who asks have different purposes. Such a service account may collect many documents, including some that not all users may see. At the ventilation manufacturer, for example, it also reads the price calculations, which the technicians should not see. How your IT team solves this technically is in the section "For your IT team".
Also think about caches, logs and conversation history. A correctly filtered new search does not help if an earlier answer is passed on to a person whose access has since been revoked. The SharePoint guide makes this boundary concrete for one source system.
Got a workflow like this?
Tell me about it. Honest take and a rough price, usually within a day.
09 / 17
Separate actions from knowledge
A knowledge assistant does not automatically need to act itself. If it is only supposed to answer questions, a read-only setup can be enough. That keeps many potential side effects outside the system.
If you add tools later, for example so that the assistant creates a maintenance order, each action needs its own check of identity, destination and details. A retrieved document can explain a process but cannot grant additional permissions. Treat external links and imported instructions in particular as source content.
Draw the path of an action separately. It consists of the proposed action, the check, a human approval where required, the execution and the confirmed result. A success message written by the model does not prove that anything actually changed in the authoritative system.
10 / 17
Monitor a few useful signals
For each request, record an identifier, the source versions used, the retrieval result, the answer status and the relevant timings. Store sensitive content only as far as needed for the agreed purpose, and with appropriate access rights. You do not need to record everything permanently to troubleshoot usefully.
Separate retrieval failures from failures in the answer. Suppose a technician reports a wrong answer. If the right section of the manual was not found at all, inspect the source, extraction and retrieval. Otherwise, inspect how the answer was built and how it was evaluated. This separation shortens troubleshooting and avoids unnecessary model replacement.
Look beyond averages to slow and failed requests. A system can be fast on average and become unusable precisely for important questions with several parts. So evaluate the task categories separately.
11 / 17
Deploy changes without silent regression
When you change something in the assistant, check the new configuration against the same recorded set of test questions as before. For significant index changes, it can make sense to build the new state in parallel and switch over under control. Plan the way back, including the question of which data has changed since the old state.
A way back must not reactivate rights that have since been revoked. So separate returning to an earlier technical configuration from returning to obsolete permissions. The current security boundary remains authoritative. What your IT team should version is in the section "For your IT team".
12 / 17
Choose deployment responsibilities explicitly
For every building block, decide who handles failures and changes. A managed search service takes some infrastructure work off your hands, but it does not appoint anyone to be responsible for the content. At the ventilation manufacturer, that stays with Montse. A custom model endpoint, meaning your own interface to a model, does not take responsibility for faulty document extraction either.
Think about backup, restoration and access to the operating records. Your team should be able to restore the service without depending on an undocumented account or one person's memory. Keep the design proportional to the task, but record the essential responsibilities explicitly.
13 / 17
How do you review the architecture before wider use?
Ask a subject specialist, such as Montse, to trace an answer back to the original source. A technical person traces the same path through import, index and request. Both should be able to explain why this particular source was used and another was excluded.
Also test what happens when a document is deleted, when access is revoked, when a source fails, with conflicting versions and with a manipulated instruction inside a document. Record which building blocks you obtain as a managed service and which your team operates itself. Every failure needs an accountable owner who can be reached.
The architecture is sufficient when it fulfils the agreed task reliably and inspectably. It need not anticipate every conceivable future capability. The RAG acceptance plan connects this technical review with business results. The cost guide covers the effort of ongoing operation.
14 / 17
Record component decisions explicitly
For every additional building block, note which requirement it meets and what the simpler alternative would be. A reranker, meaning a program that reorders the passages found, may, for example, improve their ordering. But if the real problem is missing sources, it is not a targeted investment. A separate vector store may be useful, but must be justified against the retrieval or database technology you already have.
Also record what happens in a failure, for example whether the application can still show links to the sources when answer generation is unavailable and whether it can block one affected collection without switching off all other areas. Such bounded fallback paths are often more practical than duplicating every building block. Whether they fit depends on the actual task and on the risk of showing incomplete information.
15 / 17
For your IT team
Check whether the connection to the source uses delegated rights or needs separately maintained permission metadata. Azure documents several mechanisms for document access with different prerequisites (
Azure AI Search: document permissions). Native capabilities, preview features and application-managed filters are not interchangeable guarantees.
Version the prompt, extraction method, embedding model and retrieval settings where they affect the result. Changing the numerical representation used for retrieval, such as the embeddings, may require a new index. Do not mix old and new vectors without validating compatibility.
16 / 17
Take the worksheet
Worksheet
Download the editable CSV table
| Layer | Job | Retained metadata |
|---|---|---|
| Source | Authoritative document | Owner, version, validity |
| Preparation | Text and structure | Original and page location |
| Index | Retrieval | Document ID and access attributes |
| Search | Allowed relevant matches | User context |
| Answer | Supported explanation | Citations and limits |
| Operation | Changes and failures | Deletion and review state |
Columns to fill in, in the file: Your value / observation, Owner, Next action.
Download the editable CSV table (CSV). Add your own values, owners and open actions. This worksheet contains no measured client results.
17 / 17
Related decisions
These modernagents guides cover related decisions about AI knowledge assistants:
- AI knowledge assistants: sources, access and answers
- Prepare PDFs, scans and tables for RAG
- Split RAG content without losing its meaning
- Improve RAG retrieval with hybrid search and reranking
For a workflow review, start with the task, systems involved and typical exceptions. Discuss it with modernagents.



