What is a chatbot?#
A chatbot is a program that interacts with you like a conversation. It may work on a website, Telegram, WhatsApp or Instagram and do things like answering questions, tracking an order or booking an appointment.
Two generations of chatbots#
- Rule-based: works with menus, buttons or keywords, for example "Press 1 to track your order". It is predictable but limited.
- Language-model-based: understands the user's free-form sentence and builds a natural answer. It is flexible but may make mistakes.
An example#
An online store has a chatbot on its site. A customer writes, "When will my order arrive?" The chatbot asks for the order code, reads the status from the system and answers. If the matter is complex, it hands the conversation to a human operator.
Good design tips#
- Define the limits of its work and control them with a system prompt.
- Always keep a path to hand off to a human.
- Connect answers to a reliable source (such as a policy page), for example with RAG.
- Keep sensitive information out of the conversation.
How it differs from an agent#
A chatbot mostly converses; an agent works through several steps and uses tools to reach a goal. Many newer chatbots gradually gain some agent features too.
A common risk#
A chatbot without limits may go off topic, give wrong information or be abused through prompt injection. Test it with hard questions before publishing.