AI & automation11 min readReviewed by the Softivum team,

What is a RAG chatbot, and when does a business need one?

Short answer

A RAG chatbot searches your own documents for the passages that match a question, then has a language model answer from those passages and cite them. A business needs one when the answers live in many documents that change, such as policies, manuals and past tickets. If the content fits on a single FAQ page, a simpler bot or a search box does the job.

A support executive holds a phone chat and an open product manual marked with a yellow tab, in front of a shelf of binders.

The key points

  • RAG stands for retrieval-augmented generation: retrieve the right passages first, then generate an answer grounded in them.
  • It suits large or changing document sets; a small knowledge base can go straight into the prompt instead.
  • Permissions are enforced at retrieval time, so a support bot never sees HR files or another customer's records.
  • Quality is measured against a test set of real questions with expected answers, agreed before the build starts.

What does RAG mean in plain terms?

Retrieval-augmented generation pairs a search step with a language model. When a customer asks a question, the system first finds the passages in your documents most likely to hold the answer, places them in front of the model, and asks it to answer from that material alone. The term comes from a 2020 research paper by Patrick Lewis and colleagues, Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks, which combined a pre-trained generator with a searchable index of Wikipedia. The paper named two problems with models that rely on what they learned in training: updating their world knowledge, and showing where an answer came from. Those are the same two problems a business has.

Take a distributor of water pumps. A dealer writes on WhatsApp: is the motor on the 1 HP model covered if it burns out in month ten? A general chatbot guesses from training data. A RAG chatbot finds the warranty clause in your current warranty PDF, answers from it, and shows which document and section it used. When you revise the warranty next quarter, you replace the PDF and the bot answers from the new version the same day, with no retraining.

Google's grounding documentation describes the goal as connecting model output to verifiable sources of information. That is the useful way to think about a RAG chatbot for business: an answer engine that can point to its evidence, unlike the general-purpose chatbot that only reads a short brief. The WhatsApp bot API is what delivers customer messages to the retrieval step.

When does a business need RAG rather than something simpler?

When the answers are spread across more material than fits comfortably in one prompt, and that material changes. Anthropic's contextual retrieval write-up makes the opposite case explicitly: a knowledge base small enough to fit in the model's context window can go into the prompt in full, with no need for RAG, and prompt caching keeps that fast. A clinic with one page of timings, fees policy and directions does not need a retrieval pipeline; it needs the booking, reminder and report-link rules in how a doctor's clinic should use WhatsApp. A manufacturer with three hundred product manuals, a service bulletin archive and a warranty policy per product line does.

Fine-tuning is the other option buyers ask about, and it solves a different problem. OpenAI's model optimization guide presents fine-tuning as a way to make a model consistently format responses, classify inputs or follow a specific output style, while information from outside the model's training data, such as data from private databases or current information, goes into the request as context. Facts that change belong in retrieval. A tone of voice or a fixed reply format can belong in fine-tuning. Most support bots need only the first.

A plain FAQ page or site search still wins when customers ask a small set of predictable questions and are happy to read. RAG earns its place when people ask in their own words, in several languages, about details buried in long documents.

Which business documents can a RAG chatbot read?

Anything that holds the answer in text: policy PDFs, product manuals and spec sheets, SOPs, price-list notes, onboarding guides, the replies your team already sends on WhatsApp, and resolved support tickets. OpenAI's file search documentation lists PDF, Word, PowerPoint, Markdown, HTML, JSON and plain text among the supported file types, which covers most of what a small business keeps in Google Drive.

Three sources need care. Past tickets carry customer names, phone numbers and order details, so they are cleaned before indexing and only the resolution is kept. Scanned PDFs have no text layer and go through OCR first, or the bot simply cannot see them. Live facts such as stock, order status and today's price should never be answered from a document copy; the bot looks them up from your system through an API call at the moment of the question, which is where a chatbot starts to behave like an AI agent.

How do you stop it retrieving the wrong person's documents?

