A chatbot is a program that holds a conversation with a person in a text window: on a website, in a messenger, or in an app. An AI chatbot understands questions however they’re phrased, takes its answers from your company’s own material, and hands complex cases to a person on your team. Unlike ChatGPT, it talks only about your business and says only what you’ve approved.

So how do AI chatbots work? This guide walks through it step by step. It covers how an AI chatbot finds an answer, what to prepare before launch, how to check its answers, and when a business doesn’t need one. It’s current as of November 2026. We’ve been building AI into client products since 2023, so the examples come from our own projects.

What a chatbot is and how an AI chatbot differs

There are two main types of chatbot.

A rule-based chatbot follows a script written in advance. It shows buttons, offers preset options, and walks the person down one branch of a decision tree. Some rule-based bots also match keywords to an intent, so “where is my order” triggers the order-status branch. They’re predictable and inexpensive, but they get lost as soon as someone types something the script didn’t foresee.

An AI chatbot runs on a large language model (LLM), the same kind of technology behind ChatGPT, Claude, and Gemini. The model understands free-form questions and writes answers in natural language. To stop it from making things up, a business chatbot is connected to a knowledge base. It answers from approved sources, not from the model’s general knowledge.

Rule-based chatbotAI chatbot on a knowledge baseGeneral-purpose ChatGPT
How it reads questionsbuttons, keywords, and expected phrasesany wordingany wording
Where answers come fromtext written in advanceyour company’s materialthe model’s general knowledge
What it does when it doesn’t knowsends you back to the menusays it will check and calls a personmay give a plausible but wrong answer
Who sets the topicsthe script authoryou: topic limits and rulesthe user
Where it fitsmenus, bookings, simple surveyssupport and sales with open questionsa person’s own tasks

The same chatbot can answer on your website, in WhatsApp, or in Messenger if it’s connected to those channels and to one knowledge base.

An AI agent goes a step further: besides answering, it takes actions across several systems, such as sorting requests, filling in documents, or updating the CRM. That kind of work is covered on our AI automation page.

How do chatbots work, step by step?

While the person waits for a reply, an AI chatbot goes through five steps.

  1. The question. A visitor types in their own words, for example: “Do you deliver on Saturdays?”
  2. Knowledge base search. The system looks through your company’s material for the passages closest in meaning: delivery terms, warehouse hours, the price list. The search works on meaning, not exact words, so a question about Saturday also finds the paragraph on “weekend dispatch.”
  3. An answer grounded in a source. The model receives the question, the passages it found, and an instruction to answer only from them. It writes a short answer and can add a link to the page the fact came from.
  4. A refusal or a handoff. If the fact isn’t in the knowledge base, the chatbot doesn’t invent it. It says it will check and passes the conversation, with its history, to a person. It does the same when a question goes beyond the agreed topics.
  5. The conversation log. Every conversation is saved. The log shows what the chatbot answered well, where it went wrong, and what the knowledge base is missing. Logs can hold customers’ contact details, so only the people responsible should have access.

Under the hood

Before launch, your documents are split into short passages, and each passage is turned into an embedding: a list of numbers that captures its meaning. The embeddings go into a vector database. When a question arrives, it gets an embedding too, and vector search returns the passages whose meaning is closest.

Those passages, the question, and the instructions go to the model together in one request. The model reads them as tokens, which are small pieces of words. Everything has to fit in its context window, the limit on how much text it can take in at once. That’s why the chatbot sends only the most relevant passages, not your whole knowledge base. The model then generates the answer token by token from that context.

Technical writing calls this approach RAG, retrieval-augmented generation: generating an answer from documents the system has just retrieved. Patrick Lewis and co-authors introduced the term in a 2020 paper. If what you need is search across documentation or an internal knowledge base, see our RAG development services.

What an AI customer service chatbot handles

