Back to the list
  • AI & Automation

Most AI Chatbots Guess. RAG Is How You Make Yours Check First

RAG lets an AI check a business's own documents before it answers. How it works, what it costs to run, and why Khmer-language documents make it harder.

Written byMaximilien Grolier · Founder & CEO
Published
Reading time
8 min
Rows of labeled metal filing cabinets topped with organized archive binders
Contents · 8
  1. 01What Is RAG, and Why Does It Stop an AI From Making Things Up?
  2. 02How Retrieval Augmented Generation Works, Step by Step
  3. 03What Does a RAG System Cost to Run for a Small Business?
  4. 04Why Does RAG Perform Worse on Khmer-Language Documents?
  5. 05RAG or Fine-Tuning: Which One Fixes a Wrong-Answer Problem?
  6. 06Is RAG Still Worth It Once an AI Agent Can Browse the Web Itself?
  7. 07What to Check Before You Wire an AI to Your Documents
  8. 08Frequently asked questions

RAG, short for retrieval augmented generation, lets an AI agent answer from a business's own documents instead of guessing from what it memorized during training. Picture a 22-person accounting firm in Phnom Penh that wired a chatbot to its employee handbook: an employee asked about parental leave and got a confident answer citing a policy replaced three versions earlier, and nobody caught it until a manager checked the real document.

That gap, between an AI that remembers vaguely and one that checks first, is what retrieval augmented generation closes: how it works step by step, what it costs to run, and the one problem most RAG guides skip, Khmer-language documents.

What Is RAG, and Why Does It Stop an AI From Making Things Up?

Retrieval augmented generation is a technique that searches a business's own documents for the most relevant passages and hands them to an AI model before it writes an answer, so the model answers from what it just read rather than from memory alone. In practice, RAG turns a folder of PDFs, spreadsheets and wiki pages into a searchable AI knowledge base the model can query on demand.

Left ungrounded, large language models invent facts more often than most buyers assume. On the industry's most cited hallucination benchmark, models tracked by the Vectara Hallucination Leaderboard add unsupported claims to between 1.8% and 24.2% of the summaries they produce, even among current frontier models (Vectara, 2026). A model answering from training data alone has no way to know a client's contract changed last week.

Retrieval failure rate with each RAG technique added
Chart: TechFlow Agency. Data: Anthropic, Contextual Retrieval, 2024

How Retrieval Augmented Generation Works, Step by Step

Retrieval augmented generation runs roughly the same sequence on every question, whether an AI agent is answering an HR query or pulling a shipping contract clause.

  1. Chunk the documents. Break each file into passages of a few hundred words, small enough to stay specific, large enough to still make sense on their own.
  2. Embed each chunk. Convert every passage into a vector, a list of numbers capturing its meaning, using a model such as OpenAI's text-embedding-3-small at $0.02 per million tokens, or Voyage AI's equivalent lite tier at the same rate (OpenAI, 2026; Voyage AI, 2026).
  3. Store the vectors. Save the embeddings in a vector database, most often Pinecone, Weaviate, or Postgres with the pgvector extension, indexed for fast similarity search.
  4. Retrieve the closest matches. When a question comes in, embed it the same way and pull the top-matching chunks, typically the top 10 to 20, from the index.
  5. Generate a grounded answer. Hand the retrieved passages to the language model, Claude, GPT or another, along with the question, so it answers from what it just retrieved instead of from memory.

Anthropic's engineering team found a sixth step closes much of that gap: prepending a short context note to each chunk before it gets embedded. Contextual embeddings alone cut retrieval failures by 35% against a 5.7% baseline; stacking contextual embeddings, keyword search and reranking cut failures by 67% (Anthropic, 2024). Teams already running workflows through Claude Code can prototype that step directly inside it; see Claude Code beyond coding.

What Does a RAG System Cost to Run for a Small Business?

A RAG system for a business with a few hundred documents costs far less to run than most owners expect, usually under $100 a month, with most of the recurring spend sitting in the vector database and the generation calls rather than the one-time indexing step.

A 30-person logistics company with 500 shipping contracts, about 2 million tokens once chunked, pays roughly four cents to embed it all with OpenAI's text-embedding-3-small, a cost repeated only when documents change (OpenAI, 2026). The ongoing spend is the database subscription and the generation calls on every question.

Vector databaseStarting costGood fit forNotes
pgvector (Postgres extension)No extra chargeA team already running Postgres, under a few million vectorsSelf-hosted, so someone on the team owns the server
Weaviate CloudFree tier, then pay-as-you-goA managed option without a big upfront commitmentFree tier never expires at 100,000 objects; Flex plan has a $45/month minimum plus usage (Weaviate, 2026)
PineconeFree tier, then $50/month minimum on StandardTeams wanting the broadest ecosystem of integrationsRead units run $16 to $18 per million above the free tier (Pinecone, 2026)

For a business this size, pgvector or Weaviate's free tier usually covers the entire document set at close to no cost. Past that, Weaviate's Flex plan carries its own $45/month floor, and Pinecone's $50 minimum earns its keep once a team would rather not run a server at all. We would not wire a production support agent straight to a free-tier database for a client expecting same-day answers: migrating a live index later costs more than scoping the right tier from the start.

Screenshot of Pinecone vector database pricing page showing plan tiers
Pinecone's pricing page: free tier limits and per-unit read and write costs. Screenshot: pinecone.io, October 2026

