Overview
Classification and routing are common AI tasks where you need to make decisions based on input. Tracing these operations helps you understand why certain routing decisions were made and debug escalation logic.Basic Classification
Here’s a support ticket classifier with tracing:Escalation Logic
Decide when to escalate to humans vs. handle with AI:Multi-Label Classification
Handle documents with multiple categories:Intent Classification with Fallback
Handle multiple classification strategies:What to Trace
Configuration
Configuration
Track the settings used for classification:
Classification Results
Classification Results
Record the classification output with confidence:
Fallback Logic
Fallback Logic
Track when fallback strategies are used:
Routing Decisions
Routing Decisions
Capture which path was taken and why:
Debugging Classification with Traces
Use traces to debug common classification issues:| Issue | What to Check in Trace |
|---|---|
| Wrong category | Check confidence - is it too low? |
| Inconsistent routing | Check config - did thresholds change? |
| Too many escalations | Check confidence_threshold - is it too high? |
| Missing classifications | Check all_scores - what were alternatives? |