Skip to content
← All lessons
Lesson 2

AI chatbots explained

Artificial Intelligence (AI) broadly refers to technology that enables computers to perform tasks requiring human-like intelligence. A prominent subfield is Machine Learning, which involves training models on large datasets to recognize patterns.

A chatbot is simply a conversational interface designed to simulate interaction with a human. However, the "brain" powering that conversation can range from simple if/then rules to massive generative artificial intelligence models.

Stage 1: The Engine Room

Not all chatbots use Large Language Models (LLMs). Many legacy systems are rule-based, meaning they follow rigid decision trees written by programmers. Modern generative AI chatbots use language models that predict responses word-by-word, making them infinitely more flexible but harder to perfectly control.

Select a message:

What are your store hours?
Our store hours are 9 AM to 8 PM, Monday through Saturday. Sunday: 10 AM to 5 PM.
Note: These responses are authored examples demonstrating architectural differences, not live AI outputs.

Stage 2: The Art of Prompting

Because generative models do not truly "think," they rely entirely on the parameters you provide to narrow down their mathematical predictions. A strong prompt clearly defines the goal, the target audience, and strict constraints.

1. Select a Goal

2. Choose the Audience

3. Apply a Constraint

Constructed Prompt
"Write a response that fulfills this goal: Explain black holes. Tailor your tone for this audience: A 5-year old. Strictly adhere to this constraint: Under 20 words."
Simulated Generative Output
A black hole has gravity so strong that light cannot escape from inside it.
Output authored for educational purposes.

Stage 3: Context vs. Memory

A common misconception is that AI models learn and update their core knowledge (weights) in real-time as you chat with them. They do not. Updating a model is a computationally intensive process called training. When you chat with a model, it performs inference based on the text passed in its current context window. To simulate memory, a chatbot interface constantly re-sends your previous messages, or retrieves saved notes from a separate database to append to the prompt. The model's weights remain static.

Attach Conversation History
Send previous messages in the context window.
JSON Payload Sent to Model
[
  {
    "role": "user",
    "content": "I have an interview for a frontend developer role tomorrow."
  },
  {
    "role": "assistant",
    "content": "That is exciting! I can help you prepare by asking practice questions or reviewing key concepts."
  },
  {
    "role": "user",
    "content": "Can you give me a practice question?"
  }
]
Chatbot Interface Display
Can you give me a practice question?
Here are some common entry-level frontend interview questions you might face...
With the history included in the payload, the model accurately continues the specific context of the conversation.

Trust, Privacy & Limitations

Hallucinations

Models predict the next token based on learned patterns. Because they optimize for plausibility rather than absolute truth, they can generate hallucinations—statements that sound entirely convincing but are factually incorrect.

Retrieval & Tools

Some chatbots use tools to search the internet or query databases before responding. Providing context via retrieval helps ground the answer, but it does not guarantee accuracy, as the model may still misunderstand the retrieved text.

Privacy Constraints

Be cautious with sensitive data. Depending on the service's privacy policy, the prompts you send to a public chatbot may be logged, reviewed by human engineers, or even used to update the model weights in future training runs.

Knowledge Check

When you send a message to a generative AI chatbot, is it immediately learning from your message by updating its core model weights?

Are all chatbots powered by Large Language Models (LLMs)?

If a chatbot searches the web before answering, is its final answer guaranteed to be 100% accurate?

Frequently Asked Questions

What exactly is Artificial Intelligence?

Artificial Intelligence (AI) broadly refers to technology that enables computers to perform tasks requiring human-like intelligence. Machine Learning (ML) is a subset of AI where models are trained on data to recognize patterns, which powers modern generative chatbots.

Are AI chatbots conscious?

A human-sounding response is not evidence of consciousness or human-like experience. Chatbots produce outputs through programmed rules or learned models. Treat them as software tools and judge their answers by evidence, not their conversational style.

What is the difference between a chatbot and a model?

A chatbot is the front-end application (the interface) you interact with. It manages your session, formats text, and maintains history. The AI model is the underlying engine that processes the payload and generates the actual text response.

How can I verify a generative chatbot's claims?

Never rely on a generative model for unverified facts, especially concerning health, legal, or financial decisions. Always cross-reference their outputs with authoritative sources, as their primary function is to sound plausible, not to fetch absolute truth.

worldweb.ai

A living library for understanding artificial intelligence.

Built for curious humans, not machines.

Our sponsors