jev-latest Choice
How to run jev-latest Route a shoe-store ticket
Description
TypeSafe’s Choice example: which department should handle a wrong-size order.
Copy
from typesafe_sdk import Choice, Noul, Score, TypeSafeClient
with TypeSafeClient(model="jev-latest") as client:
result = client.system_one(
state="My running shoes arrived in the wrong size. Can I swap them for a size 10?",
questions={
"department": Choice(
instructions="Which team should handle this?",
criteria={
"returns": "Exchanges, wrong or damaged items",
"shipping": "Delivery status, delays, lost packages",
"billing": "Charges, invoices, payment problems"
},
)
},
)
Worked example
Illustrative for this sample state, not a live run
Sample state
My running shoes arrived in the wrong size. Can I swap them for a size 10?
Choice
departmentWhich team should handle this?
- returns · selected 100%
Exchanges, wrong or damaged items
- shipping 0%
Delivery status, delays, lost packages
- billing 0%
Charges, invoices, payment problems
Confidence 100%
What you might do next
Read `department.choice`. This ticket puts all of the probability on `returns` at confidence 1.0. A ticket that mentions a wrong size and a missing refund would split probability between `returns` and `billing`.
Tags
choicereturns