code wiki / _hdl_build / nx_dr_semjudge_x_cli.nx

nx_dr_semjudge_x_cli.nx

buildroot/runtime/_hdl_build/nx_dr_semjudge_x_cli.nx

4987 B91 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind tooltopic dr
docsdependenciesstructsconstsfunctions

about

nx_dr_semjudge_x_cli.nx -- A/B semantic judge: same code, ANY PPMI model (DR-11). The judge's measured ceiling is out-of-vocabulary terms: a model built over QA-benchmark prose does not know enterprise-research vocabulary, so those terms score 0. To test whether a domain-augmented model lifts that ceiling you must hold the CODE constant and vary only the MODEL -- which a hardcoded model path made impossible. This CLI takes the model as an argument and reports OOV coverage alongside the scores, so the comparison is auditable. nx_dr_semjudge_x <model.bin> <document> <insight_1> [insight_2 ...] Built on the shared nx_ppmi_lib (eats half of debt seq283 -- one loader, not two). license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 5 imports · 0 importers

nx_ppmi_lib.nx nx_itoa_lib.nx nx_dr_run.nx nx_dr_verify.nx nx_syscalls.nx nx_dr_semjudge_x_cli.nx

imports: nx_ppmi_lib.nxnx_itoa_lib.nxnx_dr_run.nxnx_dr_verify.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 sx_puts sys_write sx_key sx_q sys_mmap sys_write ↻ sx_puts ↻ sx_q ↻ sys_exit sys_mmap ↻ ppl_load sys_openat_rd sys_mmap ↻ sys_read sys_close drr_strlen drr_tokenize drr_hash ppl_tokenize_ids ppl_wid_range sys_mmap ↻ db_bsearch_i64 db_semhash sx_invocab sx_num nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap dv_entail dv_contains ppl_maxsim ppl_dcos ppl_cos ppl_isqrt ppl_maxsim_idf ppl_idf_w

structs

none

consts

15const K_MAGIC_16384: i64 = 16384
16const K_MAGIC_2048: i64 = 2048

functions

18func sx_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: sx_keymain calls 1: sys_write
19func sx_q() -> i64 { let b: *u8 = sys_mmap(1); b[0] = 34 as u8; sys_write(1, b, 1); return 0 }
called by 2: sx_keymain calls 2: sys_mmapsys_write
20func sx_key(name: *u8) -> i64 { sx_q(); sx_puts(name); sx_q(); sx_puts(":" as *u8); return 0 }
called by 1: main calls 2: sx_qsx_puts
25func sx_num(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
27func sx_invocab(ids: *i64, n: i64) -> i64
called by 1: main
33func main(argc: i64, argv: *i64) -> i64