NLU: block configures how the agent classifies user intent, extracts entities, resolves synonyms, and matches utterances. NLU definitions are used by the runtime for intent routing, digression matching, and entity extraction during conversation.
Overview
ABL’s NLU configuration supports:- Intent classification with keyword patterns and example utterances.
- Entity extraction with typed extractors (enum, pattern, location, date, number, free text).
- Synonyms for normalizing variant expressions to canonical values.
- Embeddings-based matching for semantic similarity when keyword patterns are insufficient.
- Multi-language support with per-language model configuration.
- A glossary for domain-specific terminology.
Intent classification
Intents represent categories of user messages. Each intent has a name, keyword patterns for quick matching, and optional example utterances for model-based classification.Syntax
Intent properties
Pattern matching
Patterns are matched as case-insensitive substrings against the user’s message. If any pattern appears in the message, the intent is a candidate match. Pattern matching is the first tier of classification; it is fast but imprecise.Example-based classification
WhenEXAMPLES are provided, the runtime uses an LLM or embedding model to classify messages based on semantic similarity to the examples. This is more accurate than pattern matching but requires more compute.
Intent with external examples file
For intents with many examples, reference an external file:Categories
Thecategories: sub-block declares coarse-grained message categories matched by keyword patterns.
Categories are a lighter-weight classification than full intents (no examples or entity bindings).
Entity extraction
Entities are structured values extracted from user messages. ABL supports six entity types.Syntax
Entity types
Entity properties
Synonyms
Synonyms map variant expressions to canonical values. When a synonym is detected, the runtime normalizes it to the canonical form before storing:currency_code: "USD".
Embeddings-based matching
For more accurate semantic matching, enable embeddings-based NLU. This uses vector similarity to match user messages against intent examples.Embeddings properties
Multi-language support
ABL NLU supports multiple languages with per-language model configuration and optional code-switching detection.Multi-language properties
Model configuration
Specify which models to use for NLU classification tasks:Evaluation configuration
Control NLU evaluation behavior for monitoring and testing:Glossary
The glossary defines domain-specific terms and abbreviations. These definitions are injected into the LLM context to improve understanding of specialized vocabulary."term -- definition" format.
External NLU configuration
For complex NLU setups, reference an external configuration file:Complete example
Named entities (ENTITIES: section)
Separate from the NLU: block, the top-level ENTITIES: section defines reusable semantic
entities that are shared by both NLU (for recognition) and GATHER
(via entity_ref). Declaring an entity once lets multiple fields and agents reuse the same type,
allowed values, synonyms, and validation.
Top-level entities accept the full unified type set:
string, text, free_text, number,
integer, float, currency, boolean, date, datetime, email, phone, enum, pattern,
location.
This is a distinct section from
NLU: entities:. Top-level ENTITIES: defaults TYPE to
string and supports all 15 types, whereas the NLU: entities: sub-block defaults to enum and
supports only 6 types (enum, pattern, location, date, number, free_text). A GATHER
field’s entity_ref points at a top-level ENTITIES: entry.Intent categories (INTENTS: section)
The top-level INTENTS: section declares supervisor routing categories (distinct from
NLU: intents:). Each entry is a category name with an optional description, and the block can set
a lexical-fallback mode.
Related pages
- Multi-Agent & Supervisor — intent-based routing in Supervisors
- Expressions & functions — expression syntax used in intent conditions
- Memory & Constraints — NLU results stored in session variables