Repository navigation
The recall bench labels a run by whether the prompt carried known, records it, and tables the two groups (#588) - #1002
Conversation
…cords it, and tables the two groups (deeplethe#588) The measurement deeplethe#588 cut 2 waits on: does leaving `known` out of the extraction prompt move the output beyond run-to-run variance. - `--known shown|empty` labels a run; the switch itself is the server's UTOPIA_EXTRACT_KNOWN_IN_PROMPT, so the label is what groups the runs. - Per document: chunks, facts, entities, entities carried across chunks, name_vector pairs proposed to the adjudicator (deeplethe#877), drops by reason, seconds from queueing to the last chunk. Knowledge-base-wide pair total by pending / merged / kept. - `--out <dir>` writes one JSON record per run; `--table <dir>` groups them by label with mean ± sd and the fact-set overlap within and across groups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jeremy Capps <jeremylwcapps@gmail.com>
15c361d to
0766764
Compare
|
Thanks @jeremycapps, and welcome! This is a careful first PR. The One thing to fix before the numbers can be trusted: Near pairs build up across runs. A small one: the DCO check is failing. Since the SQL hasn't run against a database yet, it would help to paste the table from your first real round here. Happy to merge once the pair scoping is in. |
|
Two updates to my comment above, @jeremycapps:
So the near-pair scoping is the only thing left on your side. |
… since a decision rewrites the reason Signed-off-by: Jeremy Capps <jeremylwcapps@gmail.com>
|
Thanks @WaylandYang, that's generous. Two things before you run it, both found by one real round on gemini-3.5-flash (4 SEC filings, 55 chunks, 46/52): 1. The pair count can't filter on So the bench now counts every pair proposed this round (scoped to 2. The records are snapshots taken while governance is still running. The script stops waiting when extraction ends, but alignment and governance keep adding facts and deciding pairs afterwards (552 → 565 facts on the earnings release an hour later). I'll fix that in a follow-up PR that waits for the queue to drain before scoring. If you run before it lands, running DCO is sorted, thanks for the note. |
WaylandYang
left a comment
There was a problem hiding this comment.
Approving. Thanks @jeremycapps, and thank you for running a real round before we did.
Reviewed at 4308753 (your 251a032 plus the merge of dev):
- Dropping the
name_vector|filter is right. I checked the code: governance rewritesreasontogoverned|…and a merge writessuperseded by merge, so the filter would have read about 0 after every round. Counting every pair proposed in the round, with the current reason prefixes next to it, is the honest number. - A correction to my first comment. I said pairs build up across runs. They don't on a normal run: the bench deletes the base's entities at the start of each round and the pairs go with them by cascade. I had checked the server's
extract/reprocessand missed the script's own cleanup. Thecreated_at >= queuedAtscope is still a good guard, so thanks for adding it. - The SQL matches the schema,
node --checkpasses, and CI is green.
Your second point (scoring while governance is still running) is a real gap and fine as a follow-up PR. Until it lands we'll record the settled numbers with --score into a separate directory, as you describe. A column that keeps the recall channel at insert would also be welcome as its own PR.
We'll run the six rounds and post the table on #588.
Part of #588: the measurement cut 2 waits on. Does leaving
knownout of the extraction prompt move the output beyond run-to-run variance? Bench only, no server change.What changes in
scripts/bench/recall.mjs--known shown|emptylabels a run. The switch itself isUTOPIA_EXTRACT_KNOWN_IN_PROMPT(refactor(extraction): split run_open loop into call/parse + apply helpers (#588 cut 1) #980), set when the server starts, which the bench can neither set nor read. So each group runs against a server started to match, and--outrefuses to run without a label.name_vector|pairs proposed to the adjudicator whose pieces appear in the document (Recall a mention by its name vector so a short form or another script meets its entity #877), drops by reason fromextraction_drops(includingchunk_unextracted), and seconds from queueing to the last chunk, measured on the database clock.name_vector|pair total, split into pending / merged / kept. A pair can touch two documents, so this is the number to add up.--out <dir>: one JSON record per run (commit, label, score, misses, per-document stats, pairs, the deduplicated subject/predicate/object set per document).--table <dir>: groups the records by label, with mean ± sd for each number, plus the fact-set overlap (Jaccard, averaged over documents) within each group (the run-to-run variance) and across the two groups (the effect ofknown).The pair count is there because of #877: without
known, a later chunk that names an earlier thing differently becomes a pair for the adjudicator, not a silent merge. The recall score can hold still while the pairs grow.scripts/bench/README.mdgains the commands and what the table means, in the #588 paragraph of the recall section.Verified, and not
node --checkpasses.--tablehas been run on made-up records, and the label checks reject what they should.stats()andnearPairs()has been reviewed but never executed. It usesstarts_with(PG 11+). The first real round is the test; I'll fix anything it shows.Running the measurement
🤖 Generated with Claude Code