Semantic Router
Route messages with Jev decisions, calibrated confidence and optional fallback chains.
Route messages with Jev decisions, calibrated confidence and optional fallback chains.
Semantic Router's DecisionRouter sends a message as state with a route question to TypeSafe's System One endpoint. Jev returns probabilities for the named route choices. The router uses those probabilities as route scores, then returns the highest route if it clears the configured confidence threshold. Its aask method can send several typed questions about the same state in one request.
Choose the route that best fits the user's message.
Example state from the repository's live integration test: a user reports failed payouts for three days. The question criteria use the repository's billing, technical, and support routes.
Decide whether this issue is time-sensitive, distinguishing action needed now from a case that can wait.
Example state from the repository's live integration test: a user reports failed payouts for three days. The question criteria use the repository's billing, technical, and support routes.
Provide route names and descriptions or example utterances.
DecisionRouter uses route descriptions as choice criteria, falling back to up to five example utterances when a description is absent. It sends the message as state and one or more named questions.
The router posts the model, state, and questions to the TypeSafe System One endpoint with bearer authentication. It retries rate-limit, server, timeout, and client errors within its configured retry count.
Route probabilities become route scores. The base router selects the highest-scoring route when it meets the configured threshold. Callers can also inspect answers to additional questions.
Chain can try an indexed semantic router first and pass only uncertain messages to DecisionRouter.
It lets an application replace a slow generative routing step with closed decisions that return calibrated probabilities. The same request can select a route and check a separate condition, and the library can fall through from a fast semantic router to Jev when the first router is unsure.