prompt-ab-eval
Skill0 starsChanged 4 months agoMITView on GitHub
プロンプト A/B の 2 スコアセットを同一 eval で採点し、勝者とマージンを決定論的に判定する(自己申告禁止・原則 P1)。トリガー語彙: プロンプト AB, A/B 評価, ab-eval, 勝率マージン, プロンプト比較, 勝者判定, prompt ab eval
In this repository46 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- a11y-standardsSkill
- a11y-static-gateSkill
- adversarial-refute-voteSkill
- antigravity-buildSkill
- architecture-parity-gateSkill
- ci-required-check-installerSkill
- codex-buildSkill
- codex-imagegenSkill
- codex-spark-delegateSkill
- commit-convention-gateSkill
- commit-msg-quality-scoreSkill
- consumer-finding-ledgerSkill
- context-bloat-trackerSkill
- coverage-floor-lockSkill
- destructive-env-guardSkill
- dev-standardsSkill
- eval-dataset-buildSkill
- eval-regression-guardSkill
- fanout-verify-synthSkill
- gate-forgeSkill
- hallucination-rate-meterSkill
- harness-kpi-ledgerSkill
- judge-rubric-voteSkill
- knowledge-citation-coverageSkill
- knowledge-dedup-scanSkill
- knowledge-index-guardSkill
- live-state-verify-guardSkill
- maker-checker-relaySkill
- memory-distillSkill
- mistake-rule-distillSkill
- oneshotSkill
- report-shapeSkill
- retry-failure-classifierSkill
- review-finding-reproSkill
- rule-dedup-scanSkill
- rule-promote-auditSkill
- rule-promotion-extractSkill
- secret-scan-hardeningSkill
- self-heal-ciSkill
- session-length-compact-auditSkill
- startSkill
- subagent-usage-analyzerSkill
- task-success-rate-trackSkill
- token-codegen-gateSkill
- trigger-vocab-dedupSkill
The file
Files
prompt-ab-eval — プロンプト A/B の決定論勝者判定
プロンプト(or モデル設定)A と B を 同一 eval に通して得た 2 つのスコアセットを比較し、 「どちらが勝ちか」「差はマージンを超える決定的な差か」を機械的に判定する。 LLM を呼ばず、入力から決定論的に算出する(同じ入力 → 同じ出力)。 原則 P1「自己申告禁止」の評価側実装。「A の方が良い気がする」で採用しない。
目的
- 勝敗の恣意判定を排除する — A/B 各々を同じ採点系(citation-coverage / style-score / judge-vote 等の別 eval)で採点した数値スコア列を入力に取り、平均差
diff = |mean_a − mean_b|を計算する。 - マージンゲートで「誤差レベルの差」を勝ちと呼ばせない —
diff >= marginを満たした時のみwinnerを確定(pass)。満たさなければtieとしてfail(採用不可)。 - ノイズ由来の僅差を「改善」と誤認するプロンプト沼を防ぐ。
入力
- A/B それぞれ、数値スコアを含む JSON ファイル(例:
[0.60, 0.62, 0.58]、または各要素にスコアを持つ dict のリスト)。 同一 eval を N 試行走らせた結果のスコア列を渡す想定。 --margin(既定 0.05)= 決定的とみなす最小平均差。
実行手順
- 比較する 2 プロンプト(A/B)を 同じ eval・同じデータセットで走らせ、スコア列を
a.json/b.jsonに保存する(採点は本ツールでなく既存の採点系や judge-vote を使う)。 勝者・マージンを判定する:
python3 scripts/eval-harness.py ab-eval --a a.json --b b.json --margin 0.1 [--json]- 出力の解釈:
status=pass+winner=a|b→ 決定的な勝者。そのプロンプトを採用してよい。status=fail+winner=tie→ マージン内の僅差。採用しない(追加試行 or margin 再検討)。status=observe→ A/B に数値スコアが無い・ファイル読めず。判定不能(データ不足として扱う)。metrics:mean_a/mean_b/diff/n_a/n_bを確認し、試行数 N が十分かも見る。
- 採用判断・数値(勝者・diff・margin)を standup またはレビューに記録する。
決定論ゲート(--check 相当・自己申告禁止)
このスキルが「本物として動く」ことは以下 1 コマンドで機械確認する(hermetic・実源に触れない):
python3 scripts/eval-harness.py ab-eval --self-test- exit 0 = OK。
[PASS] ab-eval: good=True bad=True obs=Trueを出力。good= 明確な差でpassかつwinner=bbad= 同値ならfail(tie)obs= スコア源欠如でobserve
- exit 1 = 実装退行。engine(
scripts/eval-harness.py)側を修正する。
参照
- エンジン:
scripts/eval-harness.py(サブコマンドab-eval=compute_ab_eval/ self-test =st_ab_eval) - 全サブ一括自己テスト:
python3 scripts/eval-harness.py --self-test - 設計原則(observe/measured/gate・自己申告禁止):
scripts/eval-harness.py冒頭コメント・原則 P1 - 関連 eval スキル:
judge-rubric-vote(合議採点)/eval-regression-guard(baseline 回帰)/eval-dataset-build(golden dataset)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

