code wiki / _hdl_build / nx_ltr_lib_gate.nx
nx_ltr_lib_gate.nx
buildroot/runtime/_hdl_build/nx_ltr_lib_gate.nx
about
nx_ltr_lib_gate.nx -- teeth for the learning-to-rank reranker (nx_ltr_lib.ltr_cv) on a synthetic
fixture it builds itself (search rung R0, 2026-09-14). A SIGNAL fixture where one feature predicts
the sparse relevant candidates -- the trained arm's 5-fold held-out nDCG must be high; a SHUFFLE
neg-control where gold is decorrelated from every feature -- with 20 candidates and only 3 relevant
a random ordering pushes them out of the top-10, so it must score LOW (the model may not hallucinate
signal); determinism (integer, so the same fixture twice is the same number). No corpus, no fork.
Declared in organ_gate.conf.
dependencies 2 imports · 0 importers
imports: nx_ltr_lib.nxnx_gate_verdict.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
| 12 | const GL_NQ: i64 = 20 |
| 13 | const GL_NC: i64 = 20 // 20 candidates, only 3 relevant -> a bad ordering loses them past nDCG@10 |
| 14 | const GL_BOX: i64 = 8 |
functions
| 17 | func gl_noise(q: i64, c: i64, k: i64) -> i64 called by 1: gl_build |
| 24 | func gl_idcg(gold: *i64, base: i64, nc: i64) -> i64 |
| 44 | func gl_mod(a: i64, m: i64) -> i64 { return a - (a / m) * m } called by 1: gl_build |
| 49 | func gl_build(feat: *i64, gold: *i64, ncand: *i64, idcg: *i64, fold: *i64, mode: i64) -> i64 |
| 86 | func main() -> i64 |