一张工单,六个问题
Jev 不写字。你把状态和几个类型化的问题一起发过去,它把每个问题的答案同时算出来—— 一个选项、一个分数、一个概率——你的代码拿着这些数字决定下一步。 下面是别人跑过的一次调用的回放。
调用回放
state · ticket
Export to CSV has been broken since Friday.
It works in Chrome, but half our team is on Safari and they can't pull reports at all.
We have a board meeting Thursday.
CSV 导出从周五起就坏了。Chrome 能用,但我们一半的人用 Safari,他们完全拉不出报表。 周四有董事会。
- choice
queueWhich queue should own this ticket
这张工单该归哪条队列
—
- score
goodwill_riskHow much patience does this customer have left
客户还剩多少耐心
—
- noul
is_time_sensitiveThe customer names a specific deadline
客户点名了一个具体期限
—
- noul
has_reproductionThe ticket contains enough detail to reproduce the problem
工单里的信息够复现问题
—
- noul
mentions_moneyThe customer mentions lost revenue, refunds, or cancelling
提到了损失、退款或取消
—
- noul
is_automatedThis ticket is a machine-generated notification, not a person writing in
这是机器发的通知,不是人写的
—
然后是你的代码
Jev 给的是数字,不是决定。决定在教程作者自己写的四条规则里——阈值是明文, 能读、能改、能按出错代价调。下面逐条过一遍这次调用的答案:
is_automated > 0.8→ 自动归档goodwill_risk ≥ 2.0 && mentions_money > 0.8→ customer_success,人先看queue.confidence < 0.75→ 送去所选队列,但人先看- 否则按
queue.choice路由;is_time_sensitive > 0.8则优先级为 today
最终:—
为什么挑这个案例
Jev 发布一个多月,能找到的用法不少:有人让它判断自己写过的二十七篇文章像不像 AI 写的3, 有人拿它给 agent 的工具调用把关、决定一笔 349 美元的退款该不该自动放行2, 官方自己的演示是一个智能家居助手,把几十个问题一次全问出去再丢掉没用的答案4。
挑工单路由,是因为它最「正」:官方快速上手用的例子就是一张工单5, TypeSafe 自己公布的四类工作流评测里有客服一类,DeepInfra 测的五个任务里两个是路由。 而这一个教程把三种原语——Choice、Score、Noul——塞进同一次调用, 又把「置信度不够就转人」写成了代码里的一行阈值。一次调用看完,Jev 的全部形状就在里面了。
同一张工单跑了两次,上面的开关可以切:Playground 那次 queue 的概率是 0.91、置信度 0.86, SDK 那次置信度是 0.95;耐心分一次 1.93、一次 1.95。选项没变,数字在动。 教程作者给的建议是先在二十张以上真实工单上校准阈值,再让它自动路由—— 这两次之间的漂移就是理由。
这一次调用,用 HTTP 直接发是什么样
{
"model": "jev-1.13.0",
"state": {
"ticket": "Export to CSV has been broken since Friday. It works in Chrome, but half our team is on Safari and they can't pull reports at all. We have a board meeting Thursday."
},
"questions": {
"queue": {
"type": "choice",
"instructions": "Which queue should own this ticket in `ticket`?",
"criteria": {
"bug_triage": "A defect in a specific feature, reproducible, goes into the backlog",
"incident_response": "A live breakage affecting multiple users right now, needs a responder today",
"customer_success": "The account needs managing, not the code"
}
},
"goodwill_risk": {
"type": "score",
"instructions": "How much patience does this customer have left in `ticket`?",
"criteria": [
"Reporting a problem, no sign of frustration",
"Mildly annoyed, still collaborative",
"Visibly out of patience, mentions the cost to their work",
"At the point of escalating over our heads or leaving"
]
},
"is_time_sensitive": {
"type": "noul",
"instructions": "The customer names a specific deadline in `ticket`."
},
"has_reproduction": {
"type": "noul",
"instructions": "The ticket contains enough detail to reproduce the problem in `ticket`."
},
"mentions_money": {
"type": "noul",
"instructions": "The customer mentions lost revenue, refunds, or cancelling in `ticket`."
},
"is_automated": {
"type": "noul",
"instructions": "This ticket is a machine-generated notification, not a person writing in in `ticket`."
}
}
}六个问题互相看不见:它们是并行、独立评估的,多问一个几乎不增加延迟。 六问一起发的中位延迟,DeepInfra 在笔记本上测到 343 ms2; 这次调用用了 524 个输入 token1,按官方定价不到万分之一美元。
这一页没做的事
- 没有现场调用。想过让访客填自己的 key 直接在浏览器里发请求—— 2026 年 10 月 26 日实测,api.typesafe.ai 对来自本站域名的跨域预检返回
Disallowed CORS origin;静态站没有服务端可以代理,所以只能回放。 - 三个答案是空的。教程只打印了 queue、goodwill_risk、is_time_sensitive 三个值, 另外三个 Noul 参与了策略但没公布数值。页面不补数;最终路由是 (incident_response, today) 这一事实,只能反推出 is_automated 没过 0.8。
- 还没用我们自己的工单试过。拿到 key 之后的下一步:同样六个问题, 跑在二十张以上真实工单上,看置信度的分布,再定阈值。