Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ Soft-start feedback reinforcementは、`soft_start_feedback_reinforcement=True`

local database上の比較は、[Soft-start snapshot evaluation](docs/soft-start-snapshot-evaluation.md)でtransaction-consistent private snapshot、固定4 arm、result-free manifest、one-time development、conditional holdout、privacy / mutation / rank hard gateとして分離しています。評価はsnapshotのfresh cloneだけを変更し、source database、live config、snapshot本体、private本文をpublic artifactへ含めません。支持結果も固定local snapshot上のcutover候補に限定し、このissue内でconfigやdefaultを変更しません。

v1 developmentはsnapshot既存evidenceによりq3/s1がfresh `used_2`で発火し、空baseline由来の`used_3`を固定したboundary gateだけが不合格となりました。この不支持resultを変更せず、[Baseline-aware soft-start snapshot evaluation](docs/baseline-aware-soft-start-snapshot-evaluation.md)はfresh snapshotと別caseを使い、initial evidence stateからq3 first mutationを導出します。baseline不一致やcapacity不足ではregistered resultを作りません。v2はregistered output不在のfreeze-only PRとして固定し、squash merge後の別Issueでdevelopmentを一度だけ実行して、全gate通過時だけholdoutを一度開きます。

後続の feedback policy comparison に使う public source は、[feedback-policy-comparison-v1](corpora/feedback-policy-comparison-v1/README.md) に corpus-only で固定しています。development / holdout 各二 cluster の明示 link topology、source-only manifest、raw SHA-256、LF 改行規則、provenance、既存 fixture との identity contamination audit だけを含み、評価の選択入力と観測物は含めません。この source merge commit を後続の別 issue が唯一の入力として扱います。

