Build a custom AI chatbot with retrieval-augmented generation, not by retraining a model. Your documents are cleaned, split into passages, and indexed; when someone asks a question, the most relevant passages are retrieved and a large language model answers only from them, citing its sources and handing anything uncertain to a human.
That is how we build AI chatbots on OpenAI and Anthropic Claude models. Here is the approach in plain English, so you can judge any proposal before committing budget.
What is a custom AI chatbot trained on your own data?
A custom AI chatbot answers questions from your company's own knowledge — help articles, policies, product data, past tickets — rather than the open internet. A large language model supplies the language skills, your content supplies the facts, and the bot runs inside your website, app, or support tools.
The word trained is misleading. The model is almost never retrained: your knowledge base is searched for each question, and the relevant passages are handed over. That is why an AI chatbot trained on your own data can be updated the same afternoon a policy changes.
How does retrieval-augmented generation work in plain English?
Retrieval-augmented generation works like an open-book exam. Before answering, a search step finds the passages in your documents most relevant to the question. Those passages go into the prompt with an instruction to answer only from them, so the reply is grounded in your content and can cite exactly where it came from.
- Ingestion: help-centre pages, PDFs, and database records become clean text.
- Chunking: text is split into self-contained passages of a few paragraphs, headings attached.
- Embeddings: each chunk becomes a numeric vector that captures its meaning, so 'refund window' and 'can I return this' land close together.
- Vector database: embeddings are stored in a vector database such as pgvector on PostgreSQL, with source, date, and access metadata.
- Retrieval: each question fetches the closest chunks, ideally with keyword search and reranking to catch exact product names.
- Grounding and citations: the model answers only from those chunks and links each claim to its source.
The same pipeline underpins AI agents: with tool calling, the model can also check an order, open a ticket, or book a slot through your APIs, and open standards such as the Model Context Protocol (opens in a new tab) make those connections easier.
RAG vs fine-tuning: which is better for a business chatbot?
For a chatbot that must answer accurately from your business information, RAG wins in almost every case: it is cheaper, updates instantly when documents change, and cites sources. Fine-tuning changes how a model writes — tone, format, specialist vocabulary — but it is a poor, expensive way to teach it facts.
| Criterion | RAG (retrieval) | Fine-tuning | Off-the-shelf builder |
|---|---|---|---|
| Keeping answers current | Re-index a document in minutes | Retrain after every change | Re-sync, with limited control |
| Source citations | Yes, on every answer | No | Depends on the vendor |
| Hallucination control | Strong: answers limited to retrieved text | Weak: facts recalled from memory | Moderate, few tuning options |
| Removing data later | Delete the document and re-index | Hard once learned into weights | Depends on vendor retention terms |
| Upfront cost | Moderate; from $1,499 with us | Higher: curated dataset plus training runs | Low monthly subscription |
| Best for | Support, sales, and internal knowledge bots | Fixed tone or format at high volume | Simple FAQ bots and experiments |
Our recommendation: start with RAG, keep off-the-shelf builders for simple FAQ bots, and fine-tune only with hundreds of good example conversations and a style problem prompting cannot fix. Pasting a whole knowledge base into a long context window suits a handful of pages; beyond that, cost and response time climb.
How do you build a custom AI chatbot step by step?
A reliable build has nine steps: scope the job and audit your data, clean the knowledge base, chunk and index it, tune retrieval, add guardrails, design the human handoff, score an evaluation set, launch gradually, then monitor and improve weekly. Most of the effort goes into data and evaluation, not the model.
- Scope and data audit: pick one job, such as first-line support, define what the bot must never do, and list every source.
- Clean the knowledge base: remove outdated policies, duplicates, and contradictions — a stale policy becomes a confident wrong answer.
- Chunk and index: split content by meaning, attach metadata, and load the embeddings.
- Tune retrieval: test real questions, add reranking, and set a relevance threshold below which the bot declines to answer.
- Add guardrails: a system prompt limiting scope and tone, prompt-injection filters, and firm rules on money, health, and legal topics.
- Design the human handoff: trigger it on low confidence, frustration, or a request for a person, passing the transcript along.
- Build an evaluation set: at least 50 real questions with correct answers, and a pass mark agreed before launch.
- Launch gradually: one channel or a share of visitors first, with answer logging on from day one.
- Monitor and improve: review failed chats weekly, fix content or retrieval before prompts, and re-run the evaluation set after every change.
Where can you deploy an AI chatbot for your business?
One chatbot back end can serve several channels at once: a website widget, WhatsApp, a chat screen inside your mobile or web app, your helpdesk, or internal tools such as Slack and Microsoft Teams. Start where repetitive questions already pile up, then reuse the same knowledge base everywhere else.
- Website widget: the quickest route to an AI chatbot for customer support and pre-sales questions.
- WhatsApp: the default channel in India and many other markets. Meta allows bots serving your own customers, but its rules on general-purpose AI assistants changed in 2026 and vary by region, so stay business-specific and check the current terms (opens in a new tab).
- Inside your app: a chat screen in a Flutter or React app can use the signed-in user's orders or bookings.
- Helpdesk: in Zendesk, Freshdesk, or HubSpot, the bot drafts replies and hands over inside the same ticket.
- Internal tools: staff questions answered from HR policies and SOPs.
A useful side effect: if your help centre is public, the same clean, well-organised content is what AI search engines read when summarising your business, so the clean-up pays twice.
Is it safe to use company data in an AI chatbot?
Yes, if it is designed for it. Use business API terms that exclude your data from model training, keep personal data out of prompts unless it is needed, enforce the source documents' access permissions, and host data in the region your regulations require. Mask personal data in logs, and never put credentials in prompts.
- Personal data: mask names, phone, card, and ID numbers before text reaches the model or the logs.
- Access control: retrieval must respect permissions, so nobody sees a passage from a file they could not open.
- Data residency: confirm where your model provider and hosting store data, and that this suits GDPR or UK GDPR, India's Digital Personal Data Protection Act, Canada's PIPEDA, or US state laws such as California's CCPA.
- Retention: decide how long chats are kept, who reads them, and how data is deleted on request.
- Prompt injection: treat documents and user messages as untrusted, grant only the tools needed, and require human approval for refunds or anything irreversible.
How do you stop an AI chatbot from hallucinating?
You cannot make hallucination impossible, but you can make it rare and visible. Restrict answers to retrieved passages, require citations, set a relevance threshold below which the bot says it does not know, keep the scope narrow, and route uncertain questions to a person. Then measure accuracy against an evaluation set before every release.
In our projects, most wrong answers are not invented from nothing: retrieval supplied the wrong passage, or two documents disagreed. The fix usually lives in content and search — merging duplicates, adding metadata, reranking — not in longer prompts.
How much does a custom AI chatbot cost, and how long does it take?
At ZeevTech Solutions, a custom AI chatbot starts at $1,499, and a support chatbot grounded in your documentation typically costs $1,499 to $5,000. Multi-step agents that take actions run $5,000 to $20,000. A focused build ships in 3 to 6 weeks, with model usage billed separately by the provider.
| Cost item | Typical range | Notes |
|---|---|---|
| Build: grounded support chatbot | $1,499 – $5,000 one-off | Knowledge base, retrieval, guardrails, one channel, evaluation |
| Build: agent with actions | $5,000 – $20,000 one-off | Tool calling into CRM, booking, or order systems |
| Model API usage | Often tens to a few hundred dollars a month at small-business volumes | Scales with traffic; send simple questions to smaller, cheaper models |
| Vector storage and hosting | Usually modest; can run on existing PostgreSQL | Managed vector services cost more at scale |
| Ongoing improvement | A few hours a month, or a retainer | Content updates, log reviews, re-evaluation |
A grounded support chatbot usually takes three to four weeks: data audit, cleaning and retrieval, guardrails and integration, then evaluation and a staged launch. Several integrations, messy data, or per-user permissions over a large private library push it towards six weeks. For monthly running costs and how to estimate your API bill, see our guide to the cost to add AI to an app.
What mistakes should you avoid with a custom AI chatbot?
The costly mistakes are rarely about the model. They are feeding the bot unreviewed documents, launching without a human handoff or an evaluation set, trying to answer everything instead of doing one job well, fine-tuning to teach facts, and treating launch as the finish line rather than the start of weekly improvement.
- No content owner: without one, answers decay as prices and policies change.
- Measuring chat volume instead of resolved questions, deflected tickets, and handoff rate.
- Hard-wiring one model vendor instead of keeping models swappable.
- Hiding the human: customers forgive a bot that fetches a colleague, not one that loops.
If you are weighing a custom AI chatbot, list the 30 questions your team answers most often and where the answers live. That list is your scope, first evaluation set, and business case — and what we ask for in a free AI audit.
Services mentioned in this article
- AI Development & Automation Services — AI chatbots, agents, and document automation on OpenAI and Claude, grounded in your own data. From $1,499 in 3–6 weeks.
- API Development & Integration Services — REST API development and third-party integration in Node.js and Laravel — payments, CRM, ERP, and legacy systems. Integrations from $1,500; backends from $4,000.
- Cloud & DevOps Services — AWS and Firebase infrastructure, CI/CD, monitoring, and SLA-backed maintenance plans for live products.
Related guides
AI & Automation
AI Agents for Business: What They Can (and Can't) Automate in 2026
9 min read
Budgeting
How Much Does It Cost to Add AI to an App in 2026?
9 min read
AI & Automation
Vibe Coding vs Hiring Developers: Can AI Build Your App in 2026?
9 min read
More guides on our engineering and product blog.