A chatbot is a software application designed to simulate human conversation through text or voice interactions, using natural language processing (NLP) and, increasingly, machine learning. First emerging in the 1960s with simple rule-based systems like ELIZA, chatbots have evolved into sophisticated AI-driven agents used for customer service, virtual assistance, entertainment, and education. Modern chatbots range from task-oriented assistants to open-domain conversational agents, often integrated into messaging platforms, websites, and smart devices.
1 Historical development
1.1 Early rule‑based systems (1960s–1990s)
1.1.1 ELIZA and the Turing test
The first known chatbot was ELIZA, developed by Joseph Weizenbaum at MIT in 1966. ELIZA simulated a Rogerian psychotherapist by pattern‑matching user inputs and returning scripted responses, often rephrasing statements as questions. Although simple, ELIZA convinced some users that it understood them, illustrating the concept of the Turing test—the ability of a machine to exhibit intelligent behaviour indistinguishable from a human.
1.1.2 PARRY and ALICE
In 1972, psychiatrist Kenneth Colby created PARRY, a chatbot that simulated a person with paranoid schizophrenia. PARRY used more sophisticated rule‑based reasoning than ELIZA and was even tested against human patients in psychiatric interviews. In 1995, Richard Wallace released ALICE (Artificial Linguistic Internet Computer Entity), which used a pattern‑matching markup language called AIML. ALICE won the Loebner Prize multiple times and became a widely studied early chatbot.
1.2 Transition to machine learning (2000s–2010s)
1.2.1 Statistical NLP and retrieval‑based models
The early 2000s saw the rise of statistical natural language processing. Researchers moved from hand‑crafted rules to data‑driven approaches, using corpora to train classifiers for intent recognition. Retrieval‑based models appeared, selecting the best response from a predefined set of answers based on similarity scores. These systems improved robustness and scalability for applications like automated customer support.
1.2.2 Rise of deep learning
Deep learning revolutionised chatbot development from the mid‑2010s. Recurrent neural networks (RNNs) and later long short‑term memory (LSTM) networks enabled sequence‑to‑sequence models that could generate novel responses rather than retrieve canned answers. The introduction of the Transformer architecture in 2017 (Vaswani et al.) led to large pre‑trained language models such as GPT, BERT, and their successors. These models could be fine‑tuned for conversational tasks, achieving human‑level fluency in many contexts.
1.3 Current state and trends
As of the 2020s, chatbots are ubiquitous, powering virtual assistants (e.g., Siri, Alexa), customer‑service chatbots on websites and messaging apps, and open‑domain conversational agents like ChatGPT. Trends include multimodal interactions (voice, text, images), integration with knowledge graphs, and the use of reinforcement learning from human feedback (RLHF) to align responses with user expectations. Research continues on long‑term memory, emotional intelligence, and common‑sense reasoning.
2 Types and architectures
2.1 Rule‑based chatbots
2.1.1 Decision trees and keyword matching
Rule‑based chatbots operate on predefined scripts. They use decision trees: a series of if‑then‑else conditions triggered by keywords or phrases. For example, a chatbot for a pizza restaurant might respond to “order” by asking for toppings. While simple to implement and predictable, they fail when inputs deviate from expected patterns, limiting their usefulness to narrow domains.
2.2 Retrieval‑based chatbots
2.2.1 Predefined response selection
Retrieval‑based chatbots maintain a repository of possible responses. Given a user input, they compute similarity (e.g., cosine similarity of sentence embeddings) against stored question‑answer pairs and return the best‑matched reply. These systems are more flexible than rule‑based ones but cannot create genuinely new responses. They are common in FAQ bots and technical support systems where answers are well‑defined.
2.3 Generative chatbots
2.3.1 Sequence‑to‑sequence models
Generative chatbots produce responses word by word using deep neural networks. The classic approach is a sequence‑to‑sequence (seq2seq) model, composed of an encoder that reads the input and a decoder that generates the output. Trained on large conversational datasets, these models can invent novel replies but may produce irrelevant or nonsensical text without careful tuning.
2.3.2 Transformer architectures (e.g., GPT, BERT)
Modern generative chatbots are built on Transformer models. GPT (Generative Pre‑trained Transformer) uses a decoder‑only architecture trained on massive text corpora, enabling open‑domain conversation. BERT (Bidirectional Encoder Representations from Transformers), while primarily for understanding, is used in retrieval pipelines. Variants like DialoGPT and LaMDA are specifically designed for dialogue. Transformers handle long‑range dependencies and produce coherent, context‑aware responses.
3 Core technologies
3.1 Natural language understanding (NLU)
3.1.1 Tokenisation and part‑of‑speech tagging
NLU begins with preprocessing. Tokenisation splits text into words or subwords; part‑of‑speech tagging assigns grammatical categories (noun, verb, etc.). These steps form the basis for syntactic analysis and help chatbots interpret sentence structure.
3.1.2 Named entity recognition (NER)
NER identifies and classifies entities such as names, dates, locations, and product names. For example, in “Order a pizza for John at 7 pm,” NER extracts “John” as a person and “7 pm” as a time. This information is critical for task‑oriented chatbots to execute actions accurately.
3.2 Dialogue management
3.2.1 Finite‑state machines
Dialogue managers control the flow of conversation. Finite‑state machines represent dialogue states (e.g., greeting, asking for details) and transitions triggered by user inputs. They work well for structured tasks but cannot handle unanticipated changes in topic.
3.2.2 Reinforcement learning for policy optimisation
More advanced systems use reinforcement learning to learn optimal dialogue policies. The chatbot is trained through trial and error, receiving rewards for successful task completions (e.g., a booked flight) and penalties for failures. This approach adapts to user behaviour over time, though it requires extensive simulation or user data.
3.3 Natural language generation (NLG)
3.3.1 Template‑based generation
The simplest NLG method uses hand‑crafted templates with slots to fill. For instance, “Your order of {item} will arrive by {time}.” Templates are reliable but produce repetitive, rigid language.
3.3.2 Neural text generation
Neural NLG leverages language models to construct fluent, diverse sentences. The chatbot conditions generation on the dialogue history and system intent, producing responses that sound natural. Challenges include controlling content (avoiding off‑topic replies) and ensuring factual accuracy.
4 Applications and use cases
4.1 Customer service and support
4.1.1 Automated ticketing and FAQs
Chatbots handle common customer inquiries—password resets, order status, shipping information—by directing users to relevant knowledge articles or automatically creating support tickets. They reduce human agent workload and provide 24/7 availability. Well‑known examples include bank chatbots and e‑commerce assistants.
4.2 Personal assistants (e.g., Siri, Alexa, Google Assistant)
Voice‑activated personal assistants integrate chatbots with speech recognition and smart‑home controls. They perform tasks like setting reminders, playing music, answering trivia, and controlling IoT devices. Their capabilities continue to expand through third‑party skills and continuous model updates.
4.3 Healthcare and mental health support
4.3.1 Symptom checkers and therapy bots
Chatbots assist in healthcare by collecting symptoms and providing triage advice (e.g., “Should you see a doctor?”). Mental health chatbots like Woebot and Wysa use cognitive behavioural therapy techniques to deliver low‑cost support. They are not substitutes for professional care but can serve as accessible first‑line resources.
4.4 E‑commerce and sales
4.4.1 Product recommendation and order tracking
E‑commerce chatbots engage users in conversational product discovery. They ask about preferences, recommend items, and guide users through checkout. Post‑purchase, they provide order tracking and return assistance. Examples include the chatbots of H&M and Sephora.
4.5 Education and training
4.5.1 Tutoring systems and language practice
Educational chatbots act as tutors, answering questions, quizzing students, and explaining concepts. Language‑learning bots like Duolingo’s chatbot simulate conversation to practice vocabulary and grammar. They can personalise interactions based on learner performance.
5 Design and evaluation
5.1 User experience (UX) design
5.1.1 Conversational flow and persona
Good chatbot UX requires a clear, logical conversation flow. Designers map out possible user intents and design fallback strategies (e.g., “I didn’t understand, could you rephrase?”). Persona—the bot’s tone, style, and personality—must match the brand and audience, from friendly and informal to professional and concise.
5.2 Training data and annotation
Supervised chatbots need high‑quality training data: pairs of user queries and ideal responses, often annotated with intents and entities. Data collection may involve crowdsourcing or logging real conversations. Careful cleaning and balancing are crucial to avoid bias and ensure coverage of edge cases.
5.3 Performance metrics
5.3.1 Accuracy, recall, and F1 score
For classification tasks (intent recognition, entity extraction), metrics include accuracy (percentage correct), recall (coverage of true positives), and F1 score (harmonic mean of precision and recall). These quantify the model’s ability to understand user input correctly.
5.3.2 User satisfaction and engagement
Beyond technical metrics, chatbots are evaluated on user satisfaction, often gathered through surveys (e.g., Net Promoter Score). Engagement metrics—session length, number of interactions, task completion rate—reflect how effectively the chatbot serves its purpose.
6 Ethical and social considerations
6.1 Transparency and disclosure
Users have a right to know they are interacting with a machine. Many jurisdictions require chatbots to identify themselves as artificial agents. Transparency helps manage expectations and prevents deceptive practices, such as pretending to be human.
6.2 Privacy and data security
Chatbots often collect sensitive personal data (names, health information, payment details). Companies must implement strong encryption, secure storage, and data minimisation policies. Users should be informed about what data is collected and how it is used.
6.3 Bias and fairness in response generation
Language models inherit biases present in their training data, potentially leading to unfair or discriminatory responses (e.g., racial, gender stereotypes). Mitigation strategies include debiasing datasets, auditing outputs, and implementing content filters. Developers must actively test for harmful outputs.
6.4 Impact on employment and human interaction
Automation of customer service and other conversational roles may displace human jobs, especially in call centres. Conversely, chatbots can augment human workers by handling routine tasks, allowing humans to focus on complex issues. Societal adaptation requires retraining programs and thoughtful deployment. Additionally, over‑reliance on chatbots for social interaction may reduce human‑to‑human contact, raising concerns about loneliness and social skills, particularly among younger users.