code wiki / (root) / nx_recall_scale_gate.nx

nx_recall_scale_gate.nx

buildroot/runtime/nx_recall_scale_gate.nx

3100 B70 linesdepth 6pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic recall
docsdependenciesstructsconstsfunctions

about

nx_recall_scale_gate.nx -- SCALE-ENVELOPE gate for the recall stack (the F227 scale-law: fixture-proven-only tools with undeclared caps = false signals worse than gaps). Proves nx_ir_eval + nx_recall_fuse + nx_recall_rerank CORRECT at N=2048 (three orders of magnitude past the 5-doc fixtures) and DECLARES the envelope. exit 0 = pass, N = failed. DECLARED ENVELOPE (honest): metrics exact at any n (O(n) sums; i64 headroom); the fusion/ rerank ORDERING helpers are selection-sort O(n^2) -- correct at any n, sized for post-BM25 shortlists (<= ~4k candidates); a 100k+ SERP re-sort needs a heap/merge rung (future, named).

dependencies 5 imports · 0 importers

fx.nx nx_ir_eval.nx nx_recall_fuse.nx nx_recall_rerank.nx syscalls.nx nx_recall_scale_gate.nx

imports: fx.nxnx_ir_eval.nxnx_recall_fuse.nxnx_recall_rerank.nxsyscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main fx_from_int ie_ndcg_at_k ie_sort_desc ie_dcg_at_k fx_log2_int fx_log2 fx_mul fx_from_int ↻ fx_div fx_from_int ↻ fx_div ↻ ie_mrr fx_from_frac fx_from_frac ↻ ie_recall_at_k fx_from_frac ↻ ie_hits_at_k rf_fuse nx_rrf_add fx_from_frac ↻ rr_order_by_cos

structs

none

consts

16const SG_N: i64 = 2048

functions

18func main() -> i64