Lab02JevReplay

一张工单,六个问题

Jev 不写字。你把状态和几个类型化的问题一起发过去,它把每个问题的答案同时算出来—— 一个选项、一个分数、一个概率——你的代码拿着这些数字决定下一步。 下面是别人跑过的一次调用的回放。

回放,不是现场调用。所有数字来自 DataCamp 的工单路由教程1; 六个答案里教程只公布了三个,没公布的这里也不补。

调用回放

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,他们完全拉不出报表。 周四有董事会。

待发送

  1. choicequeue

    Which queue should own this ticket

    这张工单该归哪条队列

    • bug_triageA defect in a specific feature, reproducible, goes into the backlog
    • incident_responseA live breakage affecting multiple users right now, needs a responder today
    • customer_successThe account needs managing, not the code

    —

  2. scoregoodwill_risk

    How much patience does this customer have left

    客户还剩多少耐心

    —

  3. noulis_time_sensitive

    The customer names a specific deadline

    客户点名了一个具体期限

    —

  4. noulhas_reproduction

    The ticket contains enough detail to reproduce the problem

    工单里的信息够复现问题

    —

  5. noulmentions_money

    The customer mentions lost revenue, refunds, or cancelling

    提到了损失、退款或取消

    —

  6. noulis_automated

    This ticket is a machine-generated notification, not a person writing in

    这是机器发的通知,不是人写的

    —

为什么挑这个案例

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 直接发是什么样

POST https://api.typesafe.ai/v1/systemone · Authorization: Bearer <key>

{
  "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 之后的下一步:同样六个问题, 跑在二十张以上真实工单上,看置信度的分布,再定阈值。

来源

  1. Tom Farnschläder. "Jev Tutorial: Building a Ticket Router With TypeSafe AI's System One Model." DataCamp, 2026-09-24. datacamp.com/tutorial/jev-api-tutorial ——工单原文、六个问题、路由策略与阈值、两次运行的数字、token 用量均出自此文。
  2. Stefan Fidanov. "TypeSafe Jev Review: Testing 5 Jobs on a Non-Chat Model." DeepInfra, 2026-10-15. deepinfra.com/blog/typesafe-jev-review ——六问一次调用 p50 343 ms、32 次调用中位约 280 ms、349 美元退款的工具调用门禁案例出自此文。
  3. Mike Taylor. "Mini-Vibe Check: TypeSafe's Jev Judged Everything I've Written in 0.7 Seconds." Every, 2026年9月。every.to
  4. TypeSafe AI. "Smart Home Assistant Demo." TypeSafe AI Docs. docs.typesafe.ai/demos/smart-home ——投机式扇出(speculative fan-out)与 LLM 兜底的官方演示。
  5. TypeSafe AI. "Quick Start" 与 "API Reference." TypeSafe AI Docs. docs.typesafe.ai/introduction/quickstart、docs.typesafe.ai/api ——请求体字段(type / instructions / criteria)与响应字段按此拼出。

延伸阅读:站内《Jev:不写字,只判断》与《Jev:三个问题原语》, sumoer.fun/blog/llm/jev-decision-paradigm、sumoer.fun/blog/llm/jev-system-one-primitives