Cover image for the article: AI chatbot for your website: a guide to choosing and setting one up
Apps & automation11 min read

AI chatbot for your website: a guide to choosing and setting one up

What can an AI chatbot for your website do, and what can it not do? Read about chatbot types, privacy, handover to a human agent and how to measure quality before launch.

D
Danial Dehhaghi
Founder & CEO, MyTarh

An AI chatbot for your website can answer customers' repetitive questions at any hour, guide them to the right page and lighten the load on your support team. But if it is launched without a plan, it will give wrong answers with complete confidence and damage customer trust. In this guide we explain what an AI chatbot can really do, how the different types differ, what to do with customer data and how to measure its quality before a public launch.

What exactly does an AI chatbot for your website do?

An AI chatbot is software that sits in the corner of your website or inside a page and replies to users' text messages in natural language. Newer versions run on large language models (LLMs), which means users do not have to type exactly the sentence you anticipated. Tasks a well-designed chatbot handles well:

  • Answering repetitive questions: working hours, shipping terms, returns, how to order and the questions asked dozens of times every day.
  • Guiding users to the right page: recommending the right product or service based on the user's needs and linking to that page.
  • Collecting initial details: getting the customer's name, phone number and needs before a sales rep calls.
  • Status tracking: if it is connected to your order system, it can report the status of a specific order.
  • Sorting and routing: recognizing whether a message is a complaint, a technical question or a purchase request, and passing it to the right person.

Tasks you should not hand to a chatbot

Language models sometimes produce answers that are fluent and convincing but wrong. That is why you should not hand these tasks to a chatbot, or only do so with human oversight:

  • Binding decisions: giving discounts, accepting returns, changing prices or any financial commitment.
  • High-risk expert advice: medical, legal or financial advice that carries liability.
  • Authentication and sensitive account actions: changing a phone number, password or payment details.
  • Information you have not given it: the chatbot does not know today's stock prices in your warehouse or your new returns policy unless it is connected to an up-to-date source.

A simple rule: a chatbot is not a substitute for a good support process. If your team's answers are inconsistent today, a chatbot will repeat the same inconsistency faster.

Three types of chatbot: rule-based, LLM-based and grounded in your own documents

When people talk about a "chatbot", they usually mean one of these three architectures or a combination of them.

Rule-based chatbot

A rule-based chatbot works with buttons, menus and a decision tree: "Do you have an order? Yes / No". Sometimes it also shows a pre-written answer by spotting a few keywords. Its behavior is fully predictable and it never makes up an answer, but if users type their question freely, it quickly hits a dead end.

Chatbot based on a large language model

Here the user's message is passed to a language model such as ChatGPT, Claude or Gemini, and the model writes the answer. It understands conversational language, spelling mistakes and complex questions much better, but if it relies only on its own general knowledge, it knows nothing about your business and may invent a price or a policy.

Chatbot grounded in your business documents (retrieval and generation)

This approach, also called RAG, is the most sensible choice for most business websites. It works like this:

  1. Your documents (FAQs, shipping and returns terms, product specifications, guides) are split into small chunks and indexed.
  2. When a user asks a question, the most relevant chunks are found.
  3. Those chunks are passed to the language model along with the question and the instruction: "Answer only based on this text, and if the answer is not in the text, say you don't know."

The big advantage of this method is that when you update the documents, the answers update too, and you do not need to retrain the model. Custom model training (fine-tuning) is mostly useful for adjusting the tone and style of answers or for very specialized tasks; it is not a good way to teach information that changes constantly, such as prices and stock.

Comparing the three approaches

Criterion Rule-based General LLM Grounded in documents (RAG)
Understanding free-form, conversational questions Weak Strong Strong
Accuracy about your business information High, but only in defined scenarios Low and risky Good, provided the documents are correct and current
Risk of making up a wrong answer Almost zero High Lower, but not zero
Monthly running cost Low Depends on conversation volume Depends on conversation and document volume
Maintenance Manually updating scenarios Tuning instructions Keeping documents up to date
Suitable for Fixed, limited processes General, non-sensitive uses Support and sales on business websites

In practice, a combination works best: ready-made buttons for frequent paths (such as order tracking) and a document-grounded part for free-form questions.

Privacy and customer data in an AI chatbot

This part is usually looked at last, when it should be decided first.

Where does the conversation text go?

If you use the API of an external language model provider, the user's message and chunks of your documents are sent to that provider's servers for processing. Before choosing, read that service's data retention and usage policy. The other option is running the model on your own server (on-premise), which keeps the data under your control, but it needs more powerful hardware and the quality of its answers in your customers' language may not match the large cloud models. This is a real trade-off, and there is no single answer for everyone.

A few practical rules

  • Do not ask users in the chat for information you do not need, such as a national ID number or card number, and if they type it, mask it before it is stored or sent.
  • At the start of the conversation, say briefly that the user is talking to an automated assistant and that the conversation is saved.
  • Do not put internal or confidential documents into the chatbot's knowledge base; anything in there may be quoted in an answer.
  • Some users deliberately try to use tricky messages to extract the chatbot's hidden instructions or make it promise a discount. Keep the chatbot's access to your systems to a minimum and read-only.
  • Decide how long conversation records are kept and who has access to them in the admin panel.

Handing the conversation to a human: the part you must not cut

The best chatbots know when to step aside. Without a clear path to a human, an unhappy user gets stuck in an endless loop.

