code wiki / (root) / nx_recall_bench.nx

nx_recall_bench.nx

buildroot/runtime/nx_recall_bench.nx

4777 B92 linesdepth 6pulls 10 transitivereach 0 importersview sourcekind benchtopic recall
docsdependenciesstructsconstsfunctions

about

nx_recall_bench.nx -- the R1+R2 measured-lift bench AS A SERVICE (evidence-fork organ). Every call RE-RUNS the fusion + rerank benches live on the nx_ir_eval ruler and emits the scorecard JSON -- numbers are recomputed at call time, never baked, so a caller (the /compare C2/C5 evidence-fork, a workstream, a session) can fork the proof. Verdict RED + exit 1 if any lift inverts (liar-killer: a regression cannot hide). nx_recall_bench -> JSON scorecard license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 6 imports · 0 importers

fx.nx nx_itoa_lib.nx nx_ir_eval.nx nx_recall_fuse.nx nx_recall_rerank.nx syscalls.nx nx_recall_bench.nx

imports: fx.nxnx_itoa_lib.nxnx_ir_eval.nxnx_recall_fuse.nxnx_recall_rerank.nxsyscalls.nx

imported by: nobody (leaf or entry point)

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

main rf_fuse nx_rrf_add fx_from_frac rf_order_by_score ie_ndcg_at_k ie_sort_desc ie_dcg_at_k fx_log2_int fx_log2 fx_mul fx_from_int fx_div fx_from_int ↻ fx_div ↻ rr_semantic_scores nx_cosine_similarity _cosine_dot _cosine_isqrt rr_order_by_cos rb_puts rb_key rb_q rb_puts ↻ rb_q ↻ rb_num nxi_out nxi_fd sys_mmap ccz_cat_num sys_write sys_munmap rb_permil

structs

none

consts

14const K_MAGIC_32768: i64 = 32768
15const K_MAGIC_65536: i64 = 65536

functions

17func rb_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: rb_keymain
18func rb_q() -> i64 { let b: *u8 = sys_mmap(1); b[0] = 34 as u8; sys_write(1, b, 1); return 0 }
called by 2: rb_keymain
19func rb_key(name: *u8) -> i64 { rb_q(); rb_puts(name); rb_q(); rb_puts(":" as *u8); return 0 }
called by 1: main calls 2: rb_qrb_puts
24func rb_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
25func rb_permil(fxv: i64) -> i64 { return (fxv * 1000 + K_MAGIC_32768) / K_MAGIC_65536 }
called by 1: main
27func main() -> i64