PROJECT 01 · Beginner–IntermediateFREEEarly draft

AI Chat Application

You're the engineer of record for a startup's first AI feature: a website chat assistant. Not a demo — something real users will actually use: it answers fast, doesn't forget the conversation, and won't surprise anyone with a bill.

Beginner–Intermediate8–12h< $3Any language · an LLM API
Start building

What you'll build

A streaming, multi-turn chat application with a designed persona, robust error handling, context management, and a per-conversation cost budget.

Why it matters

The atomic unit of applied AI work. Every AI-touching role assumes you can do this well — most candidates do it badly (no streaming, no truncation, no cost thinking).

Skills you'll gain

LLM API integration · L3Conversation-state designStreamingPersona & system-prompt engineeringError handling & retriesToken budgeting & cost control

Prerequisites

Path gates M0–M3, a dev environment, and an LLM API key.

Requirements

  • RQ-1: multi-turn coherence over ≥10 turns.
  • RQ-2: first token < 2s perceived via streaming.
  • RQ-3: graceful degradation on API errors — the user never sees a stack trace.
  • RQ-4: conversation cost tracked and capped.
  • RQ-5: persona holds under pressure.

Architecture

Product-level: client ↔ conversation manager (state, truncation policy) ↔ LLM API adapter (streaming, retries, provider-swappable) ↔ cost meter. The explanation teaches why a conversation is an engineered object, not which framework to use.

Build — 7 stages

1First response
2Conversation, not a message
3Streaming
4Persona design
5A bad day in production
6The money meter
7Evaluate & ship-ready
THE BAR — VISIBLE FROM THE START
QualityA coherence rubric over a 10-conversation suite + persona-consistency check.
RobustnessThe mock-API failure suite passes + the adversarial script runs clean.
CostMeasured $/conversation under the declared cap.

Failures you'll fix yourself

The chat forgetsAround turn ~15, the assistant contradicts earlier context or errors out.
Bill shockCost per message climbs every turn.
Persona collapseAfter an adversarial message script ('ignore all previous instructions…') the bot drops its persona or leaks its system prompt.