Skip to main content
Back to how-to guides Use this pattern when the supervisor routes some requests to the wrong agent, and you need to know which settings improve matching and which ones do nothing.

Concept

The language model classifier is the only semantic matcher for routing in production. It reads your intent descriptions. You improve routing by improving what it reads and by tuning the thresholds around it. Two settings that other tools use for matching are not active in this release:
  • Embeddings and a domain glossary in the NLU: section compile, but nothing in the runtime reads them.
  • NLU: intents: with EXAMPLES or EXAMPLES_FILE is parsed and ignored.
A top-level GLOSSARY: section is a compile error, E105. Use the settings below instead.

Minimal working example

A help desk supervisor writes specific descriptions, adds a keyword fallback, raises the short-circuit threshold, and gates the billing route on confidence. The specialists are short stand-ins in the same project. Replace them with your real agents. agents/help-desk.agent.abl
agents/billing-agent.agent.abl
agents/shipping-agent.agent.abl

How it works

Write descriptions the classifier can separate

  • State what each intent includes and what it excludes. “Not delivery or tracking” helps more than a longer list of examples.
  • Use distinct vocabulary in each description.
  • Keep each description to one quoted line. See Define intents with examples and keyword patterns.
  • Write clear tool descriptions. The classifier reads them.

Keyword patterns

Patterns in NLU: categories: are a fallback. They run when the classifier is off or unavailable, and only when LEXICAL_FALLBACK allows it.
  • Matching is by whole word or phrase, without regard to case. There is no stemming. Add each plural form.
  • A keyword match sets intent.category with a fixed confidence of 0.5. That is below the default short-circuit threshold of 0.85.
  • A pattern does not guide the language model. It reaches the model only as an “Examples:” description when the intent has no description.

Thresholds

Write the pipeline keys in camelCase in an agent file. The project runtime configuration holds the master switch, the classifier model, and the range-checked values from 0 to 1.

Entity matching

Entity values match better with SYNONYMS, VALUES, DESCRIPTION, and EXTRACTION_HINTS. The project extraction mode sets the stages. The values are auto, pattern_ml, ml, pattern_llm, llm, and pattern. The project extraction confidence threshold defaults to 0.5. See Use enum entities with synonyms.

Not available

These are not configurable in ABL today:
  • Few-shot examples for the classifier.
  • Per-intent keywords for the model.
  • An embedding index.
  • A classifier prompt, temperature, or timeout.
  • A per-language classifier.
  • A glossary that reaches the model.
A decision-model provider tier can run before the classifier. It is project configuration only, it is off by default, and a tenant flag controls it.

Common variations

Add keyword patterns for a safety net

Add NLU: categories: for the intents you must never miss. Keep LEXICAL_FALLBACK: when_unavailable.

Gate a sensitive route on confidence

Write intent.confidence >= 0.8 in the WHEN of a route that has a cost, such as a refund. A weaker match falls to the next route, such as a clarification.

Turn the keyword fallback off

Set LEXICAL_FALLBACK: never when a keyword match is worse than no match.

Verification

  1. Run the validator on all three files. Expect no errors and no warnings.
  2. Build a test set of 20 real messages per intent, plus 10 off-topic messages.
  3. Run each message. In the trace, open pipeline_classify and record the category and confidence.
  4. Open pipeline_routing_resolve to see which route matched.
  5. Open llm_call for the raw classifier reply when a result looks wrong.
  6. Change one description or threshold. Run the set again. Compare.
  7. With the classifier off, say “refund please”. Expect pipeline_intent_bridge with the source native_lexical.
The platform has no ABL setting to run intent accuracy tests. Keep your test set and compare trace results by hand or with your own script.

Production readiness checklist

  • Every description separates its intent from the closest one.
  • Every intent has a test set, and the results are recorded.
  • The short-circuit threshold is set from test data.
  • Costly routes have an intent.confidence gate and a clarification route after them.
  • Keyword patterns exist for the intents that must not be missed, in singular and plural forms.
  • No setting in the NLU: section that the runtime ignores is relied on.
  • Pipeline keys are camelCase.

Common mistakes

Troubleshooting

Related articles: