Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
docs(eval): P3 E2 and E4 runners, dev results and sealed specs in the preregistration
garrytan242ad3006b41
diff --git a/docs/eval/decisions/p3-retrieval-feedback/PREREGISTRATION.md b/docs/eval/decisions/p3-retrieval-feedback/PREREGISTRATION.mdindex c808313321..97cd9f76e4 100644--- a/docs/eval/decisions/p3-retrieval-feedback/PREREGISTRATION.md+++ b/docs/eval/decisions/p3-retrieval-feedback/PREREGISTRATION.md@@ -45,19 +45,27 @@ freeze, score sealed; (b) online predict-then-update over the whole stream, metrRecall@5. The cold-start subgroup (sealed questions whose gold pages never appeared as gold in a training answer) isreported separately.-**E2. Feedback from the implicit citation signal only.** LoCoMo: `think` on dev questions drives the `cited` signal;-frozen and online arms; full density and a 25% subsampled sparse arm. Sealed: `think` in both arms, judge mean of 10-repetitions ± SD (P0 judge) plus judge-free Recall@5 of the gather. Reported: implicit events per 100 answers.-The `think` model is the frozen build's default.+**E2. Feedback from the implicit citation signal only.** LoCoMo, runner `feedback-think-replay.ts`: every answer goes+through the `think` operation, so the pages its synthesis cites feed the ranking. Questions inside the sealed+conversations split into train and score halves by sha256(seed 42, id); per conversation the first 50 train and 40+score questions in that order. Arms: off (influence 0, answers still recorded), frozen (learn on the train half, score+with `feedback.learn=false`), sparse (frozen on a seeded 25% of the train half), online (one seeded stream, metrics on+score questions only). One `think` answer per score question per arm (model `anthropic:claude-sonnet-5-5`, the+newest Sonnet), judged 10 times with P0's LoCoMo prompts (`openai:gpt-4o-2024-08-06`, temperature 0.7); reported:+judge mean ± SD across replicates, gather Recall@5, cited events per 100 answers, adversarial abstention and trap+repeats. The judge gates use the cluster bootstrap over the 7 conversations.**E3. No-regression guards.** LongMemEval-S: retrieval lists identical between baseline and feedback arms (noratings exist, so the stage must be a no-op). LongMemEval-S has no sealed portion (P0 split), so this part is decidedon the full 500-question dev run, decision `p3-e3-lmes-full-dev`. NamedThingBench core + relational with weights trained on world-v1dev: 0 hit@1 losses. p50/p95 read latency deltas.-**E4. Triplet scoring.** E4a (wider relational fetch only) and E4b (wider fetch + triplet scoring) against baseline on-relational-paraphrase-v1, NamedThingBench relational and a constrained-relational set over world-v1. Precondition:-the relational arm fires on at least 80% of E4 questions. Metrics: NDCG@10 and hit@3.+**E4. Triplet scoring.** `search.triplet_scoring=true` (wider relational fetch plus path scoring, penalty 3.0) against+off, on the `constrained-relational` category: seeded worlds whose questions name one seed, one relation and one+attribute constraint, so a seed has 8 to 14 relational neighbors and 1 to 4 are gold. The custodian renders the held-out+worlds from held-out phrasing and seeds (`--phrasing-file`, access-logged); the implementer has seen only phrasing A and+dev seeds 11 and 13. Guards: world-v1 relational sealed half and NamedThingBench relational. Precondition: the+relational arm fires on at least 80% of the constrained questions. Metrics: NDCG@10 (primary), hit@1, hit@3.Default decisions (the per-corpus E1 reading and the fixed λ were approved on 2026-10-04, before any sealed data was opened):@@ -69,25 +77,26 @@ Default decisions (the per-corpus E1 reading and the fixed λ were approved on 2LoCoMo fails, feedback ships with `feedback.enabled=false` (opt-in, explicit ratings only, `feedback.implicit=false`).- If E1 passes but E2 does not: ship with `feedback.enabled=false` as above.- If E1 fails on both corpora: the feedback subsystem leaves the pull request.-- **Triplet scoring ON** iff E4b sealed NDCG@10 +2.0 points or more with CI excluding 0 and 0 hit@1 losses on the- plain relational sets; E4a ships alone if it alone passes the same bar. Otherwise `search.triplet_scoring` stays off.- The wider fetch only runs with triplet scoring on, so E4a is not a separate arm in this build. Dev evidence below- shows no effect on the world-v1 relational dev half and a 48% fire rate, below the 80% precondition, and the- constrained-relational set does not exist; unless that set is built, no sealed E4 run is requested and- `search.triplet_scoring` stays off.+- **Triplet scoring ON** iff sealed constrained-relational NDCG@10 improves by +2.0 points or more with CI excluding+ 0 (cluster bootstrap over held-out seeds and templates) and the guards show 0 hit@1 losses. Otherwise the setting+ is removed from the pull request. The wider fetch only runs with triplet scoring on, so the plan's E4a is not a+ separate arm.- Declared single-value relations (plan E5) are not part of this pull request.-Budget caps: E1 $16, E2 $180, E3 $20, E4 $12 (plan total cap $260, which also covered the dropped E5).+Budget caps: E1 $16, E2 $180 (dev spent $23.65; the sealed run as specified is estimated at about $130), E3 $20, E4 $12+(plan total cap $260, which also covered the dropped E5).## Harness requirements- E1: `eval/runner/feedback-replay-locomo.ts` and `eval/runner/feedback-replay-world.ts` (gbrain-evals`p0-heldout-harness`), custodian mode `--split sealed --decision-id <id> --purpose <text>` with the access log.-- E2: not available yet. The memory-qa `think` lane calls `runThink` directly, so no answer is recorded and no- citation signal accrues; E2 needs `think` through the `think` operation (trusted local context) in a seeded- stream, scored with `feedback.learn=false`, judge 10x.+- E2: `eval/runner/feedback-think-replay.ts` (gbrain-evals branch `p3-e2-e4-feedback-evals`), custodian mode+ `--split sealed --decision-id <id> --purpose <text>`; sealed flags `--train-limit 50 --score-limit 40 --judge-runs 10+ --lambda 0.1`.- E3: the P0 kit (`eval:decide`), LongMemEval-S as above; NamedThingBench through its committed script.-- E4: per-arm search pins (`GBRAIN_EVAL_SEARCH_PINS`) cover `search.triplet_scoring`; see the E4 note above.+- E4: `eval/runner/constrained-relational.ts` (same branch) with `GBRAIN_EVAL_SEARCH_PINS=search.triplet_scoring=true`+ on the candidate arm; custodian mode `--phrasing-file <custody path> --seeds <held-out seeds> --decision-id <id>+ --purpose <text>`.## Dev evidence@@ -118,6 +127,19 @@ shows 0, so the swaps came from cache warm-up, not from the feature.ratings): identical retrieval lists on all 500 questions (strict Recall@5 0.9277 on both arms), mean read latency+0.6 ms [−0.3, 1.3], p95 74.8 ms against 73.3 ms. Cost $6.15. This settles the LongMemEval-S part of E3.+**E2 dev (implicit citations, LoCoMo dev conversations, 25 train and 20 score questions each, judge 3x, build+`23d2597e2`, cost $23.65).** Judge mean against off (0.783): frozen +0.0 [−4.4, 5.0] points, sparse −2.2 [−9.4, 6.7],+online −1.7 [−6.7, 2.2]; judge SD across replicates 0.014. Gather Recall@5 is 0.739 in every arm: at λ = 0.1 the+citation signal (rating 4, half learning rate) moves a cited page's multiplier by under 1%, too little to change which+pages `think` gathers, so the judge differences are answer-sampling noise. Cited events: 369 to 416 per 100 answers.+Summary: [`dev/think-replay-locomo-dev.json`](dev/think-replay-locomo-dev.json).++**E4 dev (constrained-relational, seeds 11 and 13, 142 questions, build `23d2597e2`).** The relational arm fires on+100% of questions. Triplet scoring on against off: NDCG@10 +1.94 points [0.87, 3.14] (0.738 → 0.758), hit@1 0.669 →+0.711 with 6 wins and 0 losses. By template: who-at-topic +2.7 (off 0.960, near ceiling), portfolio-by-sector +1.3+(off 0.909), attendees-by-role +1.4 (off 0.105: the attendees reach the relational arm but text rows outrank them).+Summary: [`dev/triplet-constrained-relational-dev.json`](dev/triplet-constrained-relational-dev.json).+**E4-shaped triplet probe on the world-v1 relational dev half** (146 template + paraphrase questions, one sharedindex, build `70ad30e4e`, cost $0.02): with `search.triplet_scoring` on at penalties 1, 3 and 6, ΔNDCG@10 is −0.05points [−0.23, 0.06] at every penalty, hit@3 is unchanged (0.692) and there are 0 hit@1 losses or wins. Thediff --git a/docs/eval/decisions/p3-retrieval-feedback/dev/think-replay-locomo-dev.json b/docs/eval/decisions/p3-retrieval-feedback/dev/think-replay-locomo-dev.jsonnew file mode 100644index 0000000000..87de71ae6c--- /dev/null+++ b/docs/eval/decisions/p3-retrieval-feedback/dev/think-replay-locomo-dev.json@@ -0,0 +1,128 @@+{+ "plan": "P3 E2",+ "benchmark": "locomo",+ "split": "dev",+ "product": {+ "package": "gbrain",+ "declared_pin": "github:garrytan/gbrain#739e5cc89ca43b9b9351f0f203c7b12a7c0c571c",+ "declared_sha": "739e5cc89ca43b9b9351f0f203c7b12a7c0c571c",+ "version": "0.60.48.0",+ "package_sha256": "44c3773101d390d859af380747dfa4335f06f60ba1e61b9300ffd10a63c03f9d",+ "loaded_git_head": "23d2597e215c93acf23a08f16cb63ad8379f9d40"+ },+ "seed": 42,+ "lambda": 0.1,+ "think_model": "anthropic:claude-sonnet-5-5",+ "judge": {+ "model": "openai:gpt-4o-2024-08-06",+ "runs": 3,+ "temperature": 0.7+ },+ "limits": {+ "train": 25,+ "score": 20+ },+ "conversations": [+ {+ "id": "conv-44",+ "train": 25,+ "score": 20+ },+ {+ "id": "conv-47",+ "train": 25,+ "score": 20+ },+ {+ "id": "conv-48",+ "train": 25,+ "score": 20+ }+ ],+ "cost": {+ "usd": 23.65+ },+ "arms": {+ "off": {+ "n": 60,+ "errors": 0,+ "judge_mean": 0.7833,+ "judge_sd_across_replicates": 0.0136,+ "delta_vs_off": 0,+ "delta_ci95_question_bootstrap": null,+ "by_conversation": {+ "conv-44": 0.7167,+ "conv-47": 0.9,+ "conv-48": 0.7333+ },+ "answerable_judge_mean": 0.7391,+ "adversarial_abstention_mean": 0.9286,+ "trap_repeat_rate": 0.4286,+ "gather_recall_at_5": 0.7391,+ "implicit_cited_events_per_100_answers": 0+ },+ "frozen": {+ "n": 60,+ "errors": 0,+ "judge_mean": 0.7833,+ "judge_sd_across_replicates": 0.0136,+ "delta_vs_off": 0,+ "delta_ci95_question_bootstrap": [+ -0.0444,+ 0.05+ ],+ "by_conversation": {+ "conv-44": 0.75,+ "conv-47": 0.85,+ "conv-48": 0.75+ },+ "answerable_judge_mean": 0.7609,+ "adversarial_abstention_mean": 0.8571,+ "trap_repeat_rate": 0.4286,+ "gather_recall_at_5": 0.7391,+ "implicit_cited_events_per_100_answers": 369.33+ },+ "sparse": {+ "n": 60,+ "errors": 0,+ "judge_mean": 0.7611,+ "judge_sd_across_replicates": 0.0157,+ "delta_vs_off": -0.0222,+ "delta_ci95_question_bootstrap": [+ -0.0944,+ 0.0667+ ],+ "by_conversation": {+ "conv-44": 0.7,+ "conv-47": 0.8833,+ "conv-48": 0.7+ },+ "answerable_judge_mean": 0.7101,+ "adversarial_abstention_mean": 0.9286,+ "trap_repeat_rate": 0.5,+ "gather_recall_at_5": 0.7391,+ "implicit_cited_events_per_100_answers": 415.79+ },+ "online": {+ "n": 60,+ "errors": 0,+ "judge_mean": 0.7667,+ "judge_sd_across_replicates": 0,+ "delta_vs_off": -0.0167,+ "delta_ci95_question_bootstrap": [+ -0.0667,+ 0.0222+ ],+ "by_conversation": {+ "conv-44": 0.7167,+ "conv-47": 0.9,+ "conv-48": 0.6833+ },+ "answerable_judge_mean": 0.7174,+ "adversarial_abstention_mean": 0.9286,+ "trap_repeat_rate": 0.4286,+ "gather_recall_at_5": 0.7391,+ "implicit_cited_events_per_100_answers": 380+ }+ }+}diff --git a/docs/eval/decisions/p3-retrieval-feedback/dev/triplet-constrained-relational-dev.json b/docs/eval/decisions/p3-retrieval-feedback/dev/triplet-constrained-relational-dev.jsonnew file mode 100644index 0000000000..75f948849e--- /dev/null+++ b/docs/eval/decisions/p3-retrieval-feedback/dev/triplet-constrained-relational-dev.json@@ -0,0 +1,39 @@+{+ "benchmark": "constrained-relational dev seeds 11 and 13 (phrasing A)",+ "gbrain": "23d2597e2",+ "arms": {+ "off": "search.triplet_scoring=false",+ "on": "search.triplet_scoring=true, penalty 3.0"+ },+ "n": 142,+ "fire_rate": 1.0,+ "off": {+ "ndcg_at_10": 0.7383,+ "hit_at_1": 0.669,+ "hit_at_3": 0.7535,+ "recall_all_at_5": 0.7324+ },+ "on": {+ "ndcg_at_10": 0.7577,+ "hit_at_1": 0.7113,+ "hit_at_3": 0.7465,+ "recall_all_at_5": 0.7535+ },+ "delta_ndcg_points": 1.94,+ "ci95_question_bootstrap_points": [+ 0.87,+ 3.14+ ],+ "hit_at_1_losses": 0,+ "hit_at_1_wins": 6,+ "by_template_delta_ndcg_points": {+ "who_at_topic": 2.73,+ "portfolio_sector": 1.32,+ "attended_role": 1.44+ },+ "by_template_off_ndcg": {+ "who_at_topic": 0.9603,+ "portfolio_sector": 0.9092,+ "attended_role": 0.1052+ }+}