LESSON 127 / 215·2 min readIntermediate

AI chatbot

Must knowConcept lesson
01 Understand02 Recall03 Prepare

Words made simple

A few useful meanings before you read the explanation.

LLM
A model trained to work with language. It can write or summarize text, but its answer still needs checking against reliable information.
Retrieval
Finding and fetching information that is useful for the current question.
Agent
An application that uses a model to choose its next action within defined limits. It can use tools and continue through several steps.
More words from this lesson
Authentication
Checking who a user or service is, such as by verifying a login session.

Overview

A chatbot exposes a conversational model through your app. It may perform no tools or retrieval. Ordinary conversation alone does not make it an agent.

Why this matters

Users can request language help without learning a specialized interface.

An everyday example

A writing assistant answers questions about text you provide.

A technical example

POST /chat accepts a message and returns a bounded answer.

How it works

  1. Authenticate
  2. Select permitted history
  3. Call model
  4. Validate/display
  5. Store outcome.

Architecture and flow

React → Node → LLM → Node → React.

The insurance assistant example

Explain a supplied claim checklist in simpler language.

When to use it

Low-risk conversation and text transformation.

When to avoid it

Private claim facts need tools; policy knowledge needs current sources.

Interview answer

“A chatbot is an interface; I add retrieval or tools only when the task needs them.”

Benefits, trade-offs, and production considerations

Enforce authentication, bounded history, privacy, timeout, and usage limits even for one call. Return explicit model failures instead of invented success.

PAUSE & RECALL

Can you explain it without the notes?

AI chatbot

Use your own words. Explain an example and one limitation before checking the explanation.

Check your explanation

A chatbot exposes a conversational model through your app. It may perform no tools or retrieval. Ordinary conversation alone does not make it an agent.

CONNECT IT TO YOUR INTERVIEW

Turn this concept into a clear answer.

Practice this concept
YOUR NEXT STEP

Keep connecting the ideas.

Next lesson: Streaming AI chatbot

Adapted from 13_AI.MD · “AI chatbot”. Examples are study fragments; framework behavior can depend on your version.