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).
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?
- Collect: gather the documents the AI may answer from, such as SOPs, HR handbook, product sheets and FAQs.
- Split: break each document into short passages, typically a few paragraphs each.
- 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.
- Store: save the passages and embeddings in a searchable index.
- Retrieve: when a staff member asks a question, convert it the same way and find the closest passages.
- 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.
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).
| Approach | Best when | Strength | Limit |
|---|
| Paste or attach documents in the prompt | A few documents, one user, one-off questions | No setup | Context window limits size; nothing shared with the team |
| RAG knowledge base | Many documents, several departments, regular updates | Scales, cites sources, easy to update | Needs clean documents and some setup |
| Fine-tuning | You need a consistent style or format across thousands of outputs | Shapes tone and patterns | Poor 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.
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.
| Department | Documents | Question a staff member asks |
|---|
| HR | Employee handbook, leave policy, claims procedure | "Can I carry forward annual leave to next year?" |
| Sales | Price list, product sheets, past proposals | "What is the minimum order for the 20kg pack?" |
| Customer service | Warranty terms, return policy, FAQs | "Does the warranty cover a cracked screen?" |
| Operations | SOPs, safety procedures, machine manuals | "What are the steps to close the outlet at night?" |
| Finance | Approval 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.
- 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.
- 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.
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 .