JEV 问题设计指南

Jev Choice、Score 与 Noul 怎么选

Choice 用于命名选项,Score 用于有序等级,Noul 用于一个真假命题:完整比较 Jev 三种问题类型。

更新于 2026-10-24含动手练习;按自己的节奏完成
01

Choice:选择一个命名选项

适合路由、标签、策略分支或工具选择。各项标准要清晰可区分,真实输入可能超出列表时应提供明确的兜底项。

02

Score:落在一个有序刻度上

适合严重度、优先级、质量或风险等级。每一级都需要具体判定标准,含糊的数字会造成不稳定结果。

03

Noul:判断一个命题是否为真

适合单个事实或策略命题,返回 P(true)。除非两个条件确实构成一个不可分命题,否则不要用“并且”把它们塞进同一个问题。

04

用小问题组合业务决策

并行询问多个相互独立的问题,再在代码中组合类型化答案。这样模型负责判断,业务策略仍保持可见、可测试。

动手验证:完整示例与失败路径

下方是完整文件,不需要补写省略函数。示例仅打印建议或转人工状态,不修改工单、不执行支付或发布。

这是本站编写的合成输入与模拟响应实验,Python 3.11+ 标准库即可运行,不需要密钥,不联网。测试通过只证明程序按预期处理这些输入,不能证明 Jev 的准确率、延迟或真实服务重试行为。

一个工单,三个不同问题

route 选择互斥队列;severity 按无影响、可绕过、核心功能阻断三个等级评分;urgent 判断是否正在影响服务。三题共享证据但独立计算:不要让 severity 的 instructions 引用尚未产生的 route 答案。

三级 Score 的位置范围是 0–2。示意分布 {0:0, 1:0.2, 2:0.8} 的加权位置为 1.8,不是 1.8% 风险,也不是 1.8 小时停机。Noul 的 0.9 是命题为真的概率输出,不是单独的 confidence。

问题合成答案程序应如何使用
Choice · routetechnical / confidence 0.8从互斥队列中提出一个建议;0.8 的 confidence 与胜出项概率 0.85 分开读取。
Score · severity1.8 / [0, 2]在已声明等级上比较影响程度,不能当作概率、停机时长或恢复成本。
Noul · urgent0.9 / [0, 1]解释为“正在中断服务”这一命题的概率输出,阈值仍需用业务标注校准。

练习:把 fixture 的 route.choice 改成 invented,或把 severity.score 改成 3,运行应明确报错。再把 urgent 改为 0.2,队列可以仍为 technical:是否紧急与由谁处理不是同一问题。互斥队列使用一个 Choice;分别问“技术”“非技术”的两个 Noul,不能假定概率互补。

typed_questions_lab.py

"""Synthetic answer-reading lab. Python 3.11+, standard library, no network.

The fixture is written by this site, not an observed Jev response. The lesson is
how to read three different answer types, not how accurately Jev classifies.
"""
import json
from math import isfinite

STATE = {
    "message": "Checkout fails for every customer; invoices are still accessible.",
    "scope": "all customers",
}
QUESTIONS = {
    "route": {"type": "choice", "instructions": "Which team owns this incident?",
              "criteria": {"technical": "Bugs or integrations", "billing": "Invoices", "human": "Unclear ownership"}},
    "severity": {"type": "score", "instructions": "How blocked are customers?",
                 "criteria": ["Unaffected", "Workaround available", "Core workflow blocked"]},
    "urgent": {"type": "noul", "instructions": "Does the message describe an ongoing service disruption?"},
}
FIXTURE = {
    "route": {"type": "choice", "choice": "technical", "confidence": 0.8,
              "probabilities": {"technical": 0.85, "billing": 0.10, "human": 0.05}},
    "severity": {"type": "score", "score": 1.8},
    "urgent": {"type": "noul", "noul": 0.9},
}


def bounded_number(value, low, high):
    return (isinstance(value, (int, float)) and not isinstance(value, bool)
            and isfinite(value) and low <= value <= high)


def interpret(answers):
    route, severity, urgent = (answers[key] for key in ("route", "severity", "urgent"))
    if route.get("type") != "choice" or route.get("choice") not in QUESTIONS["route"]["criteria"]:
        raise ValueError("Unexpected Choice option")
    if not bounded_number(route.get("confidence"), 0, 1):
        raise ValueError("Invalid Choice confidence")
    probabilities = route.get("probabilities", {})
    if (set(probabilities) != set(QUESTIONS["route"]["criteria"])
            or not all(bounded_number(p, 0, 1) for p in probabilities.values())
            or abs(sum(probabilities.values()) - 1) > 1e-6):
        raise ValueError("Invalid Choice distribution")
    if severity.get("type") != "score" or not bounded_number(severity.get("score"), 0, 2):
        raise ValueError("Score must be a position in the declared 0–2 scale")
    if urgent.get("type") != "noul" or not bounded_number(urgent.get("noul"), 0, 1):
        raise ValueError("Noul must be a probability")
    return {
        "fixture_only": True,
        "proposed_team": route["choice"],
        "choice_confidence": route["confidence"],
        "winning_option_probability": probabilities[route["choice"]],
        "severity_position_0_to_2": severity["score"],
        "ongoing_disruption_probability": urgent["noul"],
        "action": "review_before_any_ticket_update",
    }


if __name__ == "__main__":
    print("SYNTHETIC FIXTURE — no API request or model measurement")
    print(json.dumps(interpret(FIXTURE), indent=2))
    print("Score illustration only: 0*0 + 1*0.2 + 2*0.8 = 1.8; not 1.8% or hours.")
    print("One Choice holds mutually exclusive queues; independent Noul answers need not sum to 1.")
下载此文件

运行

python3 typed_questions_lab.py

如何判断是否运行正确

输出必须明确写出 SYNTHETIC FIXTURE 和 fixture_only=true;技术队列、0.8 confidence、0.85 胜出概率、1.8 位置和 0.9 命题概率是不同字段。任何值都不是本站从 API 测得的结果。

官方接口与概念来源