You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the Router cannot determine an appropriate route for the given context, it will route to the **error path** instead of arbitrarily selecting a route. This happens when:
95
+
96
+
- The context doesn't clearly match any of the defined route descriptions
97
+
- The AI determines that none of the available routes are appropriate
98
+
93
99
## Best Practices
94
100
95
101
-**Provide clear target descriptions**: Help the Router understand when to select each destination with specific, detailed descriptions
96
102
-**Use specific routing criteria**: Define clear conditions and examples for each path to improve accuracy
97
-
-**Implement fallback paths**: Connect a default destination for when no specific path is appropriate
103
+
-**Connect an error path**: Handle cases where no route matches by connecting an error handler for graceful fallback behavior
98
104
-**Test with diverse inputs**: Ensure the Router handles various input types, edge cases, and unexpected content
99
105
-**Monitor routing performance**: Review routing decisions regularly and refine criteria based on actual usage patterns
100
106
-**Choose appropriate models**: Use models with strong reasoning capabilities for complex routing decisions
0 commit comments