An AI customer service chatbot pays off when your team answers the same questions again and again, customers write outside working hours, or enquiries need sorting before a person sees them. It answers at night and at weekends, customers don’t wait for someone to become free, and routine questions stop eating your team’s time. When a request reaches a person, the task is already clarified.

On a website, an AI chatbot typically:

  • answers common questions with a link to an up-to-date source: terms, timelines, specifications, prices;
  • helps people choose a product, service, or document from a description of what they need;
  • qualifies enquiries by clarifying the task and contact details, then creates a lead or ticket in your CRM;
  • checks the status of an order or request through approved APIs;
  • hands complex conversations to a person under your escalation rules, so the customer doesn’t have to explain everything twice.

The market is moving toward automated service. In a March 2025 forecast, Gartner predicted that by 2029 agentic AI will autonomously resolve 80% of common customer service issues without human intervention, leading to a 30% reduction in operational costs. That’s an industry forecast. A test on your real questions before launch shows how many conversations your own chatbot can close.

Where chatbots are used: examples

  • Online store: delivery, payment, returns, choosing a size or model.
  • B2B company: clarifies what the customer needs, collects company details, and creates a request in the CRM.
  • Delivery or repair service: order or repair status by reference number.
  • Clinic or salon: bookings, preparation instructions, staff schedules.
  • HR and internal support: answers for employees about leave, documents, and company policies.

In the first three examples, the chatbot mostly works with company data and business systems. In a clinic, its topic limits are especially narrow: it can book and remind, but medical advice comes from a doctor.

What to prepare before you launch a chatbot

The technical side is usually the most predictable part. Most of the time goes into decisions only your company can make. Before you start, answer five questions.

  • Knowledge base: which sources should the chatbot use: website pages, FAQs, the price list, delivery and warranty terms, manuals? Who keeps them up to date, and how often do they change?
  • Topic limits: what the chatbot talks about and what it doesn’t. For example, it advises on your range but gives no medical or legal advice and doesn’t discuss competitors.
  • Integrations: where do enquiries go: your CRM, a helpdesk, or email? What data can the chatbot read through APIs, such as order status?
  • Handoff rules: when the chatbot passes a conversation on (the customer asks for it, a complaint, a large order, an off-limits topic), to whom, and what it says at night when nobody is on shift.
  • Placement: which pages show the chat, whether it opens on its own, and how it looks on a phone.

When it isn’t yet clear whether a chatbot suits your task, that’s what an AI Discovery Sprint is for. It checks whether AI suits your use case, how ready your data is, the risks, integrations, and workflow economics, before you commit to a full build.

Can you trust its answers? What to test before launch

A language model can get things wrong even with a knowledge base. It can misread a question, pick up an outdated passage, or merge two facts into one. That’s why quality is tested before launch on real customer questions. A few good-looking demo examples won’t show it. We measure five things.

What we testHowWhat it tells you
Answer qualityan evaluation set of real questions from customers and staff, with correct answerswhich topics the chatbot gets wrong
Groundingwhether every answer rests on a passage from the knowledge basethe chatbot doesn’t invent facts on your behalf
Latencythe time from question to answervisitors don’t close the chat while waiting
Conversation costwhat one conversation costs in model requeststhe running budget is clear up front
Escalation ratethe share of conversations handed to a person (its inverse is often called the containment rate)what the knowledge base is missing and how much work stays with your team

Security is set up separately. The best-known risk is prompt injection, when a user types text into the chat that tries to make the chatbot break its rules. It’s first on the OWASP 2025 list of risks for LLM applications. The same page notes that RAG and fine-tuning don’t fully remove the risk. So we build in topic limits, prompt-injection protection, and conversation logs, and the knowledge base is updated manually after a review.

Before you approve a launch, ask your provider to show you the evaluation set and the test results.

What to do after launch

