code wiki / _hdl_build / nx_search_relevance_bench.nx

nx_search_relevance_bench.nx

buildroot/runtime/_hdl_build/nx_search_relevance_bench.nx

5280 B101 linesdepth 5pulls 9 transitivereach 0 importersview sourcekind benchtopic search
docsdependenciesstructsconstsfunctions

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

nx_docportal_search_serve.nx nx_itoa_lib.nx nx_search_relevance_bench.nx

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

main rb_puts rb_one rb_rank dss_search dss_search_off dss_search_off_div dss_prefix dss_open_maybe_cached ss_tok_table ss_tok_next2 dss_streq dss_stem_expand ss_doc_count ss_term_dcount idf_q10 ss_phrase dss_key_cid ss_term_top ss_term dss_mkpolkey ss_hget dss_mkurlkey dss_url_host_match dss_url_path_has dss_mkkey dss_tf_all dss_prox_all tfnorm_q10 ss_loadfile dss_url_host dss_is_search_url dss_slug_match_term dss_urlcid dss_prkey dss_hosthash dss_is_web sys_munmap rb_len dss_prefix ↻

structs

none

consts

11const K_MAGIC_1024: i64 = 1024

functions

13func 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_onemain
14func rb_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: rb_containsrb_rank
19func rb_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 2: rb_onemain calls 1: nxi_out
20func rb_contains(hay: *u8, hn: i64, ndl: *u8) -> i64
called by 1: rb_rank calls 1: rb_len
34func rb_rank(dom: *u8, q: *u8, marker: *u8) -> i64
55func rb_one(dom: *u8, q: *u8, marker: *u8, mrrsum: *i64, dcgsum: *i64, hits1: *i64, nq: *i64) -> i64
called by 1: main calls 4: rb_rankrb_putsrb_numilog2_1024
70func main() -> i64