Skip to content

Intent Classification

Intent Classification is the first processing node in the Global Supervisor pipeline. It determines how Swisper should handle each user message — routing simple knowledge questions directly to a response generator while sending complex requests (email, calendar, web search) through the full agent orchestration pipeline. It also extracts entity mentions and sets optimization flags that allow downstream nodes to be skipped, reducing latency and token cost.

Key Components

Component Purpose
Intent Classification Node LLM-based classification of user messages into routing categories (simple_chat vs complex_chat) with optimization flags
Entity Extraction Identifies people and pet mentions by name, relationship, or pronoun for personalized fact retrieval
Prompt Builder Splits the prompt template into static (cacheable) and dynamic (per-request) parts for LLM cache efficiency
Flag Invariant Validator Post-LLM guard that auto-corrects known error patterns (e.g., entities present but retrieval flag disabled)
Async Preference Extraction Fire-and-forget background task that extracts response style preferences and stores them in Redis for the next turn

Documentation Sections

  • Overview — What this module does and who it serves
  • Architecture — System design, components, and trade-offs