code wiki / _hdl_build / nx_dr_fuse.nx

nx_dr_fuse.nx

buildroot/runtime/_hdl_build/nx_dr_fuse.nx

4742 B122 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind librarytopic dr
docsdependenciesstructsconstsfunctions

about

nx_dr_fuse.nx -- LEARNED signal combiner for the deep-research judge (DR-12). Two hand-reasoned refinements to the count model were measured and REJECTED (a domain- augmented vocabulary made discrimination worse; IDF weighting was a dead heat). What had never been tried is LEARNING how to combine the signals we already compute, from the real labels ServiceNow publishes. Model: score = w0*lexical + w1*semantic + w2*semantic_idf (integer, deterministic). Fitting: EXHAUSTIVE GRID SEARCH over integer weights on a TRAINING task range, scored by pairwise ranking accuracy (every insight must outrank every distractor within its own task, which is exactly the matched-precision metric the judge is graded on). Grid search rather than gradient descent: no learning rate, no convergence failure, and bit-reproducible. ★HONEST EVALUATION BY CONSTRUCTION: weights are fitted ONLY on the training task range and reported ONLY on a DISJOINT held-out range. Fitting and scoring on the same tasks would be the rigged-gate sin; the split is a parameter so the gate can prove the separation. Every func <=6 params (NAS nx_cc >6-arg skew, seq239). No hardware writes (Rule 26). module: nishi-core.research.dr_fuse depends: nx_syscalls.nx genealogy_id: linear_rank_fusion + perceptron_ranking

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_dr_fuse.nx nx_dr_fuse_cli.nx nx_dr_fuse_gate.nx

imports: nx_syscalls.nx

imported by: nx_dr_fuse_cli.nxnx_dr_fuse_gate.nx

structs

none

consts

22const FU_MAGIC_1000000000: i64 = 1000000000
25const FU_STRIDE: i64 = 5

functions

27func fu_task(r: *i64, i: i64) -> i64 { return r[i * FU_STRIDE] }
28func fu_label(r: *i64, i: i64) -> i64 { return r[i * FU_STRIDE + 1] }
called by 2: fu_pairaccfu_recall
31func fu_score(r: *i64, i: i64, w: *i64) -> i64
38func fu_pairacc(r: *i64, n: i64, w: *i64, lo: i64, hi: i64) -> i64
called by 2: fu_fitmain calls 3: fu_taskfu_labelfu_score
63func fu_recall(r: *i64, n: i64, w: *i64, lo: i64, hi: i64) -> i64
101func fu_fit(r: *i64, n: i64, w: *i64, lo: i64, hi: i64) -> i64
called by 2: mainmain calls 2: sys_mmapfu_pairacc