By deciding what each user is allowed to see before the search runs, never by asking the model to keep a secret. OWASP's Top 10 for LLM applications lists vector and embedding weaknesses as its own risk for RAG systems, including misaligned access controls that expose sensitive embeddings and context leaking between users in a shared vector database. Its prevention advice is fine-grained, permission-aware vector stores with data partitioned by access level. The related entry on sensitive information disclosure adds least-privilege access to sensitive data and limiting what external data the model can reach.

In practice that means these rules, written into the scope:

  • A customer-facing bot indexes only customer-facing content. HR policies, payroll, contracts and board papers live in a different index, or are not indexed at all.
  • Every chunk carries metadata such as customer ID, dealer region or department, and the search filters on the logged-in user's attributes before results reach the model. OpenAI's file search supports this kind of metadata filtering.
  • A dealer portal bot retrieves one dealer's invoices and schemes, never another dealer's, because the filter is applied by the server, not by the prompt.
  • Only content from sources you own is ingested, and uploads are reviewed, since OWASP also warns about poisoned documents skewing answers.
  • Every retrieval is logged with who asked, which chunks came back and what was answered, so a complaint can be traced.

How is the content kept up to date?

Freshness is a pipeline job, not a monthly reminder. Each source has an owner and a sync rule: a policy folder in Google Drive re-indexes when a file changes, a help centre re-indexes on publish, and a deleted document is removed from the index the same day so the bot stops quoting it. Each chunk keeps the document's title, version and effective date, which lets the bot prefer the current policy and lets your team see which version it quoted.

Conflicts are the quiet failure. If last year's returns policy and this year's both sit in the index, the bot may blend them. The sync rule removes superseded versions, and the test set includes questions whose answer changed, so a stale answer shows up as a failed test rather than a customer complaint.

How do you know a RAG chatbot is answering correctly?

With a test set built from real questions before the build starts. Anthropic's guidance on building evaluations is to make tests task-specific, mirror the real distribution of questions, include edge cases such as irrelevant or missing input, and automate grading where possible, with an LLM grader that is generally a different model from the one being tested. For a support bot, the set is pulled from your own inbox and WhatsApp history: the common questions, the awkward ones, and questions it must refuse.

Each test records the question, the expected answer and the document that should be retrieved. That allows two separate checks. Retrieval: did the right passage come back? Groundedness: is every claim in the answer supported by the retrieved text? Anthropic's advice on reducing hallucinations supports the same design: give the model permission to say it does not know, restrict it to the provided documents, and have it cite a supporting quote for each claim or withdraw it. The set runs again after every change to documents, prompts or models. Answering from approved text is also what protects you if a customer relies on a wrong answer; see is a business liable for what its chatbot says.

What drives the cost of a RAG chatbot?

No fixed figure applies, because the bill follows your volume and your content. The drivers are predictable, and each one is settled in the scope:

  • Document volume and how often it changes, since every change means new embeddings.
  • Questions per month, and how many retrieved passages each answer sends to the model, because those passages are billed as input.
  • Whether a reranking step runs on every question.
  • Where the vector store lives: a managed service, or a database in your own cloud account.
  • The channel: under Meta's WhatsApp pricing rules, service replies are free up to a monthly tier per business number and charged after it, while template messages the business starts are charged by category and the recipient's country code, on top of the AI usage.
  • Human time to own the sources and review failed answers each week.

How does Softivum scope and build a RAG chatbot?

The scope is written before any code. It lists every source the bot may read, the questions it must never answer, the handover rule to a person, the languages, which can include English, Telugu and Hindi, and the test set the build is judged against. You approve the test set first, so success has a definition both sides agreed. Each week you see a demo on the real bot answering your real questions, with the failures shown next to the passes.

The model provider account, the vector store, the WhatsApp Business account and the code sit in your name. The bot is built as an AI chatbot on your website or WhatsApp, and where it needs to read live order or stock data it connects to your systems through AI integrations. Before the build, the data questions are settled in writing, following how your data is handled when you add AI features. To compare suppliers, the questions to ask before hiring a chatbot developer apply to RAG work too, and how much customer support you can automate helps decide which questions the bot answers alone and which it drafts for a person.

