nx_drbench_fetch.nx source
↩ module page · 26 lines · 1726 B
1// nx_drbench_fetch.nx -- R2a: fetch a PUBLIC multi-hop QA benchmark subset sovereignly (the census [BEN] axis:
2// "MEASURED scores on public benchmarks -- NEVER run"). Dataset = HotpotQA (Yang et al. 2018), DISTRACTOR
3// validation split, first 100 rows, via the Hugging Face datasets-server rows API (JSON; no auth for public
4// datasets). Distractor protocol = each row carries its own 10 context paragraphs (2 gold + 8 distractors),
5// so retrieval+extraction is evaluable self-contained -- the published eval, not a self-authored set (the
6// rigged-gate sin is banned). Raw JSON lands in knowledge/fetched/drb_hotpot_p0.raw for nx_drbench to parse.
7// Composes nx_research_engine (sovereign TLS-1.3 + CA store + gzip-guard + idempotent bank). Run SOLO.
8// expect_exit: 0 license_tier: ORIGINAL
9import "nx_research_engine.nx"
10const K_MAGIC_8388608: i64 = 8388608
11
12func main() -> i64 {
13 let store: *TrustStore = rf_init()
14 if (store as i64) == 0 { rf_puts("drb: trust store load failed\n" as *u8); return 1 }
15 rf_puts("CA roots="); rf_putn(trust_store_count(store)); rf_puts(" -- HotpotQA distractor val subset -> fetched (public benchmark, R2a)\n" as *u8)
16 let cap: i64 = K_MAGIC_8388608
17 let out: *u8 = sys_mmap(cap)
18 var ok: i64 = 0
19
20 rf_section("HotpotQA distractor validation rows 0..99 (HF datasets-server rows API, JSON)" as *u8)
21 ok = ok + rf_fetch_bank("https://datasets-server.huggingface.co/rows?dataset=hotpotqa/hotpot_qa&config=distractor&split=validation&offset=0&length=100" as *u8, "drb_hotpot_p0" as *u8, store, out, cap)
22
23 rf_puts("DRB BANKED: "); rf_putn(ok); rf_puts(" / 1 (raw JSON = knowledge/fetched/drb_hotpot_p0.raw)\n" as *u8)
24 if ok==1 { return 0 }
25 return 1
26}