DataAgentBench icon indicating copy to clipboard operation
DataAgentBench copied to clipboard

query_usaspending: contracts.sql was not regenerated after the May 20 amount redesign (prose amounts, no _OLD rows)

Open marc-shade opened this issue 3 weeks ago • 0 comments

query_usaspending/query_dataset/contracts.sql on main still holds the data from the first commit of the dataset. The provenance file, the hints and the corruption code describe a later design that the file does not contain.

What the repository says

  • manual_querycode/PROVENANCE.md: "All 105 formats encode the exact dollar amount ... There is no band-level ambiguity", and about 3.5% of awards get a second row "whose award_id has _OLD appended".
  • db_description_withhint.txt tells the agent that superseded rows are identifiable by the _OLD suffix.
  • manual_querycode/llm_corrupt.py: "Amount narratives are no longer used."

What the file contains (main at 3ce514f0; LFS oid sha256:7fdde155670e23568458570bdb17171b36f4789b49c95dde5461b03ca951a861, 4,840,083 bytes)

  • 10,266 INSERT INTO contract_amounts rows. 8,520 lines of the file match figure|substantial|modest|tier. The amounts are narrative sentences, for example: "...represents a mid-tier commitment typical for minor engineering consultancies, hovering in the six-figure ra..."
  • grep -c "_OLD" returns 0.

Likely cause

Every file under query_dataset/ (contracts.sql, recipients.db, agencies.duckdb, the descriptions dump) was last changed in 2b35c990 (2026-05-02). The ground-truth files are from 2b35c990 (queries 1, 3, 4, 6, 9, 10) and cd863724 (2026-05-06, queries 2, 5, 7, 8, "band-aligned ... recoverable from narrative-corrupted rows"). The redesign commits 43bb7450, 88c8fe00 and 6d96fdb3 (2026-05-20) changed corrupt.py, the provenance and the hints, but no data file. The Hugging Face mirror (ruiyingm/DataAgentBench-data) serves the same contracts.sql: I downloaded it and its sha256 equals the LFS oid above, which dataset_manifest.tsv also pins.

Effect

Ground truth is computed from the clean database with exact thresholds (compute_ground_truth.py, for example c.amount > 1000000). With narrative amounts, an award described only as "standard-tier" or "substantial" cannot be placed above or below a threshold, so exact threshold counts are not recoverable. Four independent solves per query (Claude Opus 5.5, hints on) gave:

Query Ground truth Answers
query1 (DoD awards over $1M) 898 845, 883, 927, 896
query2 (California awards over $1M) 75 75, 86, 74, 74
query9 (no English description, over $1M) 147 145, 41, 144, 145

The threshold queries that ask for a ranking or a sector set (4, 5, 7) were still answered correctly by most or all solves, and 3 and 10 do not depend on amounts. The _OLD hint points agents at rows that do not exist; they report instead that 345 awards have two amount rows under the same ID.

Request

Regenerate contracts.sql (and any sibling files produced by the same run) with the current corrupt.py, or, if the narrative data is intended, restore the provenance and hint text that describes it.

Not checked

  • Whether regenerating with the current corrupt.py reproduces the committed ground truth; the clean database is not in the repository.
  • query6 (ground truth 56; all four solves answered 57) looks like a separate name-canonicalization question and is not part of this report.
  • The dataset is not on the leaderboard, so no listed score depends on this.

marc-shade avatar Nov 11 '26 12:11 marc-shade