Skip to content
47% off: the complete course for $79 (reg. $149)Order now →
AI Builder
Module 3Intermediate

Building Core AI Features

The everyday features users expect from modern software

Build the AI features that show up in almost every product — streaming chat, summarization, extraction, classification, transformation, inline writing help, natural-language queries, and background jobs — inside a real Next.js app.

Lessons
10
Reading time
105 min
Level
Intermediate
Free lessons
1

Lessons in this module

  1. 3.1

    Building a Streaming Chat Feature

    Build an in-app AI chat from scratch: a streaming route handler, a React client, conversation storage, and the details that make it feel polished.

    11 minFree
  2. 3.2

    Streaming End to End

    How token streaming works from the provider to the browser — server-sent events, backpressure, cancellation, and errors that arrive mid-stream.

    10 min
  3. 3.3

    Summarization Features Users Trust

    Design summaries for a purpose (triage, catch-up, handoff), handle long and messy inputs, and prevent summaries that sound right but drop what matters.

    10 min
  4. 3.4

    Extracting Structured Data from Messy Text

    Turn emails, tickets, and notes into clean typed records — with schemas, null handling, confidence, and a review path for the uncertain ones.

    11 min
  5. 3.5

    Classification, Tagging, and Routing

    Build label-and-route features with fixed taxonomies, multi-label tags, an "other" escape hatch, and the metrics that tell you it's working.

    10 min
  6. 3.6

    Rewrite, Translate, and Transform

    Tone rewrites, translation, simplification, and format conversion — the transformation features that look trivial and fail in subtle ways.

    10 min
  7. 3.7

    Inline AI Writing Assistance

    Autocomplete, suggested edits, and "improve this" actions inside your editor UI — with diffs the user can accept or reject piece by piece.

    10 min
  8. 3.8

    Natural Language to Filters and SQL

    Let users ask for data in plain English by translating to validated filters or read-only SQL — safely, with guardrails against bad and malicious queries.

    11 min
  9. 3.9

    AI Features in a Next.js App

    Where AI calls belong in a modern React app — route handlers, server actions, and server components — plus keys, timeouts, and caching done right.

    11 min
  10. 3.10

    Background and Bulk AI Jobs

    Move slow or high-volume AI work out of the request path: queues, job status, retries, idempotency, and reporting progress back to users.

    11 min

About this module

Most AI products aren't built around one big model call. They're built from a handful of everyday features that show up in almost every modern app: a chat assistant, a summary at the top of a long thread, fields pulled out of a messy email, a label that routes a ticket, a rewrite button, an autocomplete suggestion, a search box that understands plain English. Each looks simple in a demo and fails in its own particular way once real users and real data arrive.

This module builds those features properly, inside a realistic Next.js and Postgres app. You'll start with a streaming chat, from the route handler to the React client to conversation storage, and then follow a token from the model all the way to the screen, covering server-sent events, backpressure, cancellation, and errors that arrive halfway through a response.

From there you'll build summaries designed for a specific reader and job, extraction that turns unstructured text into typed records with a review path for uncertain cases, classification with fixed taxonomies and the metrics that tell you it works, transformation features like tone rewrites and translation, and inline writing assistance with diffs users can accept or reject piece by piece. You'll also translate natural-language questions into validated filters or read-only SQL with guardrails against bad and malicious queries.

The module closes with the architecture questions every team hits: where AI calls belong in a modern React app (route handlers, server actions, server components), how to handle keys, timeouts, and caching, and how to move slow or high-volume work into background jobs with retries, idempotency, and progress reporting. Every lesson uses TypeScript, real code you can run, and the failure modes that matter in production.

Questions about Building Core AI Features

How do I add AI chat to my web app?

Create a server route that loads the conversation from your database, calls a model API with streaming enabled, and streams the text back to the browser. On the client, read the response body incrementally and append it to the latest message. Keep the conversation history on the server, save each message as it completes, and support stopping and retrying.

Should I stream LLM responses?

For anything a user waits on, usually yes. Streaming shows the first words within a second or two instead of after the whole response is generated, which makes the feature feel much faster. It adds complexity around cancellation and mid-stream errors, so non-interactive work like background summaries is often simpler without it.

What are the most common AI features in software products?

The everyday ones are chat assistants, summarization, structured data extraction, classification and routing, text rewriting and translation, inline writing help, and natural-language search or querying. Most products combine several of them, often running some in background jobs rather than in the request path.

Do I need the Vercel AI SDK to build AI features in Next.js?

No. You can call a provider SDK such as Anthropic's directly from route handlers and stream the response yourself. The AI SDK is useful when you want ready-made chat state management, tool-call rendering, or multiple providers behind one interface, but the core decisions about storage, cancellation, and error handling are still yours.