Skip to content

fix(persona): 保留不确定语气并审查后来的手写更正 (PE-21) - #133

Merged
leafliber merged 3 commits into
mainfrom
fix/persona-uncertainty-handwritten
Nov 11, 2026
Merged

leafliber merged 3 commits into
mainfrom
fix/persona-uncertainty-handwritten

Conversation

@leafliber

Copy link
Copy Markdown
Member

PE-21:全自动阶段 P 线第一步,修 persona 的两类剩余失败(依据:DECISIONS.md 2026-11-10「全自动阶段计划」、2026-10-21 #130 的“剩余问题”)。

手写句被后来的记忆更正后仍被保留

  • 找到一个确定性原因:手写审查只看生成用的 6000 token 选材,而选材按重要度和保留强度排序,较新的更正容易被排除。persona_v2 后段每次只选入 16—18 条,共 41—43 条。
  • 现在把超出预算、在手写之后写入、且与手写句有共同内容词的记忆存入 material.handwritten_evidence(每句按相关度最多 40 条),只供审查,不进入生成和普通检查。发布与确认时同样按出处指纹复核。
  • 审查候选按相关度排序,每句最多 2 页,未审查的数量写入审计。
  • 结构或引文错误的重问现在附上具体错误,不再原样重发。
  • 提示词 persona_handwritten_v2 列出“明确更正”的具体形式。保护没有放宽:所列形式都已落在 v1 的定义内,判定仍要求同一内容、同一范围、本人肯定陈述。代码新增一条更严的护栏:更正引文含不确定语气时不许可删除。

自动句丢掉不确定语气及限定

  • 提示词 persona_generate_v22、persona_check_v35 要求保留不确定语气、条件、频率或数量与适用范围。
  • 不确定语气新增通用确定性检查。UNCERTAINTY 只是认识情态词这一封闭语法类,不含话题、人物或样本词。
    • _uncertainty_issues 在预筛中比对:每条相关绑定记忆中最接近该分句的子句都不确定,而候选没有同类表达时拒绝。
    • _proof_uncertainty_issues 对模型实际引用的片段再判一次。
    • 他人发言和引用不算;有一条肯定的独立记忆时交给语义检查。被拒绝的句子走既有的修复/复查或删句路径。
  • 条件、频率没有新增确定性判定,由模型逐焦点核对;活动范围仍走 scope_check。

未改动

发布流程、DEFAULT_PUBLISH_MODE(仍为 all_manual)、模型调用用途。旧提示词文件保留。

提示词 SHA-256

文件 SHA-256
persona_generate_v22.md ee16097d6fd06206ed8d68eb43bddb5dc424c0e05e5c9c40c85cecc7ef8b8952
persona_check_v35.md 173d34366eb713357f9cce3e7b8f939321f77a7b77c5214d8f801d3e8c6998c0
persona_handwritten_v2.md 4ce888d3f592e0eef17a9c4b7cb77bec82f64e60cceac2d1f5a0bcef37fe8aef

验证

  • 新增 tests/test_persona_uncertainty.py、tests/test_persona_handwritten_coverage.py(确定性测试和假模型集成测试)。
  • 全量 pytest,3.13 和 3.12 均为 5529 通过、1 失败。失败的 test_persona_streaming.py::test_future_deadline_closes_stream_worker_and_preserves_shared_client 在未改动的 15e8cf7 上单独运行同样失败,与本 PR 无关。
  • 用新检查扫描公开 persona_v1/v2 的 208 条自我记忆,按原文写入时误拦 0 条。这只是确定性扫描,不代表质量结论。
  • 真实评测未运行。 按分工调整,persona_v1/v2 的正式运行和判分由 Codex 完成,运行命令见下。

运行命令(在本 PR head 上)

export IRIS_TEST_MODELS=/Users/cassia/Local/Code/iris-core/test-models.toml
uv run iris models check
uv run iris eval persona --judge-mode external --corpus evals/persona_v1.json --out /Users/cassia/Local/Code/iris-eval-artifacts/persona-pe21-<日期>/persona_v1
uv run iris eval persona --judge-mode external --corpus evals/persona_v2.json --out /Users/cassia/Local/Code/iris-eval-artifacts/persona-pe21-<日期>/persona_v2

不合并,等规划者审查。

Handwritten review now also sees later corrections that fall outside the
generation budget, and a reask names the defect. A correction quote that is
itself uncertain never licenses a deletion.

Automatic sentences must keep the certainty of their source: prompts cover
uncertainty, condition, scope and frequency; a deterministic closed-class
check rejects dropped epistemic modals at precheck and on cited proof spans.
… range (PE-22)

- _proof_uncertainty_issues: a modal constrains only its own proposition. A
  single cited clause is bound by the citation; a bundled citation or the
  current-text fallback needs a lexical link covering most of the focus, else
  no verdict and the semantic check decides. A reported request is constrained
  only by a clause with the same asking verb; text after a consequence link in
  a hedged clause is not doubted. Candidate wording that says it cannot tell
  (EPISTEMIC_LIMIT) keeps the doubt.
- _hedge_kept: a hedge reaches a later focus only while no clause with its own
  subject or opening connective intervenes, so an unrelated hedge no longer
  excuses other claims.
- Quantifier ranges: foci with closed-class quantifiers (first time, only,
  all, every time, never, always ...) carry `quantifiers` and need focus-level
  `quantifier_checks` (scope_check shape plus candidate/source quantifier).
  Code checks fields, that both quantifier and range are in this focus and in
  the same clause of an own bound source, and rejects dates, occasion markers,
  entry names or another clause's qualifier as the range.
- Prompts: persona_check_v36, persona_generate_v23; older files kept.
@leafliber
leafliber merged commit 1fc7827 into main Nov 11, 2026
1 check passed
@leafliber
leafliber deleted the fix/persona-uncertainty-handwritten branch November 11, 2026 08:00
leafliber added a commit that referenced this pull request Nov 11, 2026
- DECISIONS 新增 2026-11-11 条目:#139 门槛结果与审查决定、#140 默认值与迁移判定、#133 合并理由与 PE-23、G/I 规格要点、隐藏集运行授权。
- 设计文档 10.2、12.5、16.1 改为门槛已通过的措辞,16.1 第 7 项改为按 1、3、7 天重试。
- AGENTS 补充当前进度。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant