← Blog

Chatbot, What Is It? A Practical Guide for Builders

2026-09-11 · 5 min read · SubToAPI Team

A chatbot is software that simulates a conversation with a human, usually through text or voice, to answer questions, complete tasks, or route people to the right help. It sits behind a chat window on a website, inside a messaging app, or embedded in a product, and it responds to whatever the user types in a way that feels like talking to a person rather than filling out a form.

That's the short answer. The longer answer is that "chatbot" covers a wide range of technology — from simple decision-tree scripts to modern systems powered by large language models — and the differences between them matter a lot if you're trying to build or buy one. This article breaks down what a chatbot actually does, the main categories, and what's involved in putting one into production.

What a chatbot actually does

At its core, every chatbot follows the same loop:

  1. Receive input — a message typed or spoken by a user.
  2. Interpret it — figure out what the user wants.
  3. Generate a response — produce text (or an action) that addresses the request.
  4. Return it — send the reply back through whatever interface the user is on (web widget, Slack, SMS, phone system, app).

What differs between chatbots is step 2 and step 3 — how they interpret input and how they generate a response. That's where the technology splits into distinct types.

The three main types of chatbots

Rule-based chatbots

These follow a fixed decision tree: "if the user says X, respond with Y." They're built with flowcharts, keyword matching, or button-driven menus. They're cheap to build, predictable, and easy to test, but they break the moment a user phrases something in a way the designer didn't anticipate. Most early customer-service bots and IVR phone trees are rule-based.

Intent-based (NLU) chatbots

These use natural language understanding to classify a message into a predefined "intent" (e.g., "check_order_status") and then pull the matching response or trigger a workflow. They're more flexible than rule-based bots because they can handle paraphrasing, but they're still limited to the intents someone explicitly programmed. Anything outside that list gets a generic fallback ("Sorry, I didn't understand that").

LLM-based chatbots

These are built on large language models — the technology behind Claude, GPT, and similar systems. Instead of matching input to a fixed list of intents, the model generates a response based on understanding the actual meaning of the text, the conversation history, and often external context you provide (documents, database results, tool outputs). This is why modern chatbots can hold open-ended conversations, summarize documents, write code, or answer questions they were never explicitly programmed to answer.

Almost every chatbot getting attention today — customer support assistants, coding copilots, internal knowledge-base bots — falls into this third category.

Why LLM-based chatbots changed the game

The shift from intent-matching to LLM-based generation matters for three practical reasons:

This is also why "chatbot" and "AI assistant" have started to blur together. A chatbot is the interface; an LLM is what generates the intelligence behind it.

What you need to actually build one

If you want to build an LLM-based chatbot rather than a rule-based one, the pieces are:

Here's a minimal example of the conversation-loop piece, using SubToAPI to call Claude through a standard HTTPS API:

async function askBot(message, history = []) {
  const response = await fetch("https://api.subtoapi.app/v1/messages", {
    method: "POST",
    headers: {
      "Authorization": `Bearer ${process.env.SUBTOAPI_KEY}`,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      model: "claude-3-5-sonnet-20241022",
      max_tokens: 500,
      messages: [...history, { role: "user", content: message }]
    })
  });

  const data = await response.json();
  return data.content[0].text;
}

This works because SubToAPI turns an existing Claude subscription into an application API key (sub_live_...) that behaves like a normal REST API — you get streaming, tool use, and usage metadata without setting up separate infrastructure. The quickstart walks through authentication, and the messages endpoint docs cover request and response formats in detail if you're building something more involved than a simple Q&A loop.

Choosing the right type for your project

Not every chatbot needs an LLM. A rule-based bot is often the right choice for narrow, high-stakes flows — password resets, appointment booking — where predictability matters more than flexibility. But for anything involving open-ended questions, varied phrasing, or content generation (support, onboarding, internal tools, coding help), an LLM-based chatbot will outperform a rule-based one almost every time, and it requires far less manual scripting to maintain.

If you're building the LLM route, streaming responses back to the user token-by-token (rather than waiting for the full reply) makes a noticeable difference in how "alive" the bot feels — see the streaming guide for how that's implemented over a standard API connection.

questions

Is a chatbot the same thing as AI? Not exactly. A chatbot is the conversational interface — the thing a user types into. AI, specifically an LLM, is often what powers the responses behind that interface. You can have a chatbot with no AI (rule-based) and AI with no chatbot (a model used for other tasks).

Do I need to train a custom model to build a chatbot? No. Most modern chatbots are built by calling an existing LLM through an API and supplying it with context (instructions, documents, conversation history) rather than training a model from scratch.

What's the difference between a chatbot and a virtual assistant? The terms overlap heavily. "Chatbot" usually refers to the text-based conversational interface itself, while "virtual assistant" often implies broader capabilities like taking actions, managing schedules, or integrating with multiple tools — but in practice, both are commonly used to describe the same LLM-powered systems.

Turn your Claude access into an HTTPS API

SubToAPI gives you application API keys, streaming, tool use and usage insights on top of your existing Claude access — set up in minutes.

Start free  Read the quickstart →