LangChain Jev Examples
Learn typed Jev judgments, model routing and tool gating through runnable LangChain examples.
Learn typed Jev judgments, model routing and tool gating through runnable LangChain examples.
The course demonstrates typed Jev decisions in three LangChain patterns: classify a support ticket with Choice, Noul, and Score questions; route each task to a fast or powerful model with Choice; and gate a destructive tool call on whether the user requested it. Application code reads the typed answer to report classifications, choose a model, or allow/block the tool.
Choose the team that should handle this ticket.
The source-defined ticket text describes a payment integration outage, prior unanswered emails, and a cancellation threat.
Decide whether the ticket requires a response within the hour, using the source criteria about blocking or financial loss.
The source-defined ticket text describes a payment integration outage, prior unanswered emails, and a cancellation threat.
Score the customer's apparent frustration using the three ordered levels from calm to angry.
The source-defined ticket text describes a payment integration outage, prior unanswered emails, and a cancellation threat.
Define Choice, Noul, and Score questions with criteria, pass ticket state and questions to `TypeSafeClassifier`, then read typed result maps.
Configure fast and powerful model choices, attach router middleware to an agent, and invoke it with task text.
Register note tools and configure AutoMode to gate `delete_note`; invoke the agent, then inspect remaining notes and any blocked tool error.
The examples show how one probabilistic decision layer can serve different control points: extracting several ticket attributes in one request, choosing model cost/capability per task, and checking user intent before a destructive tool runs.