この corpus を使う `used + q3 + sibling normalization 1.0` と `confirmed + decay 0.5 + sibling normalization 1.0` の比較は、[Feedback policy comparison evaluation](docs/feedback-policy-comparison-evaluation.md) に result-free protocol、one-time development、conditional holdout、exclusive observed result、再計算可能な hard gate を固定しています。controlled result は default adoption や production quality を意味しません。
Expand Down
2 changes: 1 addition & 1 deletion docs/Decision-Structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
| [longitudinal-feedback-adaptation](https://github.com/Liplus-Project/neuron-graph-rag/wiki/longitudinal-feedback-adaptation) | active | longitudinal feedback-adaptation は、repository-native controlled corpus v3 の相互に独立した cluster と、その source 文書に明記した 0、1、3、10 credit ceiling を用いる。corpus phase は query、gold、schedule、runner、gate、manifest、result、既定値を定義・変更しない。 |
| [single-corpus-real-feedback-validation](https://github.com/Liplus-Project/neuron-graph-rag/wiki/single-corpus-real-feedback-validation) | superseded | [repository-native-controlled-corpus](https://github.com/Liplus-Project/neuron-graph-rag/wiki/repository-native-controlled-corpus) がこの node を supersede する。以後の evaluation は、NGR repository に公開する固定 SHA の controlled corpus を source とし、D1 single-corpus experiment は capacity が増えるまで waiting とする。 |
| [repository-native-controlled-corpus](https://github.com/Liplus-Project/neuron-graph-rag/wiki/repository-native-controlled-corpus) | active | repository-native controlled corpus v2 は、固定 SHA の公開 documentation と本文中の明示的な同一 directory 相対 link だけから、node、doc path、source URL、credited edge identity が相互に分離した development / holdout の各 3-edge path を導出する。v1 は provenance として保持する。これは controlled benchmark であり、外部 corpus への一般化、評価 query、gold、result、既定値変更を含まない。 |
| [soft-start-feedback-reinforcement](https://github.com/Liplus-Project/neuron-graph-rag/wiki/soft-start-feedback-reinforcement) | active | 最初の credited `used` に通常 bounded update の小さな provisional fractionを適用し、最初の独立 `confirmed` が remainder、後続 confirmation が geometric decayを適用する。transaction-consistent private snapshotの固定4 arm評価はdevelopment全hard gate通過時だけholdoutを一度開き、結果をlocal cutover候補に限定してsource database、live config、defaultを変更しない。 |
| [soft-start-feedback-reinforcement](https://github.com/Liplus-Project/neuron-graph-rag/wiki/soft-start-feedback-reinforcement) | active | 最初の credited `used` に通常 bounded updateの小さなprovisional fractionを適用し、最初の独立`confirmed`がremainder、後続confirmationがgeometric decayを適用する。v1 snapshot評価の不支持を保持し、baseline-aware successorはfresh initial evidenceからq3 first mutationを導出する。v2 freeze-only PRとsquash後のobserved registrationを分離し、development全gate通過時だけholdoutを一度開く。source database、live config、defaultを変更しない。 |
| [github-rag-mcp-replacement-compatibility](https://github.com/Liplus-Project/neuron-graph-rag/wiki/github-rag-mcp-replacement-compatibility) | active | public GitHub repository一つのread-only snapshotをNGR local indexへ接続する。github-rag-mcp `search` の保存済み raw capture と source URL、根拠を比較する。共有 source identity を確認しても最小 doc 検索 path の候補に限り、production github-rag-mcp、MCP authentication / transport、remote deployment、default変更は含まない。 |

## Entry format
Expand Down
73 changes: 73 additions & 0 deletions docs/baseline-aware-soft-start-snapshot-evaluation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Baseline-aware soft-start snapshot evaluation

## 目的とsuccessor境界

snapshot comparison v1はdevelopment 7 hard gate中6件を通過したが、`policy-boundaries`を満たさずholdoutを開かなかった。対象edgeがinitial evidence count `1`を持ち、q3/s1がfresh `used_2`でquorum `3`へ到達した一方、v1 gateは空baselineからの`used_3`発火を固定していた。この不支持result、protocol、gate、解釈、private snapshotは凍結したまま保持する。

v2はminor tweakやv1再実行ではない。`baseline_aware_soft_start_snapshot_v2` namespace、fresh transaction-consistent private snapshot、新規fixture / manifest / outputを使う。v1 private snapshotとobserved resultを入力にせず、developmentのcredited edge identityもv1 observed developmentから分離する。

## Baseline contractとcapacity

confirmed / corrected relation caseごとに、snapshot上のcredited edgeについて次を結果前に登録する。

- weight
- reinforced count
- relation feedback evidence count
- confirmation count

q3/s1のexpected first mutation eventは次の式だけで導出する。

`max(1, relation_feedback_evidence_quorum - registered_initial_evidence_count)`

event budgetはfresh trace 4回である。derived first mutationはfinal eventより前に発生し、少なくとも一回の後続fresh evidence activationも観測できなければならない。snapshot actual stateと登録baselineの不一致、式との不一致、capacity不足、selected credited path不一致はresult-free preflight failureである。この場合はregistered resultを作らず、failure reportをIssueへ保存して停止する。

## 固定armとschedule

同じfresh snapshotの別cloneへ次の4 armを適用する。

1. `control`: audit-only。
2. `used_q3_s1`: evidence quorum `3`、sibling normalization `1.0`。
3. `confirmed_r05_s1`: confirmed-only、decay `0.5`、sibling normalization `1.0`。
4. `soft_start_r025_r05_s1`: provisional ratio `0.25`、decay `0.5`、sibling normalization `1.0`。

各caseはbaseline後に、fresh traceで`used_n`、同じtraceに対する`outcome_n`を`n=1..4`の順に実行する。armごとにfresh clone replayを行い、runtime identityを除くsemantic payload一致を要求する。

## Result-freeとprivacy

source databaseはSQLite URI `mode=ro`と`query_only`で開き、backup APIでprivate destinationへ一度だけ複製する。source containerの前後SHA-256一致とsnapshot `integrity_check`を要求し、arm / replayはsnapshot cloneだけを変更する。

public artifactはsource locator、capture timestamp、container / snapshot / schema hash、table name、選択row count、public node / edge identifier、query、baseline数値だけを持つ。snapshot本体、node本文、credential、absolute private pathを含めない。writerはexclusive createし、registered resultの上書き、再実行、再集計を拒否する。

v1のresult-free commitとobserved commitはmainへのsquash mergeで一つのcommitになり得るため、mainのmanifest初回追加commitだけからpre-observation development output不在を推論しない。これは履歴上証明できなくなった事実だけを弱める境界変更である。v1 verifierは同commitのhistorical protocol blob hash、既存result-free audit literal、同commitに含まれるdevelopment outputを既存exclusive result verifierで検証し、未開封holdoutの不在を引き続き明示検証する。v1 protocol、gate、result、audit、manifestのbytes自体は変更しない。

## Hard gate

1. snapshot / protocol / case / privacy / baseline / receipt / idempotency / semantic replay / exclusive output integrity。
2. initial evidenceから導出したq3 first mutationと実測の一致、quorum前不変、後続fresh evidence発火。
3. confirmed-onlyのused時不変、独立confirmedごとの`1.0, 0.5, 0.25, 0.125` decay。
4. soft-start first used provisional、first confirmed remainder、後続fixed decay。
5. soft-startのlearning latency先行と最終q3/s1 relation quality non-regression。
6. corrected cohortのprovisional cost上限、自動negative reinforcement / rollbackなし。
7. lexical、zero-hop、direct、reverse、unrelated controlのrank / mutation safety。
8. credited edgeとconfirmation時same-source siblingだけへのmutation、source snapshot不変、fresh-clone replay。

このIssueはprotocol、fixture、runner、verifier、tests、docsをregistered output不在のresult-free stateで固定するfreeze-only phaseである。developmentとholdoutは実行せず、squash merge後に別Issueの新規registration commitを使ってdevelopmentを一度だけ実行する。その全8 gate pass時だけholdoutを一度開く。不支持または判定不能を保存してもquery、ratio、case、schedule、metric、gateを変更しない。このphase分離により、freeze commitのoutput不在と後続observed commitをmain history上で別々に検証可能にする。

## 解釈境界

development不支持または判定不能ではholdoutを開かずlocal cutoverを支持しない。holdoutまで全gate passしても、支持範囲は固定local snapshot上のcandidateに限定する。このIssue内ではsource database、live config、library defaultを変更しない。

```bash
python tools/run_baseline_aware_soft_start_snapshot_evaluation.py --probe --snapshot "$SNAPSHOT"
python tools/run_baseline_aware_soft_start_snapshot_evaluation.py --stage development --snapshot "$SNAPSHOT"
python tools/run_baseline_aware_soft_start_snapshot_evaluation.py --verify development
```

## 関連

- [Requirements](requirements.md)
- [Soft-start snapshot evaluation v1](soft-start-snapshot-evaluation.md)
- [Confirmed-outcome feedback reinforcement](confirmed-outcome-feedback-reinforcement.md)
- [Historical source verification](historical-source-verification.md)
- [Decision Structure](Decision-Structure.md)
- [Issue #106](https://github.com/Liplus-Project/neuron-graph-rag/issues/106)
2 changes: 2 additions & 0 deletions docs/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
82. frozen evaluation の historical source hash は、manifest path の初回追加 commit または manifest が明示する lowercase full 40-hex source / baseline / prior commit の exact blob bytes に対して検証する。後続の committed manifest rewrite、mutable ref / revision expression、未知 commit、非 ancestor commit、manifest bytes差、欠落 path、hash 不一致を fail closed にし、同名 path の current working tree を過去の evidence として扱わない。既存 protocol が明記する raw-first LF / CRLF whole-file alternate だけを維持し、本文差、mixed newline、bare CR、その他の byte 差を拒否する。
83. soft-start feedback reinforcement は明示 opt-in の relation-only candidate とし、最初の新規 `used` で通常 bounded increment の固定 ratio 分だけを credited path へ適用する。最初の独立 `confirmed` は同じ schedule の残量を一回分の通常 increment まで補い、後続 confirmation は固定 decay ratio で加算する。used 時は sibling normalization を行わず、confirmation の actual delta だけを同一 source の uncredited sibling へ配分する。duplicate、lexical、zero-hop、別 source、uncredited edge、negative outcome は変更せず、candidate mechanics の合格だけで default や local serving policy を変更しない。
84. soft-start snapshot evaluation は、local source database を read-only URI と SQLite backup API で一度だけ transaction-consistent snapshot へ複製し、同じ snapshot のfresh clone上で `control`、`used_q3_s1`、`confirmed_r05_s1`、`soft_start_r025_r05_s1` の固定4 armを比較する。query、public node / edge identifier、outcome、3回のfresh trace schedule、checkpoint、metric、hard gate、exclusive output、snapshot / protocol hashを登録result生成前に固定する。source database、live config、snapshot本体、private本文、absolute private pathをpublic artifactへ含めず、developmentを一度だけ実行し、全hard gate通過時だけholdoutを一度開く。不支持または判定不能を保存してもprotocolを調整せず、local cutover、library default、external corpus、production qualityへ自動で一般化しない。
85. baseline-aware soft-start snapshot evaluation は、v1のprotocol、gate、observed result、private snapshotを変更、再実行、再集計、入力再利用せず、fresh snapshot、新規namespace、新規output、v1 observed developmentと異なるcredited edge identityを使う。各relation caseのinitial weight、reinforced count、evidence count、confirmation countを結果前に登録し、q3/s1のfirst mutationを`max(1, quorum - initial evidence count)`で導出する。導出不能、baseline不一致、event budget内のquorum capacity不足はregistered resultを作らずfailure reportで停止する。v2 protocolはregistered output不在のfreeze-only PRで固定し、そのsquash merge後の別Issueでdevelopmentを一度だけ実行する。全8 hard gate通過時だけholdoutを一度開き、支持結果もlocal cutover候補に限定してsource database、live config、library defaultを変更しない。
75. v3 implementation、prompt、manifest、query override、schema、集約、path audit、hash規則、gate、stop rule、testsをresult-free commitでpushした後、development stage / 4 case packet / 12 responses / resultを各一度だけ生成する。
76. development全12 gate通過時だけholdout stageを一度生成し、異なるfresh 12 judgesで同じgateを評価する。packet、response、resultの上書き、観測後の規則変更、実LLM品質値のCI再生成を拒否する。

Expand Down Expand Up @@ -138,3 +139,4 @@
- [Historical source verification](historical-source-verification.md) が frozen manifest path の初回追加 commit、明示 full source commit ID、exact blob、ancestor、path、newline portability、fail-closed 境界を定義する。
- [Confirmed-outcome feedback reinforcement](confirmed-outcome-feedback-reinforcement.md) が confirmed-only と soft-start の明示 policy、永続 schedule、transaction、receipt、default-preserving boundary を定義する。
- [Soft-start snapshot evaluation](soft-start-snapshot-evaluation.md) が transaction-consistent private snapshot、固定4 arm、result-free freeze、privacy、one-time development、conditional holdout、local cutover境界を定義する。
- [Baseline-aware soft-start snapshot evaluation](baseline-aware-soft-start-snapshot-evaluation.md) がfresh baseline stateからのq3 boundary導出、v1 evidence isolation、capacity preflight、新規one-time result境界を定義する。
Loading