Polaris ML/AI Training

AI Chatbot Bootcamp

intermediate32h25 lessons

Build a grounded conversational AI chatbot from scratch. Over ~25 hands-on lessons you'll create 'Atlas' — an assistant that answers your team's questions from the codebase and docs with real citations, remembers the conversation, runs in a web UI and in Slack, and is protected by guardrails and evaluation. Teaches RAG end to end, plus the chatbot-specific craft: memory, persona/system design, streaming, chat UX, and deployment. Part 1 of a path — the AI Agents Bootcamp is Part 2, where Atlas learns to take actions.

AI ChatbotConversational AIRAGLLMEmbeddingsVector SearchClaudeStreamingConversation MemorySlack BotChat UICitationsGuardrailsEvaluationPrompt EngineeringTypeScriptPython

Premium content

Upgrade to premium to access all lessons, tutorials, and hands-on exercises.

Lesson Overview

1

Lesson 1: What Is an AI Chatbot? Chatbot vs Agent, and the Nimbus Scenario

Define exactly what we're building — a grounded conversational chatbot — and how it differs from an AI agent. Meet the Nimbus Logistics scenario and 'Atlas,' the assistant you grow across this bootcamp (and turn into an agent in Part 2).

2

Lesson 2: Anatomy of an LLM Chatbot — Prompt, Context Window, Completion

Open the hood: how a chat model actually works. Messages and roles, the system prompt, the context window and tokens, temperature, and the request→completion cycle. Build the smallest possible chatbot so nothing is magic.

3

Lesson 3: Choosing Your Model & Stack

Pick the model and the build approach with a scorecard, not hype: hosted APIs (Claude, GPT, Gemini) vs open models you host, and raw API vs a framework. Optimize for a grounded, low-latency, cost-aware chatbot.

4

Lesson 4: Dev Environment & Your First "Hello, Chatbot"

Set up a clean, reproducible project — secrets, config, the model interface — and ship a terminal chatbot with a system prompt and conversation memory. The skeleton every later lesson upgrades.

5

Lesson 5: Why Grounding — Hallucination, and RAG vs Fine-tuning vs Long-Context

Confront the core problem: LLMs hallucinate about your private knowledge. Compare the three ways to fix it — fine-tuning, stuffing everything in the prompt, and RAG — and see why RAG wins for a chatbot over a changing knowledge base.

6

Lesson 6: Embeddings & Vector Search Fundamentals

How text becomes searchable by meaning: embedding models, vectors, cosine similarity, and nearest-neighbor search. Build a tiny semantic search by hand so the magic becomes mechanics.

7

Lesson 7: Chunking Your Knowledge — Docs and Code

Why and how to split knowledge into retrievable chunks. Strategies for prose (headings, overlap) and code (structure-aware), plus the metadata that powers citations and filtering.

8

Lesson 8: Choosing & Setting Up a Vector Store

Where your chunk embeddings live and get searched. Compare pgvector, Chroma, Qdrant, and Pinecone for a chatbot, pick one, and stand it up with a schema designed for citations, filtering, and hybrid search.

9

Lesson 9: Building the Retrieval Pipeline

Wire embeddings + the vector store into a clean retrieve(query) → chunks-with-sources function, add a relevance floor so 'no good match' is honest, and connect it to your chatbot so answers become grounded.

10

Lesson 10: Hybrid Search & Re-ranking

Fix semantic search's blind spot for exact terms by adding keyword (BM25) search and fusing the two, then add a re-ranker for precision. The biggest accuracy upgrade in the whole RAG pipeline.

11

Lesson 11: Grounded Generation — Prompts That Cite Sources

The generation half of RAG: craft the prompt so the model answers strictly from retrieved context, cites each claim, and refuses when the context doesn't support an answer. Plus a runtime check for ungrounded claims.

12

Lesson 12: Evaluating Retrieval & Answer Quality

Stop tuning by vibes. Build a golden set from your test questions, measure retrieval with recall@k and MRR, score answers for groundedness and correctness, and gate changes so improvements are provable.

13

Lesson 13: Multi-Turn Conversation — Context & Follow-Ups

Make Atlas handle real conversations, not isolated questions. Resolve follow-ups like 'and on a flaky network?', combine conversation history with retrieval, and rewrite vague queries so RAG still finds the right chunks.

14

Lesson 14: Conversation Memory Strategies — Buffers, Summaries, Long-Term

Conversations outgrow the context window. Implement a summarization buffer for long threads and an optional long-term store so Atlas remembers a user's earlier sessions — without bloating cost or going stale.

15

Lesson 15: Persona & System Prompt Design

The system prompt is where Atlas's identity, rules, and voice live. Design it deliberately: role, scope boundaries, answer format, citation and honesty rules, tone — and learn to iterate it like code against your eval set.

16

Lesson 16: Streaming Responses & Perceived Latency

A chatbot that pauses for eight seconds feels broken even if the answer is great. Stream tokens as they generate, show retrieval status, and engineer perceived latency so Atlas feels fast and alive.

17

Lesson 17: Citations & Trust in a Chat UI

Turn raw citations into a trust-building UI: clickable source chips, hover previews, expandable 'sources used,' and clear visual signals for confidence and 'I don't know.' Design the answer so users can verify in one click.

18

Lesson 18: Honesty — Clarification, Refusal, and "I Don't Know"

The behaviors that separate a trustworthy chatbot from a confident liar: asking a clarifying question when a query is ambiguous, declining out-of-scope or unsupported questions, and saying 'I don't know' instead of guessing.

19

Lesson 19: A Web Chat UI

Give Atlas a real product surface: a web chat interface with streaming, citation chips, conversation history, and a backend API. The reference front-end that brings together everything from Modules A–C.

20

Lesson 20: A Slack Chatbot

Meet users where they already are. Wire Atlas into Slack: app setup and scopes, the 3-second ack rule, replying in threads with citation links, and reusing the exact same backend that powers the web UI.

21

Lesson 21: Multi-Source Knowledge — Blending Code, Wiki, and More

Atlas's answers get better when it can draw on more than one source. Add the wiki (and beyond) as additional read-only knowledge, route queries to the right sources, merge results, and handle source precedence and conflicts.

22

Lesson 22: Guardrails — Prompt Injection, PII, and Scope Control

Even a read-only chatbot needs guardrails. Defend against prompt injection (including via retrieved content), avoid leaking secrets or PII, enforce scope, and add input/output filters so Atlas stays safe and on-topic.

23

Lesson 23: Evaluating the Whole Chatbot

Go beyond retrieval metrics to evaluate the full chatbot: an offline eval set with LLM-as-judge for quality and groundedness, conversation-level tests, human feedback loops, and a regression gate that protects every change.

24

Lesson 24: Deploying to Production — Hosting, Cost, and Observability

Take Atlas from localhost to a reliable service: hosting the API and UI, managing secrets and the vector store, keeping the knowledge index fresh, controlling LLM cost, and observing usage, quality, and errors in production.

25

Lesson 25: From Chatbot to Agent — What's Next

Capstone and bridge. Consolidate everything into a deployed, evaluated chatbot, then look at exactly what changes when a chatbot becomes an agent — the on-ramp to the AI Agents Bootcamp (Part 2).

AI Chatbot Bootcamp | ML/AI Bootcamp | Polaris ML/AI Training