Conversational AI
Dialogue systems from classical NLU pipelines to LLM assistants and voice — memory, design patterns and evaluation.
- lessons
- 8
- steps
- 72
- time
- 97 min
What Is Conversational AI?
What a chatbot or voice assistant has to do on every turn, and the two architectures that do it: the classical NLU → DM → NLG pipeline and the end-to-end LLM.
- The three jobs on every turn: understand, track, respond
- How the field moved from rules to pipelines to LLMs
- The classical pipeline: NLU → dialogue manager → NLG
- End-to-end LLM systems and where each approach fits
NLU and Dialogue State
How a classical bot turns a sentence into an intent, entities and sentiment, then tracks what it knows across turns and fills the slots a task needs.
- What NLU outputs: intent, entities and confidence
- How intent classifiers score, threshold and handle out-of-scope input
- Entity extraction as token labelling, and why sentiment matters
- How the dialogue state is updated turn by turn
Dialogue Policy and NLG
How a classical bot decides what to do next from its dialogue state, and how NLG turns that decision into a sentence with templates, response selection or a neural model.
- What a dialogue policy is and its action space
- Rule-based vs learned (RL) policies
- Three ways to generate the reply: templates, selection, neural
- Control vs naturalness across NLG methods
LLM-Based Assistants
How one language model runs a whole conversation from its context window, and how system prompts, few-shot examples, RLHF, tools and retrieval shape what it does.
- How an end-to-end LLM keeps a conversation going with its context window
- Shaping behaviour with system prompts and few-shot examples
- What RLHF adds: a model aligned to human preferences
- Tool calling and retrieval: from talking to acting on facts
Memory & Context in Conversations
Keep a conversation coherent across turns, sessions and months: context windows, summaries, slots, sessions, long-term and vector memory, and preferences.
- Why memory works in tiers: context, session and long-term
- Keep long chats inside the context window with windows and summaries
- Isolate many concurrent conversations with session management
- Recall past conversations by meaning with vector memory
Voice Assistants
Wrap a dialogue engine in speech: wake word, speech recognition, synthesis, voice-first design, screens, and recognising who is speaking.
- The voice loop: wake word → ASR → dialogue → TTS
- Why wake-word detection runs on device at low power
- How ASR and TTS turn audio into text and back
- Design for ears: confirmations, error recovery, turn-taking
Conversational Design Patterns
Reusable shapes for chat systems: intent routing, generative fallback, hybrids, retrieval, tools, copilots and multi-agent teams, and when to pick each.
- Route known requests with intent-driven handlers
- Fall back to an LLM below a confidence threshold
- Ground answers and take actions with retrieval and tools
- Place the assistant inside the workflow (copilot) or split it into specialists
Evaluating Conversational AI
Measure a dialogue system along the dimensions that matter: quality, relevance, coherence, task success, satisfaction and safety, and prove changes with A/B tests.
- Combine automated metrics with human evaluation
- Score relevance and coherence turn by turn
- Find where tasks fail with a task-success funnel
- Gate replies on safety scores