# How Does a RAG-Based Business Chatbot Work?

**Why doesn’t ChatGPT know your prices and policies, and how do you build a chatbot that answers only from your own documents?**

> A RAG chatbot first finds the relevant parts of your company’s knowledge, then writes its answer from them. That is why its answers are more accurate and much less likely to be made up. If the knowledge is missing, a good one says so and hands over to a person.

Author: Saman Ghahreman · Published: 2026-07-01 · Updated: 2026-10-10 · Canonical page: https://solocodelab.com/en/blog/how-rag-chatbot-works/

RAG stands for Retrieval-Augmented Generation. It solves the main problem of generic language models: they know nothing about your business and [may invent answers](https://solocodelab.com/en/blog/responsible-ai-2026-business-checklist/).

## How does RAG work, step by step?

1. The user asks a question.
2. The system finds the passages in your knowledge base that match the question.
3. Those passages go to the language model together with the question.
4. The model writes the answer from that approved knowledge and can name the source.

## Why are the answers more reliable?

Because the model doesn’t answer “from memory”. It answers from your documents. If the information isn’t in the knowledge base, a well-designed chatbot [honestly hands the user to a person](https://solocodelab.com/en/blog/ai-agents-2026-practical-business-guide/) instead of guessing.

## What do you need to build one?

- Your documents, prices and frequently asked questions
- Rules for answering and your brand tone
- A clear way to hand over to a person
- [Where it runs: website, Telegram, WhatsApp or an internal panel](https://solocodelab.com/en/services/ai-automation/)

## An important note for Persian content

Search quality on Persian text depends on cleaning up characters (Arabic vs Persian ye and kaf, zero-width non-joiners) and choosing a suitable embedding model. Before launch, test the chatbot with real, everyday-speech Persian questions from customers.

For the channels and cost of such a system, read [Telegram and WhatsApp chatbots](https://solocodelab.com/en/blog/telegram-whatsapp-chatbot-for-business/) and [the chatbot and model cost guide](https://solocodelab.com/en/blog/chatbot-and-ai-model-cost-guide/).

For a practical use of RAG in answering customers, see [AI customer support for small business](https://solocodelab.com/en/blog/ai-customer-support-for-small-business/).

> A good business chatbot knows when it doesn’t know and hands the user to a person. That is good design, not weakness.

## Frequently asked questions

### Does RAG replace support staff?

No. RAG answers the frequent questions so staff can focus on harder cases, and it passes the customer to a person when information is missing.

### What happens when company knowledge changes?

You update the knowledge base and the chatbot answers from the new version. There is no need to retrain the model.
