别再让聊天模型做决定:Clef、Decider 与「类型化概率」转向

·阅读约10分钟·Evergreen Tools Team

过去两周,决策模型(decision model)这个类别突然热闹起来。Cloudflare 在 2026 年 10 月 1 日发布 Clef 与 Clef-flash,并在 Workers AI 上托管、在 Hugging Face 上以 Apache 2.0 完全开源;同一天,Perplexity 在 Hugging Face 以 Apache 2.0 发布 pplx-decider-v1-27b,并开放 Decisions API。它们做的事情是同一件:不写文章,只给判定。

数据流的抽象图景

决策模型把「写一段话」换成「给一个数」

一、什么叫决策模型

Cloudflare 博客里的定义很好用:分类模型存在已久,但决策模型是让 agent 判断「下一步怎么走」的模型——你传入输入(比如一条客服消息),问它「紧急吗、该哪个团队处理」,它会返回带概率的类型化答案,你的代码再据此路由工单、触发升级,或者转人工。它的关键区别在于不需要为了新增类别而反复重训,也不像大语言模型那样非确定性。Cloudflare 自己的说法是:有了概率阈值,人类不一定还要在循环里,agent 可以自己取信息、做决定、动手,必要时才交给人。它们各自回答的其实是同一个实际问题:给定这段输入,接下来该发生什么,以及系统对此有多大把握。

# A decision model answers questions about state. It does not chat.
# Ask for a yes/no probability (noul) and threshold the number yourself.
import json, urllib.request

state = open("ticket.txt").read()          # the content to judge
questions = {
    "is_urgent": "noul",                   # probability of yes
    "team": {"choice": ["billing", "platform", "abuse", "other"]},
    "severity": {"score": ["p1", "p2", "p3", "p4"]},
}                                          # up to 128 questions in one request

body = json.dumps({"model": "pplx-decider-v1-27b",
                   "state": state, "questions": questions}).encode()
req = urllib.request.Request(
    "https://openrouter.ai/api/v1/decisions", data=body,
    headers={"Authorization": "Bearer $KEY", "Content-Type": "application/json"})
resp = json.loads(urllib.request.urlopen(req, timeout=60).read())
# -> typed, probabilistic, no prose to parse

二、Clef 的具体参数

Clef 有两个尺寸:Clef 是 270 亿参数版本(追求最准),Clef-flash 是 90 亿参数版本(追求几十毫秒级响应)。两者都跑在 Workers AI 上,权重在 Hugging Face 上以 Apache 2.0 开放,可以下载到本地硬件跑。Cloudflare 强调三点差异:带视觉编码器,可以分类图片内容(Jev 当时只做文本);上下文窗口 64k(Jev 是 32k),能塞进更多判定依据;以及与 Jev 的请求/响应格式兼容,为 Jev 写的多数代码可以直接用。同时发布了 RL 微调产品,允许客户用自己的数据微调 Clef。

# The application, not the model, owns the threshold.
# Write it down, version it, and log every near-miss.
ROUTING = {
    "urgent_threshold": 0.80,      # above this, page a human
    "auto_route_threshold": 0.65,  # above this, route automatically
    "escalate_band": (0.45, 0.65), # ambiguous: hand to a human queue
}

def route(decision):
    p = decision["is_urgent"]["yes"]
    team = max(decision["team"]["probs"], key=decision["team"]["probs"].get)
    conf = decision["team"]["probs"][team]
    if p >= ROUTING["urgent_threshold"]:
        return {"action": "page", "team": team, "p_urgent": p}
    if conf >= ROUTING["auto_route_threshold"]:
        return {"action": "auto_route", "team": team, "confidence": conf}
    return {"action": "human_queue", "reason": "ambiguous_band",
            "p_urgent": p, "confidence": conf}     # log this, tune later
屏幕上的数据看板

你的代码去阈值化概率,而不是解析聊天回复

三、基准数字要打个折看

Cloudflare 公布了一张对比表,声明 Clef 目前在 Jev Decision Index 上领先。表格里几项值得记:BFCL case exact 为 98.47(Jev 98.76,DiffusionGemma Jev 95.75);ToolRet nDCG@10 为 69.19(Jev 66.43);API-Bank accuracy 为 91.93(Jev 93.11);Home appliances case exact 82.95(Jev 97.73);When2Call accuracy 72.37(Jev 80.97)。注意这是厂商自报成绩,且并非每项都领先——Home appliances 与 When2Call 就明显落后。真正更有说服力的例子是 Cloudflare 自己的威胁情报场景:分类一个域名平均 2.2 秒,而最快的通用大模型 gpt-oss-120b 在同一工作流里要 4.7 秒,而且只给出两个分类。

# A bounded decision is only safe to automate when it is reversible.
# Same model call, three different action classes.
DECISION_CLASSES = {
    "auto":        {"reversible": True,  "logged": True,  "human": False},
    "notify":      {"reversible": True,  "logged": True,  "human": "post_hoc"},
    "human_gate":  {"reversible": False, "logged": True,  "human": "pre_approval"},
}

def act(decision, cls_name):
    cls = DECISION_CLASSES[cls_name]
    if cls["human"] == "pre_approval":
        return queue_for_approval(decision)
    if cls["human"] == "post_hoc":
        notify_owner(decision)
    return execute(decision, rollback=cls["reversible"])

# Probability tells you how sure the model is.
# Reversibility tells you whether you are allowed to care.

四、Perplexity Decider 的设计

