Repository navigation
Phase 6: the accuracy loop, with sample B and the diagnosis split - #18
Merged
Merged
Conversation
…nd document the options
rohan-hotdata
added a commit
that referenced
this pull request
Oct 14, 2026
* Close phase 6 in the roadmap and open phase 7 Phase 6 closed with PR #18. The roadmap records what it changed for later phases. The plan drops phase 6, adds the sample B baseline to its start point, and gives phase 7 the commands that phase 6 built. Phase 7 is open as issue #19. * Correct the phase 7 note: a reply that fails to parse is in the cache
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.
This PR builds the accuracy loop of phase 6. It adds a second fixed sample, a configuration for each arm, and a replay from the cache. It also adds a diagnosis that sorts each miss of the memory arm by cause. It records the baseline of both samples. It does not try to raise the score. Closes #16.
How
bench/e2e.py:--sample a|bpicks the sample. Sample B (bench/sample-b.json, seed 20261013) has 54 questions and no overlap with sample A.bench/e2e.py:Configholds the ranking of each arm,k, the budget, and the extractor variant. The options are--retrieval-ranking,--memory-ranking,--recall-k,--recall-budget, and--extractor. The result file records the configuration.bench/prompts.py:VARIANTSmaps a name to a prompt and a model.baselineis the phase 5 prompt. Phase 7 adds its variants here.bench/models.py:--replayuses anOfflinemodel that raisesCacheMisson a reply that the cache does not hold. A replay calls no model.bench/diagnose.py: reads the configuration from any result file and replays capture from the cache. It sorts each miss into not extracted, ranked below k, cut byas_ofor the budget, or recalled and missed by the reader. A second GPT-4o call splits the recalled group into "all present" and "some present". The output is a table for each question type.bench/e2e.py:--workers Ndeals the questions to N processes, and each process has its own local database. This was not in the plan. It is recorded as a decision inplan.md.bench/models.py: the OpenAI client times out after 120 s. A diagnosis run stalled for 44 minutes on one call without it.bench/diagnose.py: each diagnosis gets its own database name. A killed run left facts in a shared database, BM25 ranks over the whole table, and the next replay missed the cache.bench/e2e.py: the run reads the git commit at its start, not at its end.Why
Phase 7 to phase 11 change the extractor, the ranking, and capture. Each change needs a score on two samples, a cause for each miss, and a comparison that the runner itself does not disturb.
Results
Verification
make verify: 204 passed, 99 skipped. There are new offline tests for the sample draw,Config, the diagnosis split, theOfflinereplay, and the worker split.--replay --workers 4 --arms memoryon sample A gave the same rows in 519 s, against 2,264 s with one process.--workerson a paid run.Notes
bench/is outside the package, soCHANGELOG.mdhas no entry.src/hotmemorydoes not change.