File size: 3,946 Bytes
7260f53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "dataset": "skyan1002/flash-flood-benchmark-data",
  "base_url": "https://huggingface.co/datasets/skyan1002/flash-flood-benchmark-data/resolve/main",
  "description": "LLM/agent tool definitions for the TORRENT flash-flood benchmark. Each tool maps to a jq query over manifest.jsonl or the /filter API; see AGENTS.md.",
  "tools": [
    {
      "name": "list_primary_benchmark",
      "description": "Return the 21-testbed conservative primary benchmark (14 episodes, 21 gauges) — the default set for model intercomparison.",
      "parameters": {"type": "object", "properties": {}, "required": []},
      "implementation": "jq -c 'select(.level==\"L3\" and .primary_benchmark==true)' manifest.jsonl"
    },
    {
      "name": "query_testbeds",
      "description": "Filter L3 testbeds by tier of evidence, flash-flood screen, state, time, and severity. Returns matching testbed records.",
      "parameters": {
        "type": "object",
        "properties": {
          "tier": {"type": "string", "enum": ["primary", "rp_ge_2yr", "ncei_confirmed", "dedup", "strict", "all"], "description": "which stage of the funnel"},
          "state": {"type": "string", "description": "2-letter USPS code, matches primary_state_abbrev"},
          "start_date": {"type": "string", "description": "YYYY-MM-DD inclusive lower bound on begin_date"},
          "end_date": {"type": "string", "description": "YYYY-MM-DD inclusive upper bound on begin_date"},
          "min_return_period_yr": {"type": "number", "description": "lower bound on lp3_return_period_yr"},
          "max_drainage_area_km2": {"type": "number"}
        },
        "required": []
      },
      "implementation": "jq over manifest.jsonl with level=='L3' plus the flag matching the tier (primary->primary_benchmark, rp_ge_2yr->rp_ge_2yr, ncei_confirmed->ncei_confirmed, dedup->selected, strict->is_strict_flash_flood)"
    },
    {
      "name": "get_testbed",
      "description": "List and download every file of one testbed package (watershed.geojson, streamflow.csv, hwms_inside.csv, testbed_summary.json, and full forcing if present).",
      "parameters": {
        "type": "object",
        "properties": {"testbed_id": {"type": "string", "description": "e.g. FF_2025_07_TX_ep002__08165500"}},
        "required": ["testbed_id"]
      },
      "implementation": "jq -r 'select(.testbed_id==$id and .record_type==\"artifact\").resolve_url' manifest.jsonl | xargs -n1 curl -L -O"
    },
    {
      "name": "expand_l3",
      "description": "Discover newly qualifying testbeds from a given NCEI calendar year and append them to the L3 pool as light rows (needs_curation_review=true). Extends the benchmark; does not alter the human-reviewed primary set.",
      "parameters": {
        "type": "object",
        "properties": {"year": {"type": "integer", "description": "NCEI calendar year to ingest, e.g. 2026"}},
        "required": ["year"]
      },
      "implementation": "python pipeline/expand_l3.py --year <year> --data-root ."
    }
  ],
  "flag_semantics": {
    "primary_benchmark": "default 21-testbed conservative set (paper Sect. 3.4)",
    "is_strict_flash_flood": "passed strict flash-flood screen (175)",
    "selected": "deduplicated representative (115); alias dedup_selected",
    "ncei_confirmed": "in-basin NCEI report point (54)",
    "rp_ge_2yr": "LP3 return period >= 2 yr (31)",
    "nldi_recovered": "watershed restored by hardened NLDI retrieval",
    "regulation_excluded": "excluded from primary: direct flood-control influence",
    "postfire_excluded": "excluded from primary: recent-wildfire applicability review",
    "needs_curation_review": "machine-appended by the annual pipeline, awaiting human curation",
    "water_balance_flag": "RC > 1; interpret volume metrics with caution",
    "benchmark_tier": "A (in-basin NCEI point) or B (evidence label, not an exclusion)"
  }
}