Repository navigation
bench: ContextBench Lite file precision/recall for CGraph (build plan item 2: fails, 0.100 vs 0.5) - #201
Merged
Conversation
… (build plan item 2) Adds bench/contextbench/: a pinned, one-command run that scores CGraph's retrieved files against ContextBench's human-annotated gold contexts with ContextBench's own file-level metric (EuniAI/ContextBench @ 1436c28, HF data @ c285579, all 500 Lite instances). Retrieval reuses the ARB adapter; the snapshot lifecycle is extracted from bench/arb/cgraph_eval.py into served_snapshot so both benches share it (ARB output unchanged). Result on bin-v0.9.4-1-g43453f3: default-context file precision 0.100 (95% CI 0.089-0.112), best top-K precision 0.217 at K=2. The ContextBench half of item 2's gate (>= 0.5) fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uote - RESULTS.md finding 4: the minified-bundle hang is fixed on main by #204; numbers stay pinned to 43453f3, no 500/500 rerun yet. - Quote Appendix H exactly ("averaged over evaluated tasks"). - Per-source rows for every K live in results.json, not results.md. - run.sh: steps 4 and 5 use $PY like the other steps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tgod009
approved these changes
Oct 17, 2026
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.
What
This measures build plan item 2's open half, "ContextBench file precision >= 0.5", and ships it as a reproducible bench in
bench/contextbench/, following the pattern ofbench/arb/(#184).EuniAI/ContextBench@1436c28a8eb95496da4ea69ad458b9f8a8eb7d61.Contextbench/ContextBench@c2855792b006af41c67202d33883fb9d46362853,contextbench_verified.parquet, with its sha256 checked.selected_500_instances.csv.compute_granularity_metrics, at the file level: recall|P∩G|/|G|, precision|P∩G|/|P|. Gold comes from ContextBench'sGoldLoader.aggregate_resultsis reported alongside.problem_statement.instances.pyexports repo, commit and issue text, and the labels stay behind.cgraphandgraphdbinaries index and serve it, andcgraph-clientsends the queries.contextcall at engine defaults (budget 6000). This is what CGraph hands an agent.Command
The run used a build of main at 43453f3:
cgraph-native 0.1.0 (bin-v0.9.4-1-g43453f3).Results (500 instances, 499 scored)
contextPublished ContextBench Lite file-level baselines (paper v3, point estimates; no per-instance data is released):
The agents are not like-for-like with CGraph. Each runs a full GPT-5 session, then declares the files it used. CGraph answers the issue text once. The agent rows show where the gate sits, not what CGraph should match.
Gate verdict: FAIL
CGraph's default file precision is 0.100 (CI 0.089-0.112), against a gate of 0.5. The best point on the whole curve is 0.217 at K=2, with a CI upper bound of 0.243. The fail is not close.
Other findings
element-hq/element-web@c9d9c421ran for 2 h 9 min and was killed, after about 2 h of CPU on one thread.docs/lib/mermaid.min.js, a 2.9 MB minified bundle.http_call_handler -> analyze_client_call -> collect_url_template -> local_values -> exclusive_branches -> branch_path -> ts_node_parent.gold.pyuseslstrip("./"), which turns.github/...intogithub/.... 18 of the 1,746 gold files are not in their tree. This applies to every system equally and is left unpatched.--limit 30rerun matched the full run on 30 of 30 instances: default files, ranking and per-op lists.bench/arb/cgraph_eval.pynow hasserved_snapshot, the extracted checkout, build, serve and teardown lifecycle. ARBtrace2codeandedit2rippleone-sample runs before and after the change gave identical details.Spend and time
16132.80s user 755.04s system 190% cpu 2:28:03.77 total). 499 instances finished in the first 51 minutes; the rest was the one stuck build.Tests
cteston the release build: 100 of 100 passed.Full write-up:
bench/contextbench/RESULTS.md.🤖 Generated with Claude Code