DeadlinesE-Invoicing by Dec 31, 20262026 Computerized Books in ORUS by Jan 30, 2027E-Invoicing Dec 31 · ORUS Jan 30

Check Readiness
TechNext

Enterprise RAG implementation guide: architecture, steps and best practices

RAG lets an AI assistant answer from your own documents instead of from memory. This guide explains how an enterprise RAG system is built, where it usually goes wrong, and how to tell if it is working.

By TechNext · · Updated · 8 min readTechNext & Odoo

Key takeaways

  • RAG (retrieval-augmented generation) finds the relevant passages in your documents first, then asks the AI model to answer using only those passages, with citations.
  • An enterprise RAG system has more parts than a demo: ingestion, chunking, embeddings, a vector store, retrieval and reranking, generation, access control, evaluation and monitoring.
  • Most failures come from retrieval, not the model: messy source files, poor chunking, missing keyword search, or stale content.
  • The assistant must respect each user's access rights. If someone cannot open a document, the AI should not quote it to them.
  • Measure quality with a fixed set of real questions and check answers against sources before and after every change.

What RAG is, in plain words

A large language model (LLM) knows a lot about the world, but it knows nothing about your price list, your HR policy or last month's supplier contract. If you ask it anyway, it may guess, and a confident guess is worse than no answer.

Retrieval-augmented generation fixes that with a simple idea. Before the model answers, a search step pulls the most relevant passages from your own documents. The model then writes its answer from those passages and points to where each fact came from. The approach was described in the 2020 paper Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (Lewis et al., NeurIPS 2020), which paired a language model with a searchable index of documents.

For a business, that means three practical benefits:

  • Answers come from your sources, not from the model's general memory.
  • Every answer can show citations, so staff can check the original.
  • Updating knowledge is cheap: change the document and the index, with no model retraining.

Enterprise RAG architecture: the reference parts

A weekend demo needs a few files and a chatbot. A system your team relies on every day needs each of these parts, and each one affects answer quality.

  1. Ingestion. Connectors pull content from where it lives: shared drives, wikis, PDFs, email archives, your ERP. Text is extracted, tables are kept readable, and each item keeps its metadata (owner, date, department, who may see it).
  2. Chunking. Long documents are split into passages. Too small and a chunk loses its meaning; too large and it carries noise. Splitting on headings and sections usually beats cutting every few hundred words.
  3. Embeddings. An embedding model turns each chunk into a list of numbers that captures its meaning, so "annual leave" and "vacation days" land close together.
  4. Vector store. A database built to search those numbers quickly, alongside the chunk text and its metadata.
  5. Retrieval and reranking. The user's question is matched against the index. Good systems combine meaning-based search with keyword search, then use a reranking model to keep only the best passages.
  6. Generation with citations. The model gets the question plus the selected passages, with instructions to answer only from them, cite them, and say "I don't know" when the sources do not cover it.
  7. Access control. Permissions are checked at retrieval time, so a user only ever gets passages from documents they are allowed to open.
  8. Evaluation. A test set of real questions with known good answers, run after every change.
  9. Monitoring. Logs of questions, sources used, user feedback, cost and response time, so you can see what is failing in real use.

How to build it, step by step

  1. Pick one use case and one audience. "Sales staff asking about product specs and pricing rules" is a good start. "Everything for everyone" is not.
  2. Collect 50 to 100 real questions from the people who will use it, and note where the right answer lives. This becomes your test set.
  3. Clean the sources. Remove duplicates and outdated versions, and decide which document is the official one when two disagree.
  4. Build ingestion with metadata and permissions from day one. Adding access control later is much harder.
  5. Choose chunking, embeddings and search settings, then test them against your question set before writing any chat interface.
  6. Write the answer instructions: stay inside the sources, cite them, admit gaps, and use your company's terms.
  7. Pilot with a small group, collect thumbs up and thumbs down, and fix the misses.
  8. Roll out, then keep the index fresh with scheduled re-syncs, so new and changed documents show up and deleted ones disappear.

RAG implementation best practices

  • Use hybrid search. Meaning-based (embedding) search can miss exact codes, part numbers and names. Keyword search such as BM25 catches them. Anthropic's write-up on contextual retrieval recommends running both and merging the results.
  • Give chunks their context. A chunk that says "revenue grew this quarter" is useless without the company and the quarter. Adding a short note about the source document to each chunk before indexing helps retrieval find it.
  • Rerank before you generate. Retrieve a wider set of candidates, then let a reranking model pick the most relevant ones. It costs a little extra time per question, so tune the balance.
  • Check whether you need RAG at all. If the whole knowledge base is small enough to fit in the model's prompt, putting it all in the prompt can be simpler.
  • Always show sources. Citations build trust and make wrong answers easy to spot and report.

Common failure points

