{"id":7789,"date":"2026-05-26T09:00:00","date_gmt":"2026-05-26T01:00:00","guid":{"rendered":"https:\/\/drhariz.com\/blog\/?p=7789"},"modified":"2026-05-21T18:01:47","modified_gmt":"2026-05-21T10:01:47","slug":"rag-bahasa-melayu","status":"publish","type":"post","link":"https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/","title":{"rendered":"RAG for Bahasa Melayu: Building Retrieval-Augmented Generation in Local Language"},"content":{"rendered":"<h2>What is RAG for Bahasa Melayu and why does Malaysia need it?<\/h2>\n<p>RAG Bahasa Melayu is retrieval-augmented generation that combines a large language model with a Malay-language knowledge base to produce accurate, locally relevant answers. Malaysia needs it because off-the-shelf models often hallucinate on local laws, policies, and cultural context, while RAG grounds outputs in trusted Malay sources.<\/p>\n<p>Dr. Muhamad Hariz Muhamad Adnan, an HRD Corp Certified <a href=\"https:\/\/drhariz.com\/blog\/mengapa-kursus-ai-online-dari-upsi-adalah-pilihan-terbaik-untuk-masa-depan-anda\/\">AI<\/a> Trainer at Universiti Pendidikan Sultan Idris (<a href=\"https:\/\/drhariz.com\/blog\/why-upsi-is-a-good-choice-for-pursuing-a-master-or-phd-in-artificial-intelligence-malaysia\/\">UPSI<\/a>), works with Malaysian agencies and SMEs to deploy RAG systems that answer customer and citizen queries fluently in Bahasa Melayu without expensive model fine-tuning.<\/p>\n<h2>How does a RAG Bahasa Melayu system work end-to-end?<\/h2>\n<p>A RAG Bahasa Melayu system works by chunking Malay documents, converting them to vector embeddings, retrieving the most relevant chunks for a user query, and passing them as context to an LLM. The LLM then generates a grounded Malay-language answer, citing the retrieved sources for transparency and trust.<\/p>\n<h3>The five-step RAG pipeline<\/h3>\n<ol>\n<li><strong>Ingest:<\/strong> Collect Malay PDFs, policies, FAQs, and websites.<\/li>\n<li><strong>Chunk:<\/strong> Split documents into 300\u2013800 token segments.<\/li>\n<li><strong>Embed:<\/strong> Use a multilingual embedding model that handles Bahasa Melayu well.<\/li>\n<li><strong>Retrieve:<\/strong> Query the vector database for top-K relevant chunks.<\/li>\n<li><strong>Generate:<\/strong> Pass chunks plus user question to GPT-4o, Claude, or Gemini.<\/li>\n<\/ol>\n<h2>Which embedding models handle Bahasa Melayu best?<\/h2>\n<p>The strongest embedding models for Bahasa Melayu in 2026 are OpenAI text-embedding-3-large, Cohere embed-multilingual-v3, BGE-M3, and Google Vertex AI multilingual embeddings. These models capture Malay morphology, code-switching with English, and Malaysian named entities better than English-only models like Ada-002 or older sentence-transformers.<\/p>\n<table>\n<tr>\n<th>Embedding Model<\/th>\n<th>Bahasa Melayu Quality<\/th>\n<th>Cost per 1M Tokens (USD)<\/th>\n<th>Open Source<\/th>\n<\/tr>\n<tr>\n<td>OpenAI text-embedding-3-large<\/td>\n<td>Excellent<\/td>\n<td>0.13<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>Cohere embed-multilingual-v3<\/td>\n<td>Excellent<\/td>\n<td>0.10<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>BGE-M3<\/td>\n<td>Very good<\/td>\n<td>Self-hosted<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>Google Vertex multilingual<\/td>\n<td>Very good<\/td>\n<td>0.025<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>Ada-002 (legacy)<\/td>\n<td>Weak<\/td>\n<td>0.10<\/td>\n<td>No<\/td>\n<\/tr>\n<\/table>\n<h2>What are the best use cases for RAG Bahasa Melayu in Malaysia?<\/h2>\n<p>The top RAG Bahasa Melayu use cases are government citizen services, university student support, Islamic finance compliance, healthcare patient triage, and SME customer service. These domains demand accurate, source-cited answers in Malay, which RAG provides without the cost or risk of fine-tuning a Malay-specific model from scratch.<\/p>\n<ul>\n<li><strong>Government:<\/strong> JPN, LHDN, KWSP citizen FAQ bots in Bahasa Melayu.<\/li>\n<li><strong>Education:<\/strong> UPSI and other public universities offering 24\/7 student helpdesk.<\/li>\n<li><strong>Healthcare:<\/strong> Klinik kesihatan patient information chatbots.<\/li>\n<li><strong>Banking:<\/strong> Shariah-compliant product Q&#038;A for Maybank Islamic and Bank Rakyat.<\/li>\n<li><strong>SMEs:<\/strong> WhatsApp customer service in Bahasa Melayu and Manglish.<\/li>\n<\/ul>\n<h2>How do you evaluate a RAG Bahasa Melayu system?<\/h2>\n<p>Evaluate RAG Bahasa Melayu using retrieval recall, answer faithfulness, and Malay-language fluency. Build a test set of 100 representative Malay questions with verified answers, then measure how often the system retrieves the correct source and generates grounded, fluent responses. Track hallucination rate weekly to catch drift early.<\/p>\n<ol>\n<li>Build a 100\u2013300 question Malay evaluation set with gold answers.<\/li>\n<li>Measure retrieval recall@5 and recall@10 against the gold sources.<\/li>\n<li>Score answer faithfulness using LLM-as-a-judge with a Malay-fluent prompt.<\/li>\n<li>Run human review on a 10% sample weekly.<\/li>\n<li>Track latency under 3 seconds for production readiness.<\/li>\n<\/ol>\n<h2>What infrastructure do you need for a Malaysian RAG deployment?<\/h2>\n<p>A production RAG Bahasa Melayu deployment needs a vector database, an embedding service, an LLM API, and a thin orchestration layer. Most Malaysian organisations choose Pinecone, Weaviate, or open-source Qdrant for vectors, hosted in Singapore or Kuala Lumpur regions to meet PDPA 2010 data residency expectations.<\/p>\n<h3>Reference architecture components<\/h3>\n<ul>\n<li><strong>Vector DB:<\/strong> Pinecone, Weaviate, Qdrant, or pgvector on PostgreSQL.<\/li>\n<li><strong>Orchestration:<\/strong> LangChain, LlamaIndex, or DSPy.<\/li>\n<li><strong>LLM:<\/strong> GPT-4o, Claude 3.5, Gemini 1.5, or local Llama 3 for sensitive data.<\/li>\n<li><strong>Observability:<\/strong> LangSmith, Phoenix, or Helicone for trace logging.<\/li>\n<li><strong>Frontend:<\/strong> WhatsApp Business API, web widget, or Microsoft Teams.<\/li>\n<\/ul>\n<h2>How much does a RAG Bahasa Melayu pilot cost?<\/h2>\n<p>A typical RAG Bahasa Melayu pilot for a Malaysian SME or department costs RM15,000 to RM80,000 over three months, covering data preparation, embedding, integration, and evaluation. Ongoing run costs range from RM800 to RM5,000 monthly depending on query volume, with HRD Corp claimable training reducing the upskilling portion of the budget.<\/p>\n<h2>Frequently Asked Questions<\/h2>\n<h3>Is RAG better than fine-tuning for Bahasa Melayu?<\/h3>\n<p>For most Malaysian use cases, RAG is better than fine-tuning because it updates instantly when documents change, costs less, and is auditable. Fine-tuning only wins when you need a specific style or domain reasoning that retrieval cannot inject. Dr. Muhamad Hariz recommends RAG-first for over 80% of Malaysian projects.<\/p>\n<h3>Can RAG Bahasa Melayu handle Manglish and code-switching?<\/h3>\n<p>Yes, modern multilingual LLMs handle Manglish and English\u2013Malay code-switching well when paired with multilingual embeddings. Performance improves further when your knowledge base contains code-switched examples. Evaluation should include real Manglish queries to ensure the system does not degrade on typical Malaysian conversational patterns.<\/p>\n<h3>Is RAG training HRD Corp claimable in Malaysia?<\/h3>\n<p>Yes, RAG and applied AI training in Malaysia is HRD Corp claimable when delivered by a certified trainer under an approved scheme. Dr. Muhamad Hariz at UPSI offers HRD Corp claimable RAG workshops for Malaysian SMEs, GLCs, and government agencies, combining theory, hands-on labs, and Bahasa Melayu evaluation.<\/p>\n<h3>Do I need a GPU to run RAG in Bahasa Melayu?<\/h3>\n<p>No, you do not need your own GPU for most RAG Bahasa Melayu deployments because embeddings and LLM inference run on cloud APIs. GPUs are only needed if you self-host open-source models like Llama 3 or BGE-M3 for data-sensitive workloads. Most Malaysian SMEs start with managed APIs to reduce cost.<\/p>\n<h3>How do I start a RAG Bahasa Melayu project?<\/h3>\n<p>Start a RAG Bahasa Melayu project by listing your top 50 customer or citizen questions, gathering the source documents that answer them, and running a one-week prototype with LangChain plus Pinecone. Visit <a href=\"https:\/\/drhariz.com\">drhariz.com<\/a> or <a href=\"https:\/\/drhariz.com\/blog\">read more on the blog<\/a> for templates.<\/p>\n<p><em>Dr. Muhamad Hariz Muhamad Adnan is a Senior Lecturer and Acting Deputy Dean at Universiti Pendidikan Sultan Idris (UPSI), HRD Corp Certified AI Trainer, and digital transformation consultant. For AI training or postgraduate supervision enquiries, visit <a href=\"https:\/\/drhariz.com\">drhariz.com<\/a> or <a href=\"https:\/\/drhariz.com\/blog\">read more on his blog<\/a>.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>RAG Bahasa Melayu lets Malaysian organisations build accurate, local-language AI using retrieval-augmented generation \u2014 a practical 2026 guide. <\/p>\n","protected":false},"author":1,"featured_media":7811,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":0,"footnotes":""},"categories":[53],"tags":[],"class_list":["post-7789","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-artificial-intelligence-ai"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>RAG Bahasa Melayu: Build Local-Language AI in 2026<\/title>\n<meta name=\"description\" content=\"RAG Bahasa Melayu: how to build retrieval-augmented generation for Malay-language AI. Step-by-step guide by Dr. Muhamad Hariz, UPSI, HRD Corp trainer.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RAG Bahasa Melayu: Build Local-Language AI in 2026\" \/>\n<meta property=\"og:description\" content=\"RAG Bahasa Melayu: how to build retrieval-augmented generation for Malay-language AI. Step-by-step guide by Dr. Muhamad Hariz, UPSI, HRD Corp trainer.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/\" \/>\n<meta property=\"og:site_name\" content=\"Dr. Muhamad Hariz Adnan\" \/>\n<meta property=\"article:published_time\" content=\"2026-05-26T01:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/drhariz.com\/blog\/wp-content\/uploads\/2026\/05\/art02-rag-bahasa-melayu.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Dr Muhamad Hariz\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dr Muhamad Hariz\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/\",\"url\":\"https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/\",\"name\":\"RAG Bahasa Melayu: Build Local-Language AI in 2026\",\"isPartOf\":{\"@id\":\"https:\/\/drhariz.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/drhariz.com\/blog\/wp-content\/uploads\/2026\/05\/art02-rag-bahasa-melayu.jpg\",\"datePublished\":\"2026-05-26T01:00:00+00:00\",\"author\":{\"@id\":\"https:\/\/drhariz.com\/blog\/#\/schema\/person\/681757f6490465d5c106cfee83e9eefc\"},\"description\":\"RAG Bahasa Melayu: how to build retrieval-augmented generation for Malay-language AI. Step-by-step guide by Dr. Muhamad Hariz, UPSI, HRD Corp trainer.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/#primaryimage\",\"url\":\"https:\/\/drhariz.com\/blog\/wp-content\/uploads\/2026\/05\/art02-rag-bahasa-melayu.jpg\",\"contentUrl\":\"https:\/\/drhariz.com\/blog\/wp-content\/uploads\/2026\/05\/art02-rag-bahasa-melayu.jpg\",\"width\":1200,\"height\":675,\"caption\":\"blog.drhariz.com Abstract image of interconnected translucent spheres with colourful reflections, linked by thin, radiating lines on a blue background, resembling a molecular or neural network structure. Dr. Muhamad Hariz Adnan\"},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/drhariz.com\/blog\/#website\",\"url\":\"https:\/\/drhariz.com\/blog\/\",\"name\":\"Dr. Muhamad Hariz Adnan\",\"description\":\"Certified AI Trainer Malaysia &amp; Digital Transformation Consultant\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/drhariz.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/drhariz.com\/blog\/#\/schema\/person\/681757f6490465d5c106cfee83e9eefc\",\"name\":\"Dr Muhamad Hariz\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/drhariz.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6366747cf0faf531a369105da0a985d37e7a4daaca25253e8b592f345eeeb42b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6366747cf0faf531a369105da0a985d37e7a4daaca25253e8b592f345eeeb42b?s=96&d=mm&r=g\",\"caption\":\"Dr Muhamad Hariz\"},\"sameAs\":[\"https:\/\/drhariz.com\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RAG Bahasa Melayu: Build Local-Language AI in 2026","description":"RAG Bahasa Melayu: how to build retrieval-augmented generation for Malay-language AI. Step-by-step guide by Dr. Muhamad Hariz, UPSI, HRD Corp trainer.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/","og_locale":"en_US","og_type":"article","og_title":"RAG Bahasa Melayu: Build Local-Language AI in 2026","og_description":"RAG Bahasa Melayu: how to build retrieval-augmented generation for Malay-language AI. Step-by-step guide by Dr. Muhamad Hariz, UPSI, HRD Corp trainer.","og_url":"https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/","og_site_name":"Dr. Muhamad Hariz Adnan","article_published_time":"2026-05-26T01:00:00+00:00","og_image":[{"width":1200,"height":675,"url":"https:\/\/drhariz.com\/blog\/wp-content\/uploads\/2026\/05\/art02-rag-bahasa-melayu.jpg","type":"image\/jpeg"}],"author":"Dr Muhamad Hariz","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Dr Muhamad Hariz","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/","url":"https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/","name":"RAG Bahasa Melayu: Build Local-Language AI in 2026","isPartOf":{"@id":"https:\/\/drhariz.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/#primaryimage"},"image":{"@id":"https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/#primaryimage"},"thumbnailUrl":"https:\/\/drhariz.com\/blog\/wp-content\/uploads\/2026\/05\/art02-rag-bahasa-melayu.jpg","datePublished":"2026-05-26T01:00:00+00:00","author":{"@id":"https:\/\/drhariz.com\/blog\/#\/schema\/person\/681757f6490465d5c106cfee83e9eefc"},"description":"RAG Bahasa Melayu: how to build retrieval-augmented generation for Malay-language AI. Step-by-step guide by Dr. Muhamad Hariz, UPSI, HRD Corp trainer.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/drhariz.com\/blog\/rag-bahasa-melayu\/#primaryimage","url":"https:\/\/drhariz.com\/blog\/wp-content\/uploads\/2026\/05\/art02-rag-bahasa-melayu.jpg","contentUrl":"https:\/\/drhariz.com\/blog\/wp-content\/uploads\/2026\/05\/art02-rag-bahasa-melayu.jpg","width":1200,"height":675,"caption":"blog.drhariz.com Abstract image of interconnected translucent spheres with colourful reflections, linked by thin, radiating lines on a blue background, resembling a molecular or neural network structure. Dr. Muhamad Hariz Adnan"},{"@type":"WebSite","@id":"https:\/\/drhariz.com\/blog\/#website","url":"https:\/\/drhariz.com\/blog\/","name":"Dr. Muhamad Hariz Adnan","description":"Certified AI Trainer Malaysia &amp; Digital Transformation Consultant","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/drhariz.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/drhariz.com\/blog\/#\/schema\/person\/681757f6490465d5c106cfee83e9eefc","name":"Dr Muhamad Hariz","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/drhariz.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6366747cf0faf531a369105da0a985d37e7a4daaca25253e8b592f345eeeb42b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6366747cf0faf531a369105da0a985d37e7a4daaca25253e8b592f345eeeb42b?s=96&d=mm&r=g","caption":"Dr Muhamad Hariz"},"sameAs":["https:\/\/drhariz.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/drhariz.com\/blog\/wp-json\/wp\/v2\/posts\/7789","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/drhariz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/drhariz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/drhariz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/drhariz.com\/blog\/wp-json\/wp\/v2\/comments?post=7789"}],"version-history":[{"count":1,"href":"https:\/\/drhariz.com\/blog\/wp-json\/wp\/v2\/posts\/7789\/revisions"}],"predecessor-version":[{"id":7800,"href":"https:\/\/drhariz.com\/blog\/wp-json\/wp\/v2\/posts\/7789\/revisions\/7800"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/drhariz.com\/blog\/wp-json\/wp\/v2\/media\/7811"}],"wp:attachment":[{"href":"https:\/\/drhariz.com\/blog\/wp-json\/wp\/v2\/media?parent=7789"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/drhariz.com\/blog\/wp-json\/wp\/v2\/categories?post=7789"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/drhariz.com\/blog\/wp-json\/wp\/v2\/tags?post=7789"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}