code wiki / (root) / nx_dr_drbench_cli.nx

nx_dr_drbench_cli.nx

buildroot/runtime/nx_dr_drbench_cli.nx

4755 B77 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind benchtopic dr
docsdependenciesstructsconstsfunctions

about

nx_dr_drbench_cli.nx -- callable MCP/API surface for the DRBench+DEER scorer (DR-0). Scores a deep-research report from per-item judge flags and emits the field-standard scorecard JSON. Insight recall is the BINDING constraint (13-36% across the field). nx_dr_drbench <insight_csv> <distractor_csv> <factuality_csv> <completeness_csv> <evidence_csv> each = comma-separated 0/1 flags: insight[i]=1 if groundtruth insight i is covered by the report distractor[i]=1 if injected distractor i leaked into the report (bad) factuality[i]=1 if cited claim i is supported completeness[i]=1 if request sub-question i is answered (DEER) evidence[i]=1 if claim i (cited OR uncited, back-tracked) has valid evidence (DEER) e.g. nx_dr_drbench 1,1,0,0,1 0,0,1,0 1,1,1,0 1,1,1,1,0,0 1,0,1 -> {"insight_recall_permil":600,"distractor_avoidance_permil":750,...,"overall_permil":686} license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_dr_drbench.nx nx_itoa_lib.nx nx_syscalls.nx nx_dr_drbench_cli.nx

imports: nx_dr_drbench.nxnx_itoa_lib.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main db_puts sys_write db_key db_q sys_mmap sys_write ↻ db_puts ↻ db_q ↻ sys_exit sys_mmap ↻ db_parse_csv db_strlen dr_frac dr_sum dr_avoidance dr_sum ↻ dr_mean db_num nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap

structs

none

consts

17const K_MAGIC_1024: i64 = 1024

functions

19func db_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: db_keymain calls 1: sys_write
20func db_q() -> i64 { let b: *u8 = sys_mmap(1); b[0] = 34 as u8; sys_write(1, b, 1); return 0 }
called by 2: db_keymain calls 2: sys_mmapsys_write
21func db_key(name: *u8) -> i64 { db_q(); db_puts(name); db_q(); db_puts(":" as *u8); return 0 }
called by 1: main calls 2: db_qdb_puts
26func db_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
27func db_strlen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: db_parse_csv
29func db_parse_csv(s: *u8, out: *i64, maxn: i64) -> i64
called by 1: main calls 1: db_strlen
42func main(argc: i64, argv: *i64) -> i64