When should the conversation go to an agent?

  • The user has explicitly asked to speak to a person.
  • The answer was not found in the documents, or the chatbot is not confident.
  • The topic is sensitive: a complaint, a payment problem, a damaged item.
  • The user has repeated their question several times in a row without getting a correct answer.
  • A prospective customer is ready to buy, and it is better for a sales rep to take over.

What does a good handover look like?

The agent should see the full conversation and the details the chatbot has collected, so the user does not have to repeat everything from the start. Outside working hours, the chatbot should not pretend someone is online; it should take a contact number and state the real follow-up time. Alerts for these requests can be sent to the support group or CRM with an automation tool such as n8n; if you are not familiar with it, see our article what is n8n and how it automates repetitive tasks.

What does the cost of an AI chatbot depend on?

The cost has two parts: a one-off build cost and an ongoing monthly cost. A figure that is reasonable for one business may be low or high for another, so instead of a number, get to know the factors.

Build cost factors

  • Architecture type: a simple rule-based chatbot costs less than a document-grounded one.
  • Content preparation: gathering documents, making them consistent and resolving contradictions often takes longer than expected.
  • System integrations: order tracking, logging leads in a CRM or reading stock levels are each a separate integration.
  • Number of channels: the website only, or the website plus Telegram and WhatsApp.
  • Admin panel and reporting: viewing conversations, unanswered questions and handover statistics.

Ongoing cost factors

  • Model usage volume: providers usually charge based on the volume of input and output text, so the number of conversations, the length of answers and the amount of document text sent with each question directly affect the cost.
  • Model choice: larger models are usually more expensive; for simple questions, a lighter model is often enough.
  • Hosting and maintenance: the server, monitoring and keeping documents up to date.

To control costs, cover frequent paths with buttons and ready-made answers, limit answer length and send the model only the chunks that are truly relevant. To see our published packages, visit the AI and chatbot development page and the pricing section.

How do you measure chatbot quality before launch?

The biggest mistake is to try the chatbot with a few questions of your own, like the answers and launch it. Evaluation should be structured.

1. Build a set of test questions

Collect a few dozen real questions from actual support messages, direct messages and calls, written exactly as users wrote them, not tidied up. Next to each question, write the correct answer and its source.

2. Deliberately add hard questions

  • Questions whose answers are not in the documents (correct answer: "I don't know" and an offer to contact a specialist).
  • Colloquial language and dialect, words typed in Latin letters, spelling mistakes and variant spellings of the same letters.
  • Ambiguous questions that should be clarified with a follow-up question.
  • Attempts to get a discount or a promise, or to extract internal instructions.
  • Questions outside your business's scope.

3. Score against clear criteria

For each answer, check: Is it correct? Did it come from your source or was it made up? Is it complete? Is the tone right for your brand? If it should have referred the user to a human, did it? Give the scoring to someone who knows the business, not only to the person who built the chatbot.

4. Retest after every change

Changing one instruction or adding one document can break answers to questions that were previously correct. Run the same test set again after every change.

5. Phased launch

First enable the chatbot on a few pages or for part of the day, and read the real conversations every week. Unanswered questions, the number of handovers to agents and user feedback are the best guide for improvement.

Prepare this content before building a chatbot

  • Up-to-date FAQs with approved answers.
  • Shipping, returns, warranty terms and working hours in writing.
  • A list of topics the chatbot must never comment on.
  • Contradictions resolved between website pages, the catalog and old texts.
  • One person responsible for keeping these documents up to date over time.

Frequently asked questions

Does an AI chatbot understand my customers' language well?

Recent language models understand both formal and conversational language well in most cases, but quality varies between models. That is why testing with real questions from your own customers, including mixed-script writing and spelling mistakes, is essential before making a final choice.

Will a chatbot replace support agents?

Not entirely. A chatbot takes over the repetitive share of questions so agents can spend their time on complex and sensitive cases. A business that removes the path to a human usually ends up with more unhappy customers.

Can I add a chatbot to a WordPress website?

Yes. A chatbot is usually added to a website as a code snippet or plugin and does not depend on the type of website. What matters is that the chat window does not hurt the page's loading speed.

How long does it take to build a chatbot?

It depends on the scope. At MyTarh, a simple chatbot is usually ready in about 10–15 days, and advanced solutions with custom training take 30–60 days. Having your content and documents ready has the biggest effect on this timeline.

What should we do if the chatbot gives a wrong answer?

Review the conversation to see whether the problem comes from an incorrect document, the relevant chunk not being found or the chatbot's instructions. Then fix it and add the same question to the test set so it does not happen again. Regular monitoring of conversations is part of maintaining a chatbot, not a one-off task.

If you want to know what role a chatbot could play in your business and which architecture suits you best, a free consultation is a good start. See the details of our process and packages on the AI chatbot and AI solutions development page, or go straight to our order page.

D
Danial Dehhaghi
Founder & CEO, MyTarh

Founder of MyTarh, with years of experience in digital marketing and web design.

Free consultation

Not sure where to start?

Book a short online call so we can hear about your business and tell you which step will have the biggest impact for you. The intro call is free.

Book a consultationMyTarh services

Prefer to talk directly? Chat with Danial Dehhaghi on WhatsApp

Previous article
What is n8n? A complete guide to business automation with n8n
Next article
Website speed optimization: why your site is slow, how to measure it and practical fixes