---
title: "How to build an AI chatbot, with or without code — Dazza"
description: "How to build an AI chatbot for your website or business: the no-code route in an afternoon, the developer route with retrieval and guardrails, and the costs."
url: https://dazza.io/chatbots/how-to-build
updated: 2026-11-17
---

# How to build an AI chatbot: no-code and code, step by step

How to build an AI chatbot for your website or business: the no-code route in an afternoon, the developer route with retrieval and guardrails, and the costs.

By [William Mattey](https://dazza.io/authors/william-mattey)Founder, Wall & Fifth

*6 min read · Updated 17 Nov 2026 · 6 sections*

## IN SHORT

- Every AI chatbot needs content, retrieval, a language model, instructions, a chat interface, handover and testing.
- The no-code route takes an afternoon: give it your website, add Q&As, set a voice and rules, test, then install.
- Building your own takes weeks and a developer, and you own accuracy, security, the inbox and maintenance.
- Most bad chatbots fail on content and rules, not on the choice of AI model.

You can build an AI chatbot two ways: with a no-code builder that does the hard parts for you, or by assembling the pieces yourself on top of an AI model. The first takes an afternoon. The second takes weeks and a developer, and gives you full control.

Both routes need the same parts. This guide explains those parts, then walks through each route step by step, so you can choose with your eyes open.

## What every AI chatbot is made of

1. **Content.** What the chatbot knows about your business: website pages, help articles, documents, Q&As.
2. **Retrieval.** A way to find the right passages for each question. This technique, [retrieval-augmented generation (RAG)](https://arxiv.org/abs/2005.11401), was described by researchers at Facebook AI in 2020 and is now how nearly every business chatbot stays accurate.
3. **A language model.** Understands the question and writes the answer from the retrieved passages.
4. **Instructions.** The chatbot’s name, tone, and rules: what to answer, what to refuse, when to hand over.
5. **Actions (optional).** Tools to look things up or do things, such as tracking an order, with checks on who can use them.
6. **A chat interface.** The window on your website, or a connection to WhatsApp, email and other channels.
7. **Handover.** A way to pass the conversation to a person, and an inbox for them to reply from.
8. **Testing and monitoring.** A way to check answers before launch and see what’s happening after.

A no-code builder gives you all eight. Building your own means providing each.

## Route 1: build an AI chatbot without code

This works with most modern chatbot builders. The details below follow Dazza, but the steps are similar elsewhere.

### Step 1: give it your website

Sign up and enter your web address. The builder finds your sitemap and reads your pages, skipping baskets, logins and checkouts. Good builders work out what kind of business you are from the first pages.

### Step 2: add what your website doesn’t say

- **Q&As** for things your team knows but the site doesn’t: “Can I collect in person?” “Do you do trade discounts?”
- **Files**: price lists, policies, product sheets, in PDF or Word.
- **Your help centre**, if you have one on Zendesk, Intercom, Freshdesk or similar.

See our guide to the [AI knowledge base](https://dazza.io/ai-helpdesk/knowledge-base) for what to add first.

### Step 3: give it a name, a voice and rules

- A name, and a greeting that says it’s an AI assistant.
- A tone: friendly, formal, brief, detailed.
- Rules in plain English: “Always quote prices excluding VAT.” “Never recommend a competitor.” “If someone mentions a gas smell, give the emergency number and hand over.”

In Dazza this is the [agent studio](https://dazza.io/product/agent-studio).

### Step 4: add one job

Pick the most common thing customers ask you to *do*: book, quote, track, return, call back. Set what details to collect, what to check, and what happens at the end (email the team, share a link, call your system). Most builders have templates; Dazza has 22 [workflow templates](https://dazza.io/templates).

### Step 5: test it

Ask it 50 real questions from your inbox. Include ones your content doesn’t cover, ones with a wrong premise, a request for a person, and an attempt to talk it out of a rule. Fix wrong answers by fixing the content.

### Step 6: put it on your website

Copy the line of code into every page, or use your website builder’s plugin. See [how to add an AI chatbot to your website](https://dazza.io/chatbots/website).

### Step 7: watch and improve

For the first fortnight, read every handover and every question it couldn’t answer. Add answers. Correct mistakes at source.

**Time:** an afternoon for the first version, a couple of weeks of light review to get it good. **Cost:** free plans exist; paid plans for small businesses are roughly £30 to £120 a month.

## Route 2: build your own AI chatbot with code

Worth considering if you have developers, unusual requirements, or want the chatbot deep inside your own product. Here’s the shape of the work.

### Step 1: prepare and index your content

- Collect content: crawl your site, export your help centre, gather documents.
- Clean it: strip navigation, footers and cookie banners; keep headings.
- Split it into passages of a few hundred words, keeping each passage’s title and URL.
- Turn each passage into an embedding (a numeric representation of its meaning) with an embedding model, and store them in a vector database or a search index that supports vector search. Many teams combine this with keyword search, which catches product codes and names that embeddings miss.
- Re-index when content changes.

### Step 2: retrieve and answer

For each customer message:

1. Rewrite the question if needed, using the conversation so far (“What about the blue one?” becomes “Is the blue jacket waterproof?”).
2. Retrieve the top passages.
3. Send them to the language model with instructions: answer only from these passages, cite them, and say if they don’t contain the answer.
4. Stream the answer back to the chat.

### Step 3: add guardrails

This is where home-built chatbots most often fall short.

- **Grounding checks.** Verify that figures, prices and dates in the answer appear in the cited passages before the customer relies on them.
- **Prompt injection.** Assume some users will try to override your instructions; [OWASP](https://genai.owasp.org/llmrisk/llm01-prompt-injection/) ranks prompt injection the top risk for language-model applications. Never rely on instructions alone to protect anything that matters.
- **Scope.** Decide what the chatbot won’t discuss, and test that it refuses.
- **Disclosure.** Make clear it’s AI. In the EU, [Article 50 of the AI Act](https://artificialintelligenceact.eu/transparency-rules-article-50/) requires it.

### Step 4: add actions safely

Connect tools (your order system, booking system, CRM) through your own API or a standard such as the [Model Context Protocol](https://www.anthropic.com/news/model-context-protocol). For each tool, enforce in code: who can call it (verified customers only?), what needs the customer’s confirmation, and what needs a person’s approval. The model proposes; your code decides.

### Step 5: build the rest

- A chat widget that works on mobile, loads quickly and meets accessibility standards.
- Channels beyond the website, if needed: email threading, WhatsApp’s messaging rules, SMS.
- Handover: an inbox for your team, notifications, summaries, and a way back to the AI.
- Analytics: resolution, handovers, unanswered questions, ratings.
- Data protection: storage, retention, deletion requests.

### Step 6: test and monitor

Keep a set of test questions with expected answers and run them on every change. Log conversations (with consent and appropriate retention), sample them weekly and track accuracy.

**Time:** weeks to months for a production-quality first version, plus ongoing maintenance. **Cost:** developer time, model usage per message, embedding and hosting costs, and the cost of your team maintaining it.

## Which route should you take?

| Question | No-code builder | Build your own |
| --- | --- | --- |
| Time to first version | An afternoon | Weeks to months |
| Who maintains it | The vendor, mostly | Your developers |
| Channels, inbox, analytics | Included | You build them |
| Customisation | Within the product | Unlimited |
| Best for | Most businesses | Products with unusual needs and a dev team |

A middle path is common: use a no-code chatbot for customer service, and connect it to your own systems through webhooks, an API or MCP for the parts that are unique to you.

## Common mistakes

- **Starting with the model, not the content.** The model is the easy part.
- **No “I don’t know”.** A chatbot that always answers will sometimes invent.
- **Rules in the prompt only.** Anything that matters needs a check in code.
- **No handover.** Customers need a way out.
- **No testing before launch.** Your customers find the gaps instead.

## Build yours with Dazza

Dazza is the no-code route with the developer route’s safeguards built in. Give it your web address and it reads your site, works out your kind of business and suggests workflows. Its answers are grounded and cited, [fact-checked](https://dazza.io/help/fact-checks) on Growth and above, and actions run through [workflows](https://dazza.io/product/workflows) and [connections](https://dazza.io/product/connections) with verification, confirmation and approval checked in code. [Testing](https://dazza.io/product/testing) runs saved questions and simulated customers before you publish. Developers get [webhooks and a REST API](https://dazza.io/help/api) on Growth and above, and SDKs for [mobile apps](https://dazza.io/channels/mobile-apps). See [getting started](https://dazza.io/help/getting-started), or start free for 14 days.

## Questions people ask

### Can I build an AI chatbot without coding?

Yes. No-code chatbot builders read your website and documents, let you set a name, tone and rules, and give you one line of code (or a plugin) to put the chat on your site. A useful first version takes an afternoon.

### How much does it cost to build an AI chatbot?

With a no-code builder, from free plans to about £30 to £120 a month for a small business. Building your own costs developer time, AI model usage per message, hosting, and ongoing maintenance, which usually outweighs a subscription unless you have unusual needs.

### What do I need to build a chatbot that answers from my website?

Your content (website pages, help articles, documents), a language model, a way to retrieve the right passages for each question, rules about what it may say and do, a chat interface, and a way to hand over to a person. No-code tools package all of these.

### Which AI model is best for a chatbot?

For customer-facing chat, a fast mid-sized model from Anthropic, OpenAI or Google handles most questions well; larger models help with long or complex conversations. Grounding and guardrails matter more to accuracy than the choice of model.

## Sources

1. [Lewis et al., Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (2020)](https://arxiv.org/abs/2005.11401)
2. [OWASP: LLM01:2025 Prompt Injection](https://genai.owasp.org/llmrisk/llm01-prompt-injection/)
3. [Anthropic: Introducing the Model Context Protocol](https://www.anthropic.com/news/model-context-protocol)
4. [EU AI Act, Article 50: transparency obligations (practical guide)](https://artificialintelligenceact.eu/transparency-rules-article-50/)

## READ NEXT

- [**Customer service chatbots: the complete guide** What a customer service chatbot is, how AI chatbots differ from scripted ones, what they cost, how to choose one and how to set it up so customers trust it.](https://dazza.io/chatbots)
- [**AI chatbot for your website: how to choose one and add it** How to choose an AI chatbot for your website, what it should do, how it reads your pages, how to install it on WordPress, Shopify or Wix, and what it costs.](https://dazza.io/chatbots/website)
- [**AI knowledge base: how to build one an AI can answer from** What an AI knowledge base is, how AI answers from it, how to write and structure content for it, how to keep it current, and mistakes that cause wrong answers.](https://dazza.io/ai-helpdesk/knowledge-base)
- [**AI chatbot features: the checklist that actually matters** The AI chatbot features that decide results in customer service: grounded answers, handover, actions, channels, testing and data, with questions for vendors.](https://dazza.io/chatbots/features)
- [**Agent studio** Name your AI customer service agent, pick its tone and reply length, and write the rules it always follows. Try each change in a live preview, then publish.](https://dazza.io/product/agent-studio)
- [**Types of chatbots: rule-based, AI, hybrid and agents explained** The main types of chatbots explained: rule-based, keyword, AI (generative), hybrid and AI agents, plus types by purpose and channel, with when to use each.](https://dazza.io/chatbots/types)

WRITTEN BY

[**William Mattey**](https://dazza.io/authors/william-mattey) · Founder, Wall & Fifth

William Mattey is the founder of Wall & Fifth, the London product design and development studio that makes Dazza, and leads the team building it.