The first weeks after launch bring questions that weren’t in the evaluation set. They’re worth working through.

  • In the first month, review the log every week: where the chatbot answered badly, where it handed over to a person, and where the customer simply left.
  • Every unanswered question points to material the knowledge base is missing. Add it and check the new answer.
  • Watch the escalation rate: if it rises, the knowledge base has gaps or customers have started asking different questions.
  • A new price, delivery term, or opening hours should reach the knowledge base on the same day they reach the website.

AI in our projects: Würth, Growexa, LiteLang

The three projects below aren’t website chatbots, but they follow the same principle: company data, a language model, and a person who checks the result. We build AI chatbots on it too.

Würth Ukraine: AI catalogue search

In the Würth Ukraine B2B store, AI catalogue search works on the site’s product data, understands the query, asks clarifying questions, and helps users find the right item. Clarifying questions are exactly what a chatbot does with an incomplete request; here the result is a product instead of a text answer.

Growexa: AI forms on OpenAI and Claude

Growexa helps entrepreneurs turn a business idea into a structured business plan with financial projections. Its AI forms call OpenAI and Claude models through the API and suggest answer options for each field. The Growexa team edits the prompts in the admin panel itself, without developers. We’ve been developing and supporting the platform since 2023.

LiteLang: Claude turns a textbook into lessons

LiteLang is our own SaaS for English tutors, founded by the author of this guide. A tutor uploads a PDF textbook, and Claude by Anthropic splits it into units and lessons. The tutor reviews the result.

When you don’t need a chatbot

A chatbot doesn’t pay back the setup work in every business. We advise against one if:

  • there are few repeat questions and one person answers them all without strain;
  • every answer depends on an individual decision: a calculation, a site visit, a manager’s approval;
  • there’s no up-to-date knowledge base and nobody to maintain one, since a chatbot with stale data does more harm than no chatbot;
  • only a qualified professional should answer, such as a doctor, lawyer, or engineer;
  • your customers expect to talk to a person.

In a Gartner survey of 5,728 customers (December 2023), 64% said they would prefer companies didn’t use AI in customer service. Their top concern was that it would get harder to reach a person. So a good chatbot takes the routine questions and hands the rest to a person quickly.

What drives chatbot costs

Some costs come once, others every month.

  • The launch depends on the size of the knowledge base, CRM or helpdesk integrations, and the number of scenarios. At Strymba, an AI chatbot for your website starts from $700 and takes from 7 days.
  • Language models are billed by the amount of text they read and write, measured in tokens. So the cost grows with the number of conversations and with how many knowledge base passages go into each answer. We measure the cost of one conversation during testing.
  • Knowledge base updates take time from your team or a contractor, and the more often prices and terms change, the more time they take.

AI chatbot FAQ

01

How does a chatbot work?

A rule-based chatbot walks a person through prewritten branches with buttons or keyword matches. An AI chatbot understands free-form questions. It looks up the relevant passages in your knowledge base and uses a language model to write an answer from them. When the data runs out, it hands the conversation to a person.

02

Is a chatbot the same as ChatGPT?

No. ChatGPT answers on any topic from the model’s general knowledge. A business chatbot uses the same kind of model but answers only from your approved knowledge base and stays within set topics. Complex questions go to a person along with the conversation history.

03

Can a chatbot make up an answer?

A model can make mistakes. That’s why the chatbot is set up to answer only from passages it finds in the knowledge base. When there’s no evidence, it says it will check and hands over to a person. This risk is tested before launch on an evaluation set of real questions and monitored afterwards through the conversation log.

04

Who updates a knowledge base chatbot?

Usually someone on your side who owns the price list, terms, and standard answers. The sources, topic limits, and update process are agreed before launch, and the knowledge base is updated manually: new material is reviewed before the chatbot starts using it.

05

How long does it take to launch a chatbot?

From 7 days. The timeline depends on the size of the knowledge base, integrations, and the number of scenarios, as well as how ready your material is and how many approvals it needs.

Next step

Let’s talk about an AI chatbot for your website

Tell us which customer questions the chatbot should answer, and we’ll propose a format, budget, and timeline.

Discuss your chatbot