Repository navigation
feat: wire --pool / topk_retrieve override through brain_ask and run_ablation (#92) - #97
Open
Jason-Vaughan wants to merge 1 commit into
Open
Jason-Vaughan wants to merge 1 commit into
Jason-Vaughan wants to merge 1 commit into
Conversation
…and run_ablation (tonydzi#92)
Owner
|
Mycroft here (synthetic AI co-founder, disclosed on purpose so you do not have to play detective). Logged your pull request ("feat: wire --pool / topk_retrieve override through brain_ask and run_ablation (#92)") after 1 h of silence, which is on us. What a machine can already tell: 5 file(s) touched, +142/-21, CI green. A human from the lab reads it within 48 hours, as CONTRIBUTING.md promises; if that clock runs out, ping the thread, it is not rude. — TonyDzi / Palo Alto AI Research Lab · this repo is one shelf of a bigger workshop (second brain, agent-fleet consensus, verification gates): github.com/tonydzi |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1 for #92 (per #92 (comment)): wires
--pool/--topk-retrieve(andBRAIN_TOPK_RETRIEVE) throughbrain_ask.pyandeval/run_ablation.pywithout changingTOPK_RETRIEVE = 60default, with before/after tables on bothbench/vault(202 notes) and a 3x larger synthetic vault (606 notes) below.Summary
src/sqlite_graph_memory/brain_ask.py:_parse_pool(args, env=None)supporting--pool N,--pool=N,--topk-retrieve N,--topk-retrieve=N, andBRAIN_TOPK_RETRIEVE=N(while keepingTOPK_RETRIEVE = 60untouched as the default).topk=poolintoretrieve_candidates(sims, meta, topk=pool)inmain().eval/run_ablation.py:--pool/--topk-retrieveCLI flag (topk_retrieveparameter on_default_cell,_fill_cell, andparse_grid) to override the default dense pool size for any grid cell that does not explicitly pintopk=....topk-15(topk: ba.GHOPS) toDEFAULT_GRIDalongsidetopk-20andtopk-80.tests/test_brain_ask.py&tests/test_eval.py:test_parse_pool_flag_and_env_override_without_changing_defaultandtest_pool_override_wires_topk_retrieve_without_changing_default.1. Default
TOPK_RETRIEVE = 60Before vs. After (Zero Regression ongold_202_seed42.jsonl)Because
TOPK_RETRIEVE = 60remains the default when--poolis omitted, before/after metrics on the frozengold_202_seed42.jsonl(n=100,--seed 42) are bit-identical (0.000delta across every class):2. Measured
brain_ask.py --ab --pool 15Delta (bench/vault)3.
--poolTables Across Two Vaults (--seed 42)Commands & Reproducibility (Including 606-Note Vault Generator)
Vault 1:
bench/vault(202notes,n=100gold questions,--seed 42)--pool 60(Current Default)--pool 20--pool 15(GHOPS=15)Vault 2: 3x Synthetic Vault (
606notes,n=120gold questions,--seed 42)--pool 60(Current Default)--pool 20--pool 15(GHOPS=15)Takeaway
Both vaults show the same pattern:
bridgequeries, narrowing--poolfrom60to20or15raises 1-hopbridgeRecall@12 from0.066 -> 0.141 / 0.179on Vault 1 (202notes) and0.041 -> 0.072 / 0.089on Vault 2 (606notes), and lifts overallnDCG@12from0.652 -> 0.664 / 0.671(Vault 1) and0.500 -> 0.505 / 0.507(Vault 2).606notes), vector-onlybodynDCG@12improves under--pool 15(0.706 -> 0.725), while adding401-hop graph neighbors (gmax=40) on top of a15-note dense pool (graph-pool15vsvec-pool15) pullsbodyback down by-0.021(0.725 -> 0.704, identical tograph-pool60's0.704). KeepingTOPK_RETRIEVE = 60as the default while exposing--poollets callers and ablations tunetopkalongsidegmax.Verification
EVAL_MUTANT=1 pytest -q tests/test_eval.py:3 failed(red-first ruler intact)pytest -q:268 passed, 2 skippedTestamentaudit:request_id: d581eec6367240079363b14efad053cb(status: passed,268 passed, 2 skipped)— TangleClaw'd by Jason Vaughan
Human-directed. Agent-executed. Evidence-backed.
TangleClaw.com