Skip to content

docs(adr): WP-04 classifier モデル格上げを実測評価し見送り (ADR-038 amendment) - #245

Merged
aloekun merged 1 commit into
masterfrom
wp04-classifier-upgrade
Jul 4, 2026
Merged

docs(adr): WP-04 classifier モデル格上げを実測評価し見送り (ADR-038 amendment)#245
aloekun merged 1 commit into
masterfrom
wp04-classifier-upgrade

Conversation

@aloekun

@aloekun aloekun commented Jul 4, 2026

Copy link
Copy Markdown
Owner

概要

WP-04「classifier モデル格上げ」を実測評価し、格上げを見送り・mistral:7b を維持する。ADR-038 の findings classification の精度向上 (特に false_positive_likely 判定改善) を狙ったが、どの候補モデルも主目的を達成せず、最良候補は安全を後退させたため。ADR-038 の amendment。

docs/harness-improvement-plan.md の 3 ステップ知識移管(permanent 先行 → 参照付替 → ephemeral 更新)に従う。docs-only。

実測 (Opus gold baseline、ADR-038 Phase a 方式、n=35)

real CodeRabbit findings 30 件 + キュレート FP 例 5 件を Opus が gold action 付与し、5 モデルの一致率・FP 処理・安全軸を比較。

モデル accuracy FP→auto_fix (有害) human_review→auto_fix (危険) invalid VRAM
mistral:7b (現行) 0.63 4/6 0/14 (完璧) 0 5.6GB
gemma4:12b 0.57 4/6 0/14 3 8.4GB
gemma4:26b 0.20 27 (破綻) 17.6GB
gemma4:31b 0.57 3/6 0/14 0 20.9GB
qwen3-coder:30b 0.69 3/6 1/14 (安全後退) 0 19.4GB

結論と根拠

  • FP 検出は全モデルで未達: gold FP 6 件の正検出は最良でも 1、全モデルが 3〜4 件を有害な auto_fix に誤分類。計画の主目的を満たす候補なし=この規模の局所 LLM の能力限界。
  • mistral:7b は安全軸で完璧: 人間判断を要する finding を一度も auto_fix に倒さない。accuracy 僅差上 (+0.06) の qwen3-coder は逆に human_review を 1 件 auto_fix に誤送する安全後退。分類器の目的 (安全な triage) では保守性が accuracy に優先。
  • 中型 dense は劣化・破綻: gemma4:12b/31b は accuracy 低下、gemma4:26b は 27/35 で invalid action を返し破綻 (ADR-046 WP-01 の gemma4:26b 大入力破綻と同系)。
  • accuracy 差は temperature 0.1 のばらつきと同程度で有意でない。mistral:7b は最軽量・最速・安全軸完璧のため維持。

変更内容 (docs-only)

  • docs/adr/adr-038-...md: § classify モデル格上げの評価と見送り (2026-07-05 追記) — eval 手法・結果表・「保守バイアス=安全機能」「FP検出=能力限界」の知見・妥当性の脅威
  • docs/harness-improvement-plan.md: WP-04 を「見送り」に更新
  • docs/todo-summary.md / docs/todo13.md: 順位 256 — FP 検出強化プロンプトで再評価 (能力限界か prompt 不適合かの切り分け、Tier 5)

参照

  • ADR-038 amendment: 結論・eval 手法・安全軸の知見
  • 順位 256: follow-up (FP-tune 再評価)。eval セット (Opus gold 35 件) + ハーネスは再利用可能

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • モデル評価の結果と判断理由を追記し、採用見送りの結論を明確化しました。
    • 評価指標、比較結果、再評価の前提条件を整理しました。
  • Chores
    • 関連タスク一覧を更新し、見送り後のフォローアップ項目を追加しました。
    • 再評価の対象と進め方を明記しました。

Opus gold baseline (real findings 30 + キュレート FP 5 = 35件) で 5 モデルを比較:

- 全候補が FP 検出を改善せず (gold FP 6件中 正検出 最良でも 1、全モデル 3-4件を有害な auto_fix に誤分類)
- accuracy 最良の qwen3-coder:30b は human_review を auto_fix に誤送する安全後退
- 中型 dense は劣化 (gemma4:12b/31b=0.57) or 破綻 (gemma4:26b=27 invalid)
- mistral:7b は安全軸完璧 (human_review 0 誤送)・最軽量 → 維持

結論・eval 手法・安全軸知見を ADR-038 amendment に記録。plan WP-04 見送り、順位 256 (FP-tune 再評価) 登録。
@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2b361fab-52c6-4e14-b995-06e093480daa

📥 Commits

Reviewing files that changed from the base of the PR and between a158633 and 2fb412e.

📒 Files selected for processing (4)
  • docs/adr/adr-038-local-llm-finding-classification.md
  • docs/harness-improvement-plan.md
  • docs/todo-summary.md
  • docs/todo13.md

📝 Walkthrough

Walkthrough

ADR-038 に classifier モデル格上げ候補(gemma4系・qwen3-coder:30b)の Claude Opus gold baseline 実測比較と見送り判断を追記。harness-improvement-plan.md の WP-04 状態を「見送り」に更新し、todo-summary.md と todo13.md に FP 検出強化プロンプトでの再評価 follow-up タスクを追加した。

Changes

classifier 格上げ見送りドキュメント更新

Layer / File(s) Summary
ADR-038 評価結果と見送り判断の追記
docs/adr/adr-038-local-llm-finding-classification.md
gemma4系・qwen3-coder:30b を Claude Opus gold baseline と比較した実測結果テーブル、FP 検出改善なし・安全軸での劣位を理由とした格上げ見送り、評価手法の再利用性、妥当性の脅威(gold と classify.txt の保守バイアス差、N=35 小標本)を追記。
harness-improvement-plan.md の WP-04 状態更新
docs/harness-improvement-plan.md
全体像テーブルの WP-04 状態を「未着手」から「見送り」に変更し、WP-04 本体セクションに ADR-038 amendment に基づく判断要約、mistral:7b 維持、再評価(順位256)の指示を追加。
follow-up タスクの追加
docs/todo-summary.md, docs/todo13.md
順位256(Tier5)の follow-up タスクを todo-summary.md に追加し、todo13.md に強化版 classify.txt 作成と再測定の作業計画・完了基準を記載。

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed WP-04 の classifier モデル格上げを実測評価して見送りにした内容を適切に要約しており、変更内容と一致しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wp04-classifier-upgrade

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@aloekun
aloekun merged commit 757754a into master Jul 4, 2026
1 check passed
@aloekun
aloekun deleted the wp04-classifier-upgrade branch July 4, 2026 17:58
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