Brainbox
HomeWorkshopsCorporate · HRDC
BrainBotAbout
LoginFree Strategy Call→
/What is RAG? How a company AI knowledge base works

What is RAG? How a company AI knowledge base works

TL;DR

RAG (retrieval-augmented generation) is a method where an AI first searches your own documents for the relevant passages, then writes its answer from them. It is how a company AI knowledge base works: staff ask in plain language and get answers grounded in your SOPs, policies and product sheets instead of the model's general memory.

Key facts

Last updated
22 November 2026
First published
30 October 2026
Written by
Available in
English中文Bahasa Malaysia
Sources cited
9

On this page

  1. What RAG means
Free online preview · no obligation to enrol
Brainbox

为大马中小企业老板设计的 AI 变现实战体系。
Practical AI for business owners. No code. Just revenue.

THE BRAINBOX TECHNOLOGIES SDN. BHD. (1676601-V) HQ & TRAINING CENTRE: 16-3, JALAN PUTERI 2/4, BANDAR PUTERI, 47100 PUCHONG, SELANGOR REGISTERED ADDRESS (SSM): LOT 10, JALAN PJS 11/18, BANDAR SUNWAY, 46150 PETALING JAYA, SELANGOR
Courses
Company
Contact
  • hello@thebrainbox.ai
  • support@thebrainbox.ai
  • WhatsApp
  • LinkedIn
  • Why Malaysian companies are building knowledge bases now
  • How RAG works, step by step
  • Do you need RAG? Three ways to give AI your documents
  • Retrieval quality decides answer quality
  • Knowledge base use cases in Malaysian companies
  • How to prepare your documents
  • Where knowledge bases go wrong
  • Do this with your team
  • What RAG means

    RAG stands for retrieval-augmented generation. The method was introduced in a 2020 paper by Lewis and colleagues, who described models that "combine pre-trained parametric and non-parametric memory for language generation" (Lewis et al., 2020). In plain terms: the model's built-in knowledge (parametric memory) is combined with an external store of documents it can look up (non-parametric memory).

    Anthropic's glossary gives the practical version: RAG combines information retrieval with language model generation to improve accuracy and relevance and to "better ground the model's response in evidence". The relevant documents are retrieved when the question is asked and passed into the model's context window (Anthropic).

    Why Malaysian companies are building knowledge bases now

    Most companies have the documents already: SOPs in Word, policies in PDF, price lists in Excel, product knowledge in someone's head and old WhatsApp threads. What they lack is a fast way for staff to find the answer. Meanwhile, AI use remains shallow: in the AWS and Strand Partners 2026 study, 67% of Malaysian businesses using AI stayed on basic tasks and only 19% had a formal plan to scale it (TechNode Global, 19 Aug 2026).

    A knowledge base is often the first AI project that moves beyond basics, because it uses information the company already owns and answers a daily, measurable question: how long does it take a new hire to find the right answer?

    How RAG works, step by step

    1. Collect: gather the documents the AI may answer from, such as SOPs, HR handbook, product sheets and FAQs.
    2. Split: break each document into short passages, typically a few paragraphs each.
    3. Embed: convert each passage into an embedding, a list of numbers that captures its meaning. As OpenAI's docs put it, the distance between two embeddings measures how related they are.
    4. Store: save the passages and embeddings in a searchable index.
    5. Retrieve: when a staff member asks a question, convert it the same way and find the closest passages.
    6. Generate: give those passages and the question to the language model, with instructions to answer only from them and show the source.

    Because the documents are fetched at question time, you update the AI's knowledge by updating the files. No retraining is needed.

    Do you need RAG? Three ways to give AI your documents

    Not every company needs a full RAG system on day one. Anthropic notes that if a knowledge base is smaller than about 200,000 tokens, you can often include the whole thing in the prompt, and prompt caching makes that faster and cheaper (Anthropic, 19 Sep 2024).

    ApproachBest whenStrengthLimit
    Paste or attach documents in the promptA few documents, one user, one-off questionsNo setupContext window limits size; nothing shared with the team
    RAG knowledge baseMany documents, several departments, regular updatesScales, cites sources, easy to updateNeeds clean documents and some setup
    Fine-tuningYou need a consistent style or format across thousands of outputsShapes tone and patternsPoor way to add or update facts

    Anthropic's glossary is clear that fine-tuning makes a model mimic the patterns of its training examples (Anthropic). For "what does our SOP say?", retrieval is the better tool.

    Retrieval quality decides answer quality

    RAG fails quietly when it fetches the wrong passage. A common cause is that a chunk loses its context once it is cut out: "the fee is RM50" means little without knowing which product or year it refers to. Anthropic's contextual retrieval method adds a short explanation of context to each chunk before it is indexed, and reports that this "can reduce the number of failed retrievals by 49% and, when combined with reranking, by 67%" (Anthropic, 19 Sep 2024).

    You do not need to implement that yourself to benefit from the lesson. Write documents so each section makes sense on its own: name the product, the department and the effective date inside the section, not only in the file name.

    Knowledge base use cases in Malaysian companies

    DepartmentDocumentsQuestion a staff member asks
    HREmployee handbook, leave policy, claims procedure"Can I carry forward annual leave to next year?"
    SalesPrice list, product sheets, past proposals"What is the minimum order for the 20kg pack?"
    Customer serviceWarranty terms, return policy, FAQs"Does the warranty cover a cracked screen?"
    OperationsSOPs, safety procedures, machine manuals"What are the steps to close the outlet at night?"
    FinanceApproval matrix, expense policy"Who approves a purchase above RM5,000?"

    Example: a 40-staff retail chain with outlets across the Klang Valley loads its SOPs and promotion terms. A new cashier asks in BM how to process an exchange on a sale item and gets the steps with a link to the exact SOP section, instead of calling the area manager.

    How to prepare your documents

    • Pick one department first. Do not load the whole shared drive.
    • Keep one source of truth per topic. Delete or archive old versions so the AI cannot quote last year's price list.
    • Add an owner and an effective date to every document.
    • Convert scanned PDFs and photos to real text, or the system cannot read them.
    • Write key rules as clear sentences. Tables with merged cells and screenshots of WhatsApp chats retrieve poorly.
    • Remove personal data the assistant does not need, such as IC numbers, salaries and customer phone numbers.
    • Decide who can see what. A staff assistant should not answer questions from the directors' folder.
    Malaysia's Personal Data Protection Act 2010 regulates the processing of personal data in commercial transactions (JPDP). Treat customer and staff records in a knowledge base with the same care as in any other system, and check your obligations with your adviser.

    Where knowledge bases go wrong

    • Outdated documents: the AI answers correctly from the wrong version.
    • Wrong passage retrieved: the answer sounds right but comes from a different product or policy.
    • Gaps filled from memory: if the documents do not cover a question, the model may still answer. Instruct it to say it does not know. See .
    • No owner: nobody updates the documents, and trust drops after the first wrong answer.
    • Hidden instructions: a document or web page added to the index can carry instructions that change the AI's behaviour. OWASP calls this indirect prompt injection.

    Do this with your team

    The is two days, run as a public class or in-house. Your team learns how large language models work, cleans and prepares your company documents with PDPA in mind, and builds an AI assistant staff can ask. You keep the cleaned-up document pack. It is priced higher than our other courses because the work happens on your real documents: RM6,888 per participant self-funded, or RM7,188 through HRD Corp.

    For a smaller first step, the 3-hour AI Knowledge Base + Sales Coach Class (RM199 for 2 people, RM150 for 1) builds a knowledge base from your price list and FAQs. Every answer names the file it came from, and when the answer is not in your files it says so instead of making up a price. The second half sets up an AI sales coach that plays your customer, using chats from your own customers.

    It is HRD Corp claimable (HRDC / HRDF). The course fee is debited from the employer's account rather than paid upfront (HRD Corp Support Centre). From 15 June 2026, in-house training can only run 14 days after grant approval and must start within 90 calendar days after that, so plan ahead (HRD Corp). Want the assistant to take actions too? Pair it with the . See the or .

    Why teams train with BrainBox

    • Small classes, usually around 15 people, so everyone gets to ask questions. Larger companies can arrange a bigger in-house cohort through HRD Corp.
    • Published fees per participant: RM199 for the 2-hour online class, and RM888 for the two-day Vibe Coding, AI Marketing A–Z and AI Agent courses (RM1,188 through HRD Corp). Every fee is on the .
    • HRD Corp registered training provider, with the registration certificate shown on our .
    • Your business is the exercise: staff work on your own tasks, documents and customers, not a made-up case study.
    • Every course includes a certificate of completion, 90 days of WhatsApp support, an RM299 refresher and a Results Report (one version each for the boss, HR and the participant).
    • Class language: Vibe Coding and AI Agent are taught in Mandarin. AI Marketing A–Z and the 3-hour classes have English and Mandarin sessions, so ask for the dates.
    Not sure your documents are ready? Join the first, no obligation, or WhatsApp us with a rough count of your files for a written quote.

    Related reading: , and .

    Frequently asked questions

    What is RAG in AI, in simple terms?

    RAG means the AI looks things up before it answers. When someone asks a question, the system searches your documents, pulls out the most relevant passages and gives them to the AI with the question. The AI then answers from those passages, which makes the answer specific to your company and easier to check.

    What is the difference between RAG and fine-tuning?

    RAG gives the model your documents at the moment of the question, so updating knowledge is as simple as updating a file. Fine-tuning retrains the model on examples, which changes style and patterns more than facts. For answering from SOPs and policies, most SMEs start with RAG.

    Does my company need RAG, or can I just upload files to ChatGPT?

    For a small set of documents, putting them straight into the prompt or a project folder can work. Anthropic suggests that a knowledge base under about 200,000 tokens may fit in the prompt without RAG. Once you have hundreds of files, several departments or frequent updates, a proper retrieval setup is more reliable.

    Can a company AI knowledge base answer in BM, English and Chinese?

    Yes, major language models handle all three, and embeddings match questions to documents by meaning. Quality is best when key documents exist in the languages staff use, and when someone checks answers on terms that translate poorly, such as legal or product names.

    Is it safe to put company documents into an AI knowledge base?

    It depends on where the data goes and who can see it. Remove personal data you do not need, use tools your company has approved, set access by department, and keep the Personal Data Protection Act 2010 in mind for any customer or staff data.

    How long does it take to build a company AI knowledge base?

    A working first version for one department can be built in days, as in BrainBox's two-day Company AI Knowledge Base course. Most of the effort goes into cleaning documents: removing duplicates, fixing outdated SOPs and converting scans. Keeping it current is an ongoing job, not a one-off.

    Sources

    1. Lewis et al., 2020 (arxiv.org)
    2. Anthropic (platform.claude.com)
    3. TechNode Global, 19 Aug 2026 (technode.global)
    4. OpenAI's docs (developers.openai.com)
    5. Anthropic, 19 Sep 2024 (anthropic.com)
    6. JPDP (pdp.gov.my)
    7. OWASP (genai.owasp.org)
    8. HRD Corp Support Centre (supportcentre.hrdcorp.gov.my)
    9. HRD Corp (hrdcorp.gov.my)

    Continue reading

    • AI glossary A–Z→
    • What is AI hallucination?→
    • AI policy, PDPA and data security→
    • AI for HR departments→

    About BrainBox

    BrainBox (The Brainbox Technologies Sdn. Bhd.) is a Malaysian AI training provider running public AI workshops and customised corporate AI courses for businesses.

    • HRD Corp (formerly HRDF) registered training provider, so employers can apply for HRD Corp funding for our corporate AI courses. Registration valid until 13 October 2027.
    • 500+ learners across BrainBox programs.
    • Classes taught in English and Mandarin (中文); guides published in English, Chinese and Bahasa Malaysia.
    • HQ and training centre: Bandar Puteri, Puchong, Selangor, Malaysia.
    • Client programme: Digital Penang (Penang, 2026), Vibe coding with AI.

    About usHRD Corp claimable AI courses

    Ready to wire this into your business?

    Start with the free two-hour online preview: a mentor walks through real business cases, then you decide on next steps.

    Pick a free preview date
    Follow BrainBox:LinkedInInstagramGoogle Business
    Instagram
  • Google Business
  • Login
  • © 2026 THE BRAINBOX TECHNOLOGIES SDN. BHD. (1676601-V) · MALAYSIA
    Privacy policyTerms of service
    HRD CORP REGISTERED TRAINING PROVIDER
    Guides
    BrainBox, HRD Corp registered AI training provider, Malaysia
    Pick a date
    AI Website Build Class
    AI Genesis (2-Day)
    AI Course Malaysia
    AI Course Puchong
    Course Menu & Fees
    HRD Corp Corporate Training
    About Us
    Team
    Event Schedule
    Articles
    Partner Trainers
    FAQ
    what is AI hallucination
    Company AI Knowledge Base Course
    AI Agent Course
    course menu
    HRD Corp AI training
    course menu
    corporate training page
    free online preview class
    AI glossary A–Z
    what is MCP
    AI customer service for Malaysian businesses