What is Chatbot?
Chatbot is a software system that exchanges conversational turns with a user through text, voice, or another interface. It may use fixed rules, retrieval, classifiers, language models, tools, or a combination; conversation alone does not make it an autonomous agent.
How It Works
A conversation turn is a controlled workflow
Each turn should bind a conversation ID, authenticated user context, channel event, prior state, and current policy version. The runtime validates input, determines whether to answer, clarify, retrieve, call a tool, or hand off, then records the resulting state transition. A transcript is evidence of messages; it should not be the only store for trusted fields such as account identity, order status, consent, or approval.
Rules, retrieval, and generation solve different problems
Rules are appropriate for narrow, auditable paths. Retrieval selects or supplies approved knowledge. A language model can interpret varied phrasing and generate a response, but its output remains probabilistic. Tool execution must sit behind deterministic validation, authorization, idempotency, and confirmation. A chatbot can use all four without becoming an autonomous agent: the application still owns goals, permissions, termination, and side effects.
Fallback and human handoff are first-class states
A robust bot distinguishes unsupported requests, ambiguous intent, missing data, policy blocks, tool failures, and explicit requests for a person. Handoff should preserve the minimum necessary transcript, verified fields, unresolved task, attempted actions, and reason for escalation while respecting access and retention policy. Model confidence alone is not a safe escalation rule unless it is calibrated for the target traffic and failure cost.
Evaluate complete conversations and outcomes
Single-turn response scores miss loops, forgotten constraints, repeated side effects, and failed recovery. Freeze representative multi-turn scenarios and measure task completion, unsupported-claim rate, correct clarification, handoff precision and recall, repeated-question rate, tool success, latency, cost, abandonment, and user-confirmed resolution. Slice results by language, channel, intent, risk level, and conversation length, then replay regressions before release.
Key Characteristics
- Exchanges ordered turns through a text, voice, or multimodal interface
- Maintains explicit conversation state separately from the raw transcript
- May combine rules, retrieval, classifiers, language models, and tools
- Keeps identity, permissions, approvals, and business facts in trusted application state
- Represents clarification, refusal, failure, handoff, and completion as distinct outcomes
- Requires conversation-level evaluation rather than response fluency alone
Common Use Cases
- Customer-support triage with verified account context and human escalation
- Knowledge assistants that cite approved sources and abstain when evidence is missing
- Transactional flows that preview and confirm actions before a deterministic executor runs
- Internal service desks that route requests while preserving audit and access boundaries
- Educational practice systems that track a bounded learning objective across turns
Example
Loading code...Frequently Asked Questions
What is the difference between a rule-based chatbot and an AI chatbot?
A rule-based chatbot follows explicit transitions, templates, or decision tables. An AI chatbot uses learned components such as classifiers, retrieval models, or language models to interpret or generate turns. Both still need application-owned state, permissions, error handling, and outcome measurement; an AI chatbot does not automatically learn from each conversation.
What is the difference between a chatbot and an AI agent?
A chatbot describes a conversational interface. An AI agent usually adds a control loop that can choose tools or actions toward a goal. A chatbot may be entirely rule based, and an agent may operate without chat. When a chatbot uses agent capabilities, the host application must still bound its goals, tools, permissions, budgets, and termination conditions.
What state should a chatbot store?
Store a typed conversation ID, current workflow state, verified entities, unresolved questions, tool results, consent, policy version, and handoff status according to retention rules. Keep trusted account and authorization facts outside model-generated text. Summaries can reduce context size, but they should retain provenance and must not silently replace authoritative records.
Does RAG make chatbot answers reliable?
RAG can supply current, inspectable evidence, but it does not guarantee that retrieval is complete, authorized, current, or correctly used. Evaluate retrieval and answer support separately, preserve source identity, filter by access before generation, and refuse or escalate when evidence is insufficient or conflicting.
How should a chatbot be evaluated?
Evaluate representative multi-turn conversations against explicit outcomes. Measure task completion, correct clarification, unsupported claims, handoff quality, repeated questions, tool side effects, latency, cost, abandonment, and user-confirmed resolution. Report results by language, intent, risk level, channel, and conversation length rather than relying on a single satisfaction or response-quality score.