Why Does RAG Perform Worse on Khmer-Language Documents?

RAG performs worse on Khmer-language documents than on English ones because the embedding models doing the retrieval are trained overwhelmingly on English, Chinese and other high-resource languages, and Khmer is not one of them. A retriever can score a Khmer passage as a weaker match than an equivalent English one purely because the model represents Khmer text less precisely, not because the passage is irrelevant.

Picture a Phnom Penh NGO running parallel Khmer and English program reports. A Khmer-only passage about a specific grant condition can sit in the index yet never surface in the top results, not because the policy is missing, but because the retriever's similarity score for Khmer text runs systematically lower than for the matching English passage.

We test retrieval quality against a client's real Khmer-language documents before we scope a RAG project, not against the English demo in a vendor's documentation: a benchmark score tells you nothing about how a model handles a two-page Khmer HR policy with no English equivalent. Multilingual embedding models exist and some perform closer to parity on Khmer, but the only way to know is to run the business's own files through one. Cambodia's own AI adoption data backs this up: organizations here trail individual AI usage, weakest on governance and process integration (Cambodia SME AI maturity study, 2026), exactly the kind of gap an untested retriever hides.

RAG or Fine-Tuning: Which One Fixes a Wrong-Answer Problem?

RAG fixes a wrong-answer problem caused by missing or outdated information, while fine-tuning fixes a problem caused by the model's tone, format or reasoning style, and the two solve different failures even though both get pitched as "teach the AI about your business."

Fine-tuning retrains the model's weights on examples, baking today's documents into the model itself; the moment a policy changes, the answer is wrong until it gets retrained, an expensive cycle for a small business. RAG keeps the documents outside the model and searches them fresh on every question, so updating a PDF updates every future answer immediately, with no retraining involved.

We default every agent build that touches a client's own documents to RAG rather than fine-tuning, because fine-tuning bakes this week's price list into the model's weights, and the moment that price list changes, every answer is wrong until someone pays for another training run. The two are not mutually exclusive: a model can be fine-tuned on tone and still retrieve its facts through RAG.

Is RAG Still Worth It Once an AI Agent Can Browse the Web Itself?

RAG is still worth it once an AI agent can browse the web, because web search answers what is publicly available while RAG answers what is specific to one business: a contract clause, a price list, an HR policy, none of which a public search engine will ever index.

The dominant 2026 pattern, often called agentic RAG, pairs the two rather than choosing between them: an agent routes each question to the open web, the internal document index, or both, then merges what it finds before answering. In our view, this is where what an AI agent is and what RAG does start to blur. An agent that retrieves, reasons and acts needs a working agent harness just as much as a good retriever: the harness stops a wrong retrieval from becoming a wrong action, not just a wrong sentence.

What to Check Before You Wire an AI to Your Documents

  • Test retrieval on your real documents, not a demo. Especially in Khmer; a vendor's English benchmark score will not tell you how it performs on your own files.
  • Price the vector database at your actual document count, not enterprise scale. Most businesses under a few thousand documents fit a free or near-free tier.
  • Decide your update cadence before launch. A document that changes weekly needs a re-indexing step built in, not a one-time import.
  • Separate retrieval from reasoning. A RAG system bolted onto a weak prompt still produces vague answers; retrieval only gives the model better raw material.
  • Scope the agent harness, not just the retriever, if the AI will also take actions. For wiring a retriever into an automated workflow, see the automations worth building first before picking a tool.

Weighing RAG against a simpler document search, or unsure if your document set even needs one? Our AI agents work starts with a free 1 to 2 hour process-mapping audit, so we tell you honestly whether RAG solves the problem before quoting anything. Browse our project work to see how we have approached this before, or request a scoped estimate once you know your document volume.

Prefer to chat? Message our founder directly on Telegram (@maxgrolier), or book a call with the team.

Frequently asked questions

Does RAG eliminate hallucinations completely?

No. RAG reduces hallucinations by grounding answers in retrieved documents, but it does not eliminate a model's ability to misread or overstate what a passage says. Even models tested on retrieval-grounded benchmarks still add unsupported details to a share of their outputs (Vectara, 2026), so a human review step still matters.

Can a small business in Cambodia build RAG without hiring engineers?

Mostly, yes. No-code platforms like n8n can wire a vector database and a language model together for most document sets, though a Khmer-language or very large set benefits from an engineer checking retrieval quality first.

How is RAG different from uploading documents straight into a chat window?

Uploading files into a chat conversation works for a single session, but it reprocesses the entire file on every question and hits a hard size limit quickly. RAG indexes documents once, searches only the relevant passages per question, and scales to thousands of files without resending them each time.

Does RAG work with scanned PDFs and Khmer-language documents?

It can, but both add a step most guides skip. Scanned PDFs need OCR before chunking, and Khmer documents need an embedding model tested specifically on Khmer text, not assumed from an English benchmark.

How often does a RAG knowledge base need updating?

As often as the source documents change. A price list that updates weekly needs weekly re-indexing; a static policy might only need re-embedding a few times a year. A stale index produces stale answers even with a perfect retriever.

Share

Written by

Maximilien Grolier

Founder & CEO

LinkedIn ↗

Have a project in mind?

Free · No commitment · 30 minutes