SymptomLikely causeWhat usually fixes it
Right document exists, but the answer misses itPoor chunking, or meaning-only search missing exact termsSection-based chunks, hybrid search, reranking
Answer quotes an old policyOutdated versions still in the indexSource clean-up, version metadata, scheduled re-sync
Answer sounds right but is not in any sourceModel filling gaps from general knowledgeStricter answer instructions, required citations, "I don't know" allowed
Tables and scanned PDFs give garbage answersText extraction lost the structureBetter parsing or OCR, tables kept as tables
Staff see content they should notPermissions not applied at retrievalFilter by the user's access rights before anything reaches the model
Quality drops after a change nobody testedNo evaluation setRe-run the fixed question set after every change

How to measure quality

"It feels better" is not a measure. Score retrieval and answers separately, because they fail for different reasons.

  • Retrieval hit rate: for each test question, did the right passage appear in the results passed to the model?
  • Faithfulness: is every claim in the answer supported by the cited passages?
  • Answer correctness: does the answer match what your subject expert would say?
  • Honest refusals: when the sources do not cover a question, does the assistant say so instead of guessing?
  • Real-use signals: thumbs up or down, questions with no good source, response time and cost per question.

Keep the test set fixed and run it every time you change chunking, models, prompts or sources. Add every real failure you find to the set, so it never comes back unnoticed.

Data security basics

A RAG assistant concentrates a lot of company knowledge in one place, so the basics matter. This is not a full security programme; it is the minimum to design in from the start.

  • Respect existing access rights. Carry each document's permissions into the index and filter by the signed-in user at search time. The OWASP Top 10 for LLM applications (2025) lists sensitive information disclosure and vector and embedding weaknesses among the main risks.
  • Treat documents as data, not instructions. A retrieved file could contain text that tries to steer the model. OWASP lists this kind of prompt injection as its top risk, so the assistant should never take actions just because a document says so.
  • Know where data goes. Check where the index, the logs and the model provider process and store your data, and whether that meets your data residency and privacy obligations.
  • Limit what goes in. Not every folder needs indexing. Leave out payroll, personal data and anything the use case does not need.
  • Keep logs, and decide who can read them. Questions people ask can be sensitive too.

When RAG is the wrong tool

  • Live numbers and transactions. "What is our stock of item X right now?" should be answered by querying your ERP directly, not by searching documents. For Odoo, see our Odoo AI integration work.
  • Small, stable knowledge. A ten-page FAQ can simply go in the prompt.
  • Calculations and strict rules. Tax, pricing and approvals belong in proper logic, not in a generated paragraph.
  • Sources nobody maintains. RAG makes good documents easy to use. It does not make bad documents correct.

Many businesses end up with both: RAG for policies, manuals and know-how, plus direct system queries for live data. A customer-facing AI chatbot often combines the two.

Where TechNext fits

You don't need to hire your own AI team. TechNext designs, builds and runs enterprise RAG knowledge assistants on your own documents: source clean-up, ingestion with your access rights, hybrid retrieval, cited answers, a test set built from your team's real questions, and ongoing monitoring. As an Odoo Ready Partner, we can also connect the assistant to your Odoo data where live answers are needed. Our team works from Singapore, Taguig City in the Philippines and Ho Chi Minh City.

Common questions about enterprise RAG

What is the difference between RAG and fine-tuning?

Fine-tuning changes the model itself by training it on examples, which suits style and format. RAG leaves the model alone and gives it the right documents at question time, which suits facts that change. For company knowledge, RAG is usually the first choice because updates only need a re-index and answers can cite sources.

Does RAG stop AI from making things up?

It reduces it a lot but does not remove it. Strict instructions to answer only from sources, required citations, permission to say "I don't know" and regular testing against a fixed question set keep it in check.

What documents can an enterprise RAG system use?

Most text-based content: PDFs, Word files, spreadsheets, wiki pages, helpdesk articles and email archives. Scanned documents need OCR first, and tables need careful parsing to stay readable.

Can users see documents they are not allowed to open?

They should not. A well-built system carries each document's access rights into the index and filters results by the signed-in user before anything reaches the model.

How long does an enterprise RAG implementation take?

It depends mostly on the state of your sources and the number of systems to connect. Starting with one use case and a pilot group gets a working assistant in front of real users sooner, and the rest is added in phases.

Odoo Ready Partner

About TechNext. TechNext Pte. Ltd. is a BIR compliance and integration partner for accounting firms and finance teams: an Odoo Ready Partner headquartered in Singapore, with its main development and consulting hub in Taguig City, Metro Manila. We plug Odoo into the system you already run, and our own experts implement it end to end (discovery, configuration, data migration, training and support), set up with the Philippine (BIR) and Singapore (GST) localisations, for clients in 25+ countries. We are not affiliated with, accredited by or acting for the BIR or any government agency, and we do not file or register on your behalf. About us · Get my custom blueprint

Talk to a compliance engineer How BIR CAS set-up works

More from the blog.

All articles

You don't need to hire your own team.

TechNext sets up your Odoo, can build your website and brand on it, and stays on after go-live, in Singapore and the Philippines. An adviser reviews your situation first.