RAG Explained: How Businesses Can Build AI That Understands Their Own Documents and Data
By Sustenyx
An employee wants to know whether they can claim a hotel for a business trip. The answer is in the travel policy, but there are three versions of it in different folders. So they ask HR, and someone in HR finds the right version and explains the relevant section.
An AI assistant could answer that question in seconds. It would need to find the current policy, read it correctly and show the employee where the answer came from.
Retrieval-augmented generation (RAG) connects an AI model to your own information. When someone asks a question, the system first searches your approved documents for relevant passages, then gives those passages to the model to write the answer. Businesses use it for company knowledge assistants, document research and support tools, and a well-built system shows the source behind each answer.[1]
This article explains how RAG works, where it fits, how it fails and what to prepare before you build one. It is written for business decision-makers, so it has no code.
Key takeaways
- RAG gives an AI model the relevant parts of your documents at the moment a question is asked.
- It suits questions answered by policies, manuals, SOPs, contracts and reports.
- Document quality, versions and access rights decide most of the result. The chat window is the easy part.
- A cited source lets people check an answer. It does not prove the answer is right.
- Start with one area of knowledge, test it with real questions, then expand.
Why doesn’t an AI model already know our company information?
A general AI model was trained on public text. It has never seen your internal policies, contracts or procedures, and it has no way to know which version is current.
Ask it "What is our approval process for onboarding a new supplier?" and it will give you a sensible-sounding general answer. That answer is useless, because what you need is your company’s process, in its current version, with its exceptions.
RAG solves this by looking up the relevant material each time a question is asked. The idea comes from research that paired a language model with a search step for knowledge-heavy tasks.[2] Business systems apply the same idea to a company’s approved documents.
How does RAG work in practice?
A document-based RAG system has two stages: preparing the documents so they can be searched, and using the search results to answer.[1][3]
Stage 1: prepare the documents
The team chooses which documents count as approved, pulls out their text and makes them searchable. Long documents are split into smaller sections, often called chunks. Each chunk keeps enough context to make sense on its own, plus labels such as the document title, where it is stored and its version.[3]
How you split matters. If an expense policy’s claim limit ends up in one chunk and the rule about who qualifies ends up in another, the system can retrieve the limit without the condition and give a wrong answer.
Stage 2: answer the question
When someone asks a question, the system:
- Checks who is asking and which documents they are allowed to see.
- Searches the documents that person may access.
- Picks the passages most likely to answer the question.
- Passes those passages to the AI model with instructions.
- Returns an answer with references to the sources it used.
The search can match exact keywords, similar meanings, or both.[1] Test it with the words your staff actually use, including acronyms and internal jargon.
What a buyer most needs to know is whether the system finds the right evidence for the questions employees really ask.
What would a RAG answer look like?
Take the travel question from the start of this article:
"Can I claim accommodation for this trip, and what approval do I need?"
A good assistant finds the current travel policy and explains what it says about accommodation and approval. If the answer depends on something the employee hasn’t said, such as whether the trip is overseas, it asks. If the policy doesn’t cover the case, it says so and points the employee to HR.
It also shows its source: the document title, the section and the version. The employee can open the policy and check for themselves.
This is an illustration of good design. It is not a screenshot of a real system, and it assumes no actual policy rule or amount.
Where can Malaysian businesses use RAG?
Look for questions that come up again and again and that someone answers by searching trusted documents. The table lists likely uses. Whether each one works depends on your documents, your users and what the answers are used for.
| Business area | Possible use | What the user should be able to check |
|---|---|---|
| HR | Explain routine policy questions | The policy and its version |
| Operations | Find steps in an SOP | The procedure, equipment or process it covers |
| Product support | Answer product questions | The correct model’s manual or approved support article |
| Procurement | Look up supplier requirements | The onboarding or purchasing document |
| Legal and commercial | Find clauses for a lawyer to review | The contract passage and which contract it is |
| ESG | Find disclosures for assessment | The report passage, page and requirement it relates to |
Many Malaysian companies keep documents in both English and Bahasa Malaysia, and staff mix the two when they ask questions. If that is true of your workload, test it. A demo built only on clean English documents tells you little about how the system will handle yours.
Internal knowledge assistants
If staff keep asking where to find the same procedure, an assistant can get them to the answer faster. Start with one collection of documents that has an owner who keeps it current.
Measure two things: whether staff reach a usable answer sooner, and whether the assistant creates extra questions for the team that owns the documents.
Document research
A research assistant can help a professional find relevant passages across a set of documents and prepare a first pass for review. The reviewer still decides whether the evidence is relevant and what it means. In contracts and ESG analysis, finding the right passage is only the start of the judgement.
How is RAG different from fine-tuning or an AI agent?
They solve different problems and can be used together. RAG looks up information for each answer. Fine-tuning changes how a model behaves by training it further. An AI agent uses tools to carry out steps in a task.[1][2][4]
| Approach | What it does | The question it answers |
|---|---|---|
| RAG | Retrieves your information when a question is asked | How can answers use our approved documents? |
| Fine-tuning | Trains the model further on examples | How can the model follow a specialised task or format? |
| AI agent | Uses tools to complete steps within set permissions | How can AI help carry out a multi-step task? |
For example, a RAG assistant can explain your purchasing policy. An agent could use that policy while it prepares a purchase request. Being allowed to read the policy does not mean the agent is allowed to approve the purchase.
For company knowledge that changes often, try RAG first. Fine-tuning does not keep a model up to date with your latest documents, and it does nothing to control who can see what.
Does RAG stop AI from making things up?
No. RAG gives the model relevant material, but the system can still retrieve the wrong passage, or write an answer the passage doesn’t support. NIST lists confident but wrong output as a known risk of generative AI.[5]
So test two things separately: did the system find the right evidence, and did the answer use it correctly? Microsoft’s evaluation guidance measures retrieval and answer quality separately, including whether an answer is grounded in its sources and whether it is complete.[6]
| What can go wrong | Example | What to check |
|---|---|---|
| Wrong evidence | Retrieves the procedure for a different product | Is the retrieved passage relevant to the question? |
| Missing context | Retrieves a rule without its exception | Does the passage still make sense on its own? |
| Unsupported answer | Adds a condition that is not in the policy | Does every important claim come from the evidence? |
| Incomplete answer | Leaves out a required approval step | Does it match an answer a person has checked? |
A citation gives the reader a way to check the answer. It does not prove the cited passage supports every sentence.
Sometimes the right answer is "the documents don’t cover this." Include questions like that in your tests, and reward the system for saying so instead of guessing.
Is company data safe in a RAG system?
That depends on how it is built. RAG describes how a system finds and uses information. It says nothing on its own about where your data goes or who can see it.
Microsoft’s guidance on secure RAG treats access control and data separation as design requirements.[7] The system should check what a user is allowed to see before any document reaches the AI model. A staff member who can read the general HR policies should not be able to pull confidential employee records out of a chat window.
Ask whoever builds it:
- Where are the documents, search indexes, prompts and logs stored?
- Which AI providers receive our content, and what are their terms on storing and using it?
- How are users signed in, and how are access rights enforced?
- What happens when someone’s access is removed or a document is deleted?
- Who can read the system logs, and what sensitive information could be in them?
A label like "private RAG" or "secure AI" is not an answer to any of these. Ask for the design and the provider terms.
What should a company prepare before building a RAG assistant?
Pick one area of knowledge, small enough for its owner to check the answers. A set of product manuals or one policy area is much easier to test than every shared folder in the company.
| What to prepare | The decision to make |
|---|---|
| Users | Who will use it, and for which questions? |
| Sources | Which documents are approved and current? |
| Owner | Who settles conflicts between documents and approves updates? |
| Access | Who may see each document? |
| Expected answers | What should a correct answer contain? |
| Hand-off | When should the assistant ask a follow-up, decline or refer to a person? |
| Success measure | What improvement would justify the running cost? |
Put the hard cases in your test set: outdated versions, documents that contradict each other, poor scans and questions outside the scope. Ask to see what happens when a document is updated or deleted. Don’t take it on trust.
How should we measure business value?
Measure the whole experience, not only whether the answers sound right. Compare the pilot with how the same people answer the same questions today.
Record the time to reach a checked answer, how much reviewing it takes, how many answers need correcting, which questions go unanswered and what the system costs to run. Ask the same question in different words, and in Bahasa Malaysia if your staff use it, and see whether the answer holds.
Compare it with simpler fixes too. Tidying your folders or improving ordinary search may solve the problem. A RAG assistant is worth its extra cost when pulling information together and explaining it saves real work.
We don’t quote a savings figure here. Yours should come from your own pilot, with its workload and limits written down.
Who can build a RAG assistant for a company in Malaysia?
Software houses, AI consultancies and large cloud and IT providers all build RAG systems. Whoever you speak to, look for a team that has run RAG on real documents in production, beyond a demo, and that can show you:
- how it tests retrieval and answer quality, ideally with a test set built from your own questions;
- how it enforces access rights before any content reaches the model;
- how each answer links back to the passage and page it came from; and
- where people review the output before it is used for a decision.
How Sustenyx uses RAG
Sustenyx uses RAG and AI agents in its own ESG work.[8] In our gap analysis service, InsightX, AI reads a company’s sustainability and annual reports, finds the evidence for each ISSB or FTSE4Good requirement and drafts the report. Every finding links to the source passage and page, and our analysts and consultants review every report before it reaches the client.[8][9]
In our AI Sustainability Ratings Advisory (AI-SRA), the recommendations come from a RAG workflow. The system first retrieves relevant material from three internal sources (our database, our knowledge base and our consultants’ notes), then uses it to draft the recommendation.[8]
Our team also built a RAG chatbot that answers questions from our internal knowledge, and our engineers are building AI projects for Rentalworks Group, including an AI assistant.[8]
That work taught us the lessons in this article. A finding without a source has to be rebuilt by hand, so we link every output to its evidence. An evaluation dataset tells you whether a system works better than a demo does. And the time AI saves should go into expert review, not into skipping it. You can read more in how we use AI inside Sustenyx.
For the wider picture of RAG, AI agents and choosing a first project, see our guide to enterprise AI in Malaysia. To work out whether a pilot pays for itself, see our guide to AI automation for Malaysian businesses.
Frequently asked questions
What does RAG stand for?
Retrieval-augmented generation. The system retrieves relevant information first, then generates an answer from it.[1]
Do we need to train a new AI model on all our documents?
No. A RAG system looks up your documents each time a question is asked, so you don’t retrain a model when a document changes. You do need a reliable way to add, update and remove documents from the search index.[1][2]
Can RAG work with PDFs and scanned documents?
Yes, once the text can be extracted. Scans need optical character recognition (OCR), and complex tables and layouts should be tested to make sure their meaning survives.[3]
Can RAG answer questions about spreadsheets and live business data?
A system can combine document search with direct queries to your databases, within each user’s access rights. Exact totals and figures that change daily usually need a database or calculation tool, because searching text is the wrong method for them. Say so clearly when you scope the project.[4]
How much does a company RAG system cost?
It depends on preparing the documents, connecting to your systems, access control, usage volume, hosting, testing and maintenance. Ask for a quote on a defined pilot with clear acceptance criteria, not on a company-wide assistant with no defined scope.
Will every answer include accurate citations?
Only if the system is designed and tested for it. Ask for usable source references, then check whether the cited passages actually support the answers.[6]
Does Sustenyx use RAG?
Yes. Our ESG tools use RAG and AI agents, and our team uses a RAG chatbot for internal knowledge search. AI-SRA’s recommendations, for example, draw on our database, knowledge base and consultants’ notes.[8]
Thinking about an AI assistant for your company’s knowledge?
Bring us one area of knowledge, a small set of approved documents and a list of questions your team asks. Tell us who should have access and which answers a person must check before they are used.
We can discuss whether RAG fits, what a pilot should test and how to measure the result.
Contact the Sustenyx team to talk about your documents and the questions your team needs answered.
References
- Microsoft Learn: Retrieval-augmented generation and indexes.
- Lewis et al.: Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks, 2020.
- Microsoft Learn: Integrate your data into AI apps with RAG, and RAG chunking phase.
- Microsoft Learn: RAG in Azure AI Search.
- NIST: Generative Artificial Intelligence Profile, NIST AI 600-1, July 2024.
- Microsoft Learn: RAG evaluators, and RAG end-to-end evaluation.
- Microsoft Learn: Design a secure multitenant RAG solution.
- Sustenyx: From Manual Work to AI Workflows, How We Use AI Inside Sustenyx, October 2026.
- Sustenyx: Gap Analysis InsightX.
Online references checked 17 November 2026. Microsoft documentation is used to illustrate general technical patterns. It does not mean Sustenyx uses a particular platform or has a partnership with Microsoft. NIST is a technical risk reference, not a Malaysian legal standard.



