Intent Classification for Routing

Classify what the user is trying to do so the agent selects the right tools and can decline out-of-scope queries before wasting a plan.

Intent classification identifies what the user is trying to accomplish before or during planning. It can be a prompt or a dedicated classifier. Correct intent steers tool inventory selection — billing queries need payment tools; password resets need docs retrieval — and supports breaking complex requests into simpler subtasks.

The classifier should be able to label a query IRRELEVANT (out of scope) so the agent declines politely instead of inventing an impossible plan. That early exit prevents wasted compute and reduces planning failure modes driven by goal mismatch.


Sources

  • AI Engineering (Chip Huyen), ch. 6