# How to Build an AI Chatbot Trained on Your Own Business Data (RAG Explained)

> Retrieval-augmented generation (RAG) lets an AI chatbot answer from your own documents, website and product data, with sources. How it works, what makes answers accurate, and how to launch one.

Source: https://mkwebguru.co.uk/blog/ai-chatbot-trained-on-your-data

Published: 2026-11-25 · Author: MK WebGuru Team · Category: AI Agents

**To build an AI chatbot that answers from your own business data, you use retrieval-augmented generation (RAG): your documents, website pages and product data are split into passages, converted into embeddings and stored in a vector database; for each question the chatbot retrieves the most relevant passages and a language model writes an answer based only on them, citing its sources.** You don't need to train or fine-tune a model.

## Why not just use ChatGPT?

General AI assistants don't know your prices, policies, stock, opening hours or the details of your services, and they may confidently guess. RAG keeps the AI's language skills but grounds every answer in **your** facts, and lets you update those facts by updating documents, not models.

## How RAG works, step by step

1. **Collect** the sources: website pages, help centre, PDFs, policies, product catalogue, past support answers.
2. **Clean** them: remove duplicates and outdated versions. This step decides most of the quality.
3. **Chunk**: split documents into meaningful passages with titles and metadata (product, region, date).
4. **Embed**: convert each passage into a vector, a numerical fingerprint of its meaning.
5. **Store** vectors in a vector database such as Pinecone, Weaviate, Qdrant, or **pgvector** inside PostgreSQL/Supabase (see [PostgreSQL vs MongoDB](/blog/postgresql-vs-mongodb)).
6. **Retrieve**: for each question, find the passages closest in meaning, often combined with keyword search and re-ranking ("hybrid search").
7. **Generate**: the model answers using only the retrieved passages, with citations, and says "I don't know" when the sources don't cover it.
8. **Sync**: when your website or documents change, the index updates automatically.

## What makes answers accurate

- **Clean, current content**: one source of truth per topic.
- **Good chunking**: passages that make sense on their own.
- **Metadata filters**: so a UK customer gets UK delivery rules.
- **Hybrid search and re-ranking** for product codes, names and exact terms.
- **Strict instructions**: answer only from sources, cite them, admit gaps.
- **Evaluation**: a test set of real customer questions with expected answers, re-run after every change.

## From chatbot to support agent

Once the assistant can also **take actions** (look up an order, book an appointment, create a ticket, start a return with approval), it becomes an AI agent. See [what is an AI agent](/blog/what-is-an-ai-agent). On [The House48 Inc's](/portfolio/house48-ai-property-agent) site, the assistant answers questions, plans investments and recommends properties from live listings.

## Where to deploy it

Website chat, **WhatsApp Business**, Instagram and Messenger, your helpdesk (Zendesk, Intercom, Freshdesk, Gorgias), and internal tools like Slack or Microsoft Teams for staff knowledge.

## Privacy and security

- Use AI providers' business terms that don't train on your data.
- Restrict retrieval by user role so staff-only documents never reach customers.
- Mask personal data in logs.
- Self-host open-source models when data must stay in your environment.

## Costs

Building a knowledge assistant for one channel starts at **$450**; adding actions and CRM integration from **$1,200**; multi-channel support agents are quoted individually. Running costs (model usage and vector storage) are usually modest. See our [AI chatbot service](/services/ai-chatbot-development) and [AI-ready data](/services/ai-data-engineering), or [send us your website](/contact?topic=ai) for a demo on your own content.
