nx_recall_eval.nx
buildroot/runtime/nx_recall_eval.nx
about
nx_recall_eval.nx -- the recall RULER as a service (R0 on MCP/API). Parse a ranked
graded-relevance vector (argv gains-csv) and emit an honest IR scorecard JSON
(nDCG@k / MRR / Recall@k / P@k / AP) via nx_ir_eval. Any caller -- the compare C5
grader, a workstream, a session -- grades a ranking without re-implementing the
metrics; sovereign, integer-deterministic, same number on every machine.
nx_recall_eval <gains-csv> [total_relevant] [k]
e.g. nx_recall_eval 3,0,1,0,0 -> {..."ndcg_permil":964,"mrr_permil":1000,...}
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 4 imports · 0 importers
imports: fx.nxnx_itoa_lib.nxnx_ir_eval.nxsyscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 13 | const K_MAGIC_32768: i64 = 32768 |
| 14 | const K_MAGIC_65536: i64 = 65536 |
functions
| 16 | func re_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 17 | func re_q() -> i64 { let b: *u8 = sys_mmap(1); b[0] = 34 as u8; sys_write(1, b, 1); return 0 } |
| 18 | func re_key(name: *u8) -> i64 { re_q(); re_puts(name); re_q(); re_puts(":" as *u8); return 0 } |
| 23 | func re_num(v: i64) -> i64 { nxi_out(v); return 0 } |
| 25 | func re_permil(fxv: i64) -> i64 { return (fxv * 1000 + K_MAGIC_32768) / K_MAGIC_65536 } called by 1: main |
| 27 | func re_parse_csv(s: *u8, n: i64, out: *i64, maxn: i64) -> i64 |
| 41 | func re_arg_int(a: *u8, dflt: i64) -> i64 |
| 48 | func main(argc: i64, argv: *i64) -> i64 |