code wiki / _hdl_build / nx_search_relevance_bench.nx
nx_search_relevance_bench.nx
buildroot/runtime/_hdl_build/nx_search_relevance_bench.nx
about
nx_search_relevance_bench.nx -- MEASURED RELEVANCE for nishi search (operator 2026-07-03: "make sure
... we are state of the art" -- SOTA is a measured quality, not a checklist). A judged query set over
the REAL library shard (dp-nishifamily.com-pub-, 596 docs): each query names the marker string its
correct doc must contain; we run the FULL ranked search and score:
MRR@5 (mean reciprocal rank, Q10: 1024/rank, the sota_mrr.html canon)
mean DCG@5 gain (Q10: 1024*1024/ilog2_1024(rank+1) -- binary judgments, the sota_ndcg.html canon)
Prints per-query ranks + aggregates; GREEN floor = MRR >= 768 (0.75) -- a RATCHET: raise it as the
engine improves, never lower it. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_docportal_search_serve.nxnx_itoa_lib.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
| 11 | const K_MAGIC_1024: i64 = 1024 |
functions
| 13 | func 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 } |
| 14 | func rb_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 19 | func rb_num(v: i64) -> i64 { nxi_out(v); return 0 } |
| 20 | func rb_contains(hay: *u8, hn: i64, ndl: *u8) -> i64 |
| 34 | func rb_rank(dom: *u8, q: *u8, marker: *u8) -> i64 |
| 55 | func rb_one(dom: *u8, q: *u8, marker: *u8, mrrsum: *i64, dcgsum: *i64, hits1: *i64, nq: *i64) -> i64 |
| 70 | func main() -> i64 |