RAG chatbot vs the alternatives

RAG chatbot vs the alternatives
QuestionFAQ page or site searchPlain chatbot with a promptRAG chatbotFine-tuned model
Where answers come fromPages you wroteA short brief in the promptPassages retrieved from your documents per questionPatterns learned in training
How it handles changed contentEdit the pageEdit the promptRe-index the changed documentRetrain
Can it show its sourceThe page is the sourceOnly by quoting the briefYes, document and sectionNo
Content size it suitsA few dozen questionsA brief that fits in one promptLarge or growing document setsNot a store of facts
Permissions per userPage-level loginOne brief for everyoneFiltered per user at retrievalNone per user
Best fitPredictable questions, readers who browseOne location, short policiesManuals, policies, tickets, dealer documentsFixed formats, classification, tone

How a RAG chatbot is built

  1. Ingest the sources

    Connect the agreed folders, help centre and ticket exports. Convert each file to clean text, run OCR on scans, and strip personal data from tickets.

  2. Split into chunks

    Cut documents along their own headings and clauses so each chunk holds one complete point. Anthropic's contextual retrieval method adds a short line of context to each chunk, such as the product and policy it belongs to, before indexing.

  3. Create embeddings and a keyword index

    Turn every chunk into an embedding for meaning-based search and keep a keyword index alongside it, so part numbers and model codes match exactly.

  4. Store with metadata

    Save chunks in a vector store with document name, version, effective date and access attributes, which the permission filter and the citations both depend on.

  5. Retrieve and rerank

    Search with the user's permission filter applied, take the top candidates from both indexes, and rerank them so only the most relevant passages reach the model.

  6. Answer with citations

    Instruct the model to answer only from the retrieved passages and name the document and section for each claim, the way OpenAI file search returns file citations with its results.

  7. Refuse and hand over

    When nothing relevant comes back, the bot says it does not have that information and passes the conversation, with the transcript, to a person.

Before you commission a RAG chatbot

  • A list of every source the bot may read, each with a named owner
  • A list of documents it must never read, such as HR, payroll and contracts
  • A rule for which customer or dealer can see which records
  • A test set of real questions, expected answers and expected source documents
  • Questions the bot must refuse, and the handover route when it does
  • A sync rule for changed and deleted documents
  • Model, vector store and channel accounts registered in your company's name
  • Someone who reviews failed answers every week

Sources

Rules and guidance this answer relies on. Policies change, so check the current version before acting on it.

  1. arXiv: Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (Lewis et al., 2020)
  2. OWASP GenAI Security Project: LLM08:2025 Vector and Embedding Weaknesses
  3. OWASP GenAI Security Project: LLM02:2025 Sensitive Information Disclosure
  4. Anthropic: Introducing Contextual Retrieval
  5. Claude Docs: Define success criteria and build evaluations
  6. OpenAI API Docs: File search
  7. Google Cloud: Grounding overview
  8. Meta for Developers: Pricing on the WhatsApp Business Platform

Questions people also ask

Usually, for anything beyond a small document set. Embeddings need somewhere to be stored and searched by meaning. That can be a managed service from the model provider or a database in your own cloud account; the choice depends on volume, data location and who maintains it.

It should say so and hand the conversation to a person. The model is instructed to answer only from retrieved passages, and the test set includes questions with no answer in the documents, so a made-up reply shows up as a failed test before launch.

For facts, yes. Policies, prices and product details change, and retrieval lets you update them by replacing a document. Fine-tuning suits fixed formats, classification or a consistent tone, and many support bots never need it.

Want this applied to your business?

Tell us what you are planning in a free 30-minute call, or have your current website checked first with no call needed.

Get a Free 2-Minute Website Audit

Free 30 minutes · no obligation

WhatsAppCall