mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-18 10:12:00 +00:00
可点击证据第四期:结论句由模型裁判;只引单元格的问数据图能发成受管
一、结论句裁判
- 报告节点新增 claims: judge:写完、核对完之后,把结论句和它引用的证据摘录交给裁判模型,
判为支持 / 部分支持 / 不支持 / 不是结论,附一句理由;判定只标注,不改写正文
- 送裁判的句子按固定规则预筛:带引用的、含方向词或因果词的送去判,短句、过渡句不送
- 证据摘录:指标写名称、值和原式;查询给 SQL 前 300 字和被引用的行,被引用的列一定给到;遮罩列一律不给;
规则里写明「数字已经由系统核对过,不要复算」
- 一份报告合并成一次调用,超出句数就分批;结构化输出失败时退回 JSON 解析,再失败记为未裁判
- 裁判模型的优先级:节点上写的 > 设置里的「证据裁判模型」> Copilot 的模型;思考关闭;
和写作模型相同时给警告(等于自己审自己)
- rewrite_once(默认关):把不支持的句子和理由交回写作者只改这几句,再裁一次;
改写稿冒出原稿没有的问题就不采用,保留原稿和原来的判定
二、成本上限
- 每份报告的句数、金额、时长,探索运行每次点击的金额,全局每日金额,每一项都可以自定义,也都可以设成不限;
默认 40 句、$0.05、30 秒,每次点击 $0.01,每天 $2
- 调用前先估算,超出上限按优先级截断:先判带引用的,再判含方向词、因果词的,其余记为未裁判并写明「已到上限」;
不报错,也不让报告失败
- 每日花费按本地日期计数,持久化在设置表里;重跑同一次运行不重复计费;价格目录里没有的模型只计次数,并写明估不出金额
三、正式运行与探索运行
- 正式运行在报告节点内裁判,判定写进报告文档、随文档封存;不支持的按 on_unsupported(degrade / withhold)降档或不予出具,
裁判没跑成记缺口,不能判完整出具
- 探索运行按需裁判:POST /api/runs/{id}/evidence/judge,点开哪句判哪句;判定作为 evidence.judged 事件追加在封存之后,
标「封存后追加」,封存核对仍然一致;只读封存范围内的工件;同一句不重复判;运行在裁判期间被接着跑时不记录
- 正式运行调这个接口返回 409,写明「正式运行的裁判在节点内完成」
四、治理与自动修复
- G3 放开 judge:受管级别写 judge 必须写预算(judge.max_cost_usd,或显式写 null 表示不限)
- 发布前自动修复:缺预算时给选项(默认金额 / 不限),不替人选;
从 require_citation 改成 judge 不算降低要求,judge 改回 off、withhold 放宽成 degrade 算降低要求
- Copilot 手册:受管模板可以写 judge 并带预算;问数据按需裁判,不替人打开结论句策略
五、界面
- 结论句句末放徽标:支持 ◆、部分支持 ◇、不支持 ! 整句浅底、未裁判 ?;不用表示「已核对」的绿色;n / N 也跳到不支持的句子
- 证据面板里「模型的解释」:带「模型判断 · 模型名 · 非确定」,封存后追加的另外标出;
「请模型判断这句」只在探索运行、还没判过时出现,触顶时写明已到上限和怎么调
- 出具横幅多一段结论句计数;设置页新增「证据裁判」一组(裁判模型、各项上限、今日花费),设成不限时写明费用受什么约束;
报告节点可以配 judge;运行轨迹里裁判相关的事件都有中文标题
六、门禁修正
- 引用模式下,图里没有口径卡(只引查询单元格)的,出具契约不再要求 metrics_from,受管门禁也不再要求 required:
strict 加 cells 已经保证每个数都点得开、对不上就不予出具;有口径卡的照旧要求。
以前问数据的图怎么都发不成受管,Copilot 补上契约也会被判「冒出新的问题」作废
This commit is contained in:
+110
-2
@@ -706,6 +706,95 @@ export interface EvidenceUnit {
|
||||
loc?: { row: number; col: number }
|
||||
/** 列表项的缩进层级 */
|
||||
depth?: number
|
||||
/**
|
||||
* 结论句裁判的判定(四期):只有送了裁判的候选句有。正式运行里节点当场判的进封存(post_seal false);
|
||||
* 探索运行里候选句先标 unjudged + reason on_demand,点开再判
|
||||
*/
|
||||
verdict?: EvidenceVerdict
|
||||
}
|
||||
|
||||
/**
|
||||
* 模型对一句结论的判定。是模型的判断,不是证据,不能被引用。
|
||||
* status 为 unjudged 时 reason 写明为什么没判:四个上限(max_claims / max_cost_usd / daily_max_usd /
|
||||
* timeout_s,rationale 以「已到上限(…)」开头)、error、format、missing、on_demand(探索运行按需)
|
||||
*/
|
||||
export interface EvidenceVerdict {
|
||||
status: 'supported' | 'partial' | 'unsupported' | 'not_a_claim' | 'unjudged' | string
|
||||
/** 理由,最多 60 字 */
|
||||
rationale?: string
|
||||
/** 裁判模型 id;探索运行还没判的是 null */
|
||||
judge?: string | null
|
||||
/** 封存之后按需追加的(evidence.judged 事件) */
|
||||
post_seal?: boolean
|
||||
/** 裁判看过、摘录里真有的证据编号 */
|
||||
used?: string[]
|
||||
reason?: string
|
||||
cost_usd?: number
|
||||
}
|
||||
|
||||
/** 文档(和 report.checked、节点产出)里的裁判摘要:键的顺序同后端 judge.SUMMARY_KEYS */
|
||||
export interface EvidenceJudgeSummary {
|
||||
/** inline:正式运行节点里当场判;on_demand:探索运行按需 */
|
||||
mode?: 'inline' | 'on_demand' | string
|
||||
model?: string | null
|
||||
on_unsupported?: 'degrade' | 'withhold' | string
|
||||
rewrite_once?: boolean
|
||||
limits?: { max_claims?: number | null; max_cost_usd?: number | null; timeout_s?: number | null
|
||||
daily_max_usd?: number | null } | null
|
||||
candidates?: number
|
||||
/** 预筛放掉、没送裁判的结论句 */
|
||||
screened?: string[]
|
||||
counts?: Partial<Record<'supported' | 'partial' | 'unsupported' | 'not_a_claim' | 'unjudged', number>>
|
||||
unjudged?: Record<string, number>
|
||||
limits_hit?: string[]
|
||||
complete?: boolean
|
||||
priced?: boolean | null
|
||||
cost_usd?: number
|
||||
calls?: number
|
||||
reused?: number
|
||||
duration_ms?: number
|
||||
gaps?: string[]
|
||||
notes?: string[]
|
||||
same_model?: boolean
|
||||
/**
|
||||
* 不支持的句子交回写作者改写一次(rewrite_once)。units:交回的句子在封存文档里的编号(采用了改写稿时,
|
||||
* 改掉的句子是 null);sentences:交回的原句;changed:改写稿里新写的句子的编号(没采用时为空);
|
||||
* reason:没采用的原因
|
||||
*/
|
||||
rewrite?: { units?: (string | null)[]; sentences?: string[]; applied?: boolean; reason?: string | null
|
||||
changed?: string[] } | null
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /runs/{id}/evidence/judge 的答复:evidence.judged 事件的载荷(NOTES-A4 §8)。前端对缺字段宽容:
|
||||
* verdicts 也认成 [{unit, …}] 的列表
|
||||
*/
|
||||
export interface EvidenceJudgeResult {
|
||||
/** 判的是哪份报告:{node_id, doc_artifact}(事件载荷里是节点 id 字符串) */
|
||||
report?: string | { node_id?: string; doc_artifact?: string }
|
||||
doc_artifact?: string
|
||||
verdicts?: Record<string, EvidenceVerdict> | (EvidenceVerdict & { unit?: string })[]
|
||||
model?: string | null
|
||||
cost_usd?: number
|
||||
calls?: number
|
||||
limits_hit?: string[]
|
||||
gaps?: string[]
|
||||
notes?: string[]
|
||||
skipped?: Record<string, string>
|
||||
post_seal?: boolean
|
||||
/** 触顶、没跑成、点的不是结论句时的一句话;判成了是 null */
|
||||
message?: string | null
|
||||
/** 触顶时怎么调,一个上限一句 */
|
||||
adjust?: string[]
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
/** 这句能不能「请模型判断」:片段接口按运行的实际情况答(和按需裁判接口同一套条件) */
|
||||
export interface EvidenceOnDemand {
|
||||
available?: boolean
|
||||
/** formal / legacy / not_a_claim / judged / unsealed / seal_broken */
|
||||
reason?: string | null
|
||||
message?: string | null
|
||||
}
|
||||
|
||||
export interface EvidenceBlock {
|
||||
@@ -750,6 +839,12 @@ export interface EvidenceStats {
|
||||
quotes?: number
|
||||
unknown_entities?: number
|
||||
unverified_entities?: number
|
||||
/** 四期:claims 为 judge 时追加,候选句按判定的句数 */
|
||||
supported?: number
|
||||
partial?: number
|
||||
unsupported?: number
|
||||
not_a_claim?: number
|
||||
unjudged?: number
|
||||
}
|
||||
|
||||
/** report_doc 工件的内容 */
|
||||
@@ -764,6 +859,8 @@ export interface EvidenceDocData {
|
||||
blocks: EvidenceBlock[]
|
||||
stats?: EvidenceStats
|
||||
violations?: EvidenceViolation[]
|
||||
/** 四期:写作时结论句策略是 judge 才有 */
|
||||
judge?: EvidenceJudgeSummary
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -807,7 +904,14 @@ export interface EvidenceGraph {
|
||||
/** 文档取回时哈希复验:false 对不上(或不是这次运行这个节点写的),null 文件不在了 */
|
||||
hash_ok?: boolean | null
|
||||
/** 写这份报告时的结论句策略(report.checked 里记的;老后端、升级前的运行没有) */
|
||||
claims?: string | null }[]
|
||||
claims?: string | null
|
||||
/**
|
||||
* 四期:封存之后按需追加的判定(evidence.judged 叠在一起),{unit: 判定}。后端没给时前端只认
|
||||
* 点开时片段接口、按需裁判接口答的那几句
|
||||
*/
|
||||
post_seal_verdicts?: Record<string, EvidenceVerdict> | null
|
||||
/** 封存的裁判摘要(文档的 judge) */
|
||||
judge?: EvidenceJudgeSummary | null }[]
|
||||
evidence?: { alias?: string; eid?: string; kind?: string; label?: string; node_id?: string; artifact?: string
|
||||
sealed?: boolean; cited_by?: string[]; report?: string }[]
|
||||
edges?: { from: string; to: string; rel: string }[]
|
||||
@@ -1042,7 +1146,11 @@ export interface EvidenceAudit {
|
||||
export interface EvidenceSegmentDetail {
|
||||
report?: { node_id?: string; doc_artifact?: string }
|
||||
segment?: Partial<EvidenceSegment> & { unit?: string }
|
||||
unit?: { id?: string; kind?: string; text?: string; span?: [number, number]; cites?: string[] }
|
||||
unit?: { id?: string; kind?: string; text?: string; span?: [number, number]; cites?: string[]
|
||||
/** 这一句的判定:封存的文档里的,或者按最新的 evidence.judged 叠上的(post_seal) */
|
||||
verdict?: EvidenceVerdict
|
||||
/** 这一句能不能请模型判断、不能的话为什么 */
|
||||
on_demand?: EvidenceOnDemand }
|
||||
block?: { id?: string; type?: string }
|
||||
chain?: EvidenceStep[]
|
||||
/** 片段为什么是现在这个状态,一句人话 */
|
||||
|
||||
Reference in New Issue
Block a user