据 OpenRouter 的模型页,Decider V1 27B 于 2026 年 10 月 1 日发布,是一个决策模型:它读取以 state 传入的内容,在一次请求里针对一个或多个具名问题返回类型化的概率答案——是非题的 yes 概率(noul)、每个选项的概率加最可能项(choice)、或每个档位的概率加期望分数(score)。它面向分类、路由、审核与评分,让应用代码去阈值化返回的数字,而不是解析聊天回复。一次请求最多可携带 128 个关于同一内容的问题;上下文窗口 262,144 token;定价输入每百万 token 0.04 美元、输出免费。

# Rubric grading: get a probability per level plus an expected score.
# Useful for content scoring where you need a number, not a paragraph.
rubric = {
    "technical_accuracy": {"score": ["0", "1", "2", "3"]},
    "citations_present":  "noul",
    "tone_suitable":      "noul",
    "length_ok":          "noul",
}

def accept(graded, min_expected=2.2, min_cite_prob=0.85):
    return (graded["technical_accuracy"]["expected"] >= min_expected
            and graded["citations_present"]["yes"] >= min_cite_prob
            and graded["tone_suitable"]["yes"] >= 0.80)

# Two numbers and a boolean replace a paragraph you would have had to parse,
# regex, and argue about in code review.
电路板特写

9B 的小模型跑在热路径上,大模型做开放式推理

五、它在 Agent 里该站哪儿

把判断分成两层会清楚很多:有界的判定(分类、路由、升级、打分)放热路径,用决策模型;开放式推理(需要解释、需要组合新方案、需要写代码)交给大模型。决策模型的最大收益不是便宜,而是「不需要解析」——你的代码拿到的是一个数,直接和写死的阈值比较,没有解析失败、没有格式漂移、没有为了让模型吐 JSON 而加的一堆重试。但有两件事必须自己负责:阈值必须由应用拥有并写下来,以及必须保证动作可回滚、可记录。

# Benchmark the decision against the LLM it would replace,
# on the same task, before you migrate anything.
def bench(task_inputs, decision_model, chat_model, runs=50):
    t0 = time.perf_counter()
    for x in task_inputs[:runs]:
        decision_model.decide(x)              # bounded output
    decision_ms = (time.perf_counter() - t0) / runs * 1000

    t1 = time.perf_counter()
    for x in task_inputs[:runs]:
        parse(chat_model.complete(x))         # prose you must parse
    llm_ms = (time.perf_counter() - t1) / runs * 1000

    return {"decision_ms": round(decision_ms, 1),
            "llm_ms": round(llm_ms, 1),
            "parse_failures": chat_failures(),  # the hidden cost
            "cost_per_task_usd": cost_per_task()}

六、什么时候不该用它

以下场景请继续用大模型:需要给出理由的场景(合规解释、面向用户的说明);类别本身还在演化、定义不确定的分类;需要跨多步推理才能得出结论的判断;以及任何「模型给错一个数就会造成不可逆伤害」的场景——除非前面已经有人类审批闸门。决策模型把不确定性变成了一个可观测的数字,这是巨大的进步;但它不告诉你这个数字意味着什么,那部分判断必须留在你的代码与流程里。把这个数字当证据,而不是当权威。一个校准过的概率,加上一个你自己拥有的阈值,比一段需要你去解读的漂亮文字,是可靠得多的安排。

📌 常见问题 FAQ

什么是决策模型(decision model)?

按 Cloudflare 博客的定义,分类模型存在已久,而决策模型是让 agent 判断下一步怎么走的模型:传入输入(如一条客服消息),提问「是否紧急、该哪个团队处理」,模型返回带概率的类型化答案,由应用代码据此路由、升级或转人工。它不需要为新增类别反复重训,也不像大语言模型那样非确定性。

Cloudflare Clef 的关键参数是什么?

Clef 与 Clef-flash 于 2026 年 10 月 1 日发布并托管在 Workers AI。Clef 为 270 亿参数版本,Clef-flash 为 90 亿参数版本;权重在 Hugging Face 以 Apache 2.0 开放可本地运行;带视觉编码器可分类图像;上下文窗口 64k(Jev 为 32k);与 Jev 的请求/响应格式兼容。同时发布 RL 微调产品。

厂商公布的基准数字可信吗?

Cloudflare 声明 Clef 目前在 Jev Decision Index 上领先,但这是厂商自报结果,而且并非每项都赢:其公布的表格中 Home appliances case exact 为 82.95,低于 Jev 的 97.73;When2Call accuracy 为 72.37,低于 Jev 的 80.97。相对更有说服力的是它自己的威胁情报用例:域名分类耗时 2.2 秒,而最快的通用大模型 gpt-oss-120b 同工作流需 4.7 秒且只给两个分类。

Perplexity Decider V1 27B 怎么用?

据 OpenRouter 模型页,该模型 2026 年 10 月 1 日发布。它读取以 state 传入的内容,一次请求返回一个或多个具名问题的类型化概率:yes 概率(noul)、各选项概率加最可能项(choice)、各档位概率加期望分(score)。一次最多 128 个问题,上下文 262,144 token,输入每百万 token 0.04 美元、输出免费。注意它走 Decisions API,不是 OpenAI 兼容的 chat 端点。

什么时候不该用决策模型?

需要给出理由或解释的场景(合规说明、面向用户的解释);类别仍在演化、定义尚不明确的分类;需要跨多步推理才能得出的判断;以及误判会造成不可逆伤害的场景——除非前置了人类审批闸门。决策模型把不确定性变成可观测的数字,但「这个数字意味着什么」仍需由你的代码与流程负责。