A custom AI chatbot is more than a ChatGPT window on your website. It is several parts that together make sure it answers about your company, from your material and in your customers' language – and knows when to hand the conversation to a person. This guide explains how an AI chatbot works inside and how to roll it out on a business website or online shop step by step.
How an AI chatbot works in short
When a visitor types a question, the chatbot doesn't just pass it to a language model. It first searches your material for passages related to the question and sends those to the model together with instructions on how to answer. The model turns them into a reply in plain language.
- A customer types a question into the chat window on your website.
- The chatbot searches your knowledge base for the most relevant information.
- The language model receives the question, the information found and the rules of behaviour.
- The model writes the answer – or says it doesn't know and offers a person.
- If the chatbot is connected to your systems, it can check an order status, log an enquiry or offer an appointment.
What an AI chatbot is made of
| Part | What it does |
|---|---|
| Language model (LLM) | Understands the question and writes the answer in plain language, in several languages |
| Knowledge base | Your material – FAQs, price lists, terms, products, internal documents |
| Retrieval (RAG) | Finds the passages in your material the model should answer from, for every question |
| Instructions and rules | Tone of voice, what the chatbot may and may not do, when to hand over to a person |
| Integrations | Connections to your online shop, CRM, booking or inventory system |
| Chat window | The interface on your website in your brand's design, embedded in your existing pages |
| Admin | Conversation history, statistics and editing of the material |
Where the chatbot gets its answers and why it doesn't make things up
Language models can write convincingly even about things they don't know. That is why a business chatbot shouldn't answer from the model's “general knowledge” but only from your material. This approach is called RAG (retrieval-augmented generation) – generating the answer from retrieved sources.
The second safeguard is the instructions: the chatbot gets a clear rule that if it can't find the answer in the material, it says so and offers a contact person. The third is testing on your customers' real questions before launch.
The quality of the answers therefore depends mostly on the material. An outdated price list or conflicting information in two places on your website won't be fixed by the chatbot – it will just repeat it.
How the chatbot is added to a website or online shop
A chatbot is usually added to an existing website with a short snippet of code that shows the chat window on the pages you choose. The website doesn't need rebuilding – it works this way on WordPress sites, on common online shop platforms and on custom-built websites.
The chat window adapts to your brand: colours, fonts, the welcome message and which pages it appears on. On an online shop's product pages the chatbot can open differently than on the contact page.
Connecting it to your business systems
A chatbot without integrations can answer questions. A chatbot with integrations can also get the request done – and that is usually where the biggest time savings are.
- online shop: product availability, order status, shipping and returns
- CRM: logging the enquiry and contact straight to a salesperson, with the whole conversation
- booking calendar: offering free slots and making the booking
- email or helpdesk: handing the conversation to the team with its full history
- internal documents: answering employees from policies and procedures
Rollout step by step
- Decide what the chatbot should answer and what is no longer its job.
- Gather the material and fix the places where information contradicts itself.
- Set the tone, the welcome message and the rules for handing over to a person.
- Build a first version and test it on 30–50 real questions.
- Connect the chatbot to the systems it needs (online shop, CRM, calendar).
- Put it on the website, first on selected pages or with the team watching.
- In the first weeks, read the conversations and add material wherever the chatbot hesitated.
Security, GDPR and the AI Act
Since 2 August 2026, Article 50 of the EU Artificial Intelligence Act applies: people must know they are interacting with an AI system unless it is obvious from the circumstances. A clear label in the chat window is enough.
If the chatbot collects names, emails or the content of enquiries, the GDPR applies. Decide where conversations are stored and for how long, mention them in your privacy policy and keep anything customers shouldn't see out of the knowledge base.
Looking after it after launch
- updating the material when prices, services or terms change
- regularly reading the conversations the chatbot couldn't answer
- tracking how many conversations it resolved without a person
- adjusting the instructions when customers ask differently than you expected
How we do it at MacZaj
We build AI chatbots to order from your material, set them up to answer in your customers' language and hand the conversation to a person when unsure, and embed them in your existing website or online shop without rebuilding it. After an initial consultation we send you a detailed quote within 24 hours, and ongoing support is available after launch.