code wiki / (root) / nx_recall_rerank_gate.nx

nx_recall_rerank_gate.nx

buildroot/runtime/nx_recall_rerank_gate.nx

2869 B68 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic recall
docsdependenciesstructsconstsfunctions

about

nx_recall_rerank_gate.nx -- KAT + HONEST BENCH for the sovereign semantic reranker. exit 0 = pass; N = assertion N failed. Sovereign lane (nx_cc->nxasm). Reproduces the live failure: a relevant doc buried by lexical/fusion ranking but semantically parallel to the query -- the sovereign cosine reranker recovers it to rank 1. Kept HONEST: an irrelevant doc with a HIGH cosine (a semantic false- positive) is included, so the reranked nDCG lands ~0.96, NOT a rigged 1.0. The point is the measured LIFT over fusion-alone on the R0 ruler, not perfection.

dependencies 4 imports · 0 importers

fx.nx nx_ir_eval.nx nx_recall_rerank.nx syscalls.nx nx_recall_rerank_gate.nx

imports: fx.nxnx_ir_eval.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 rr_semantic_scores nx_cosine_similarity _cosine_dot _cosine_isqrt rr_order_by_cos 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 ↻ fx_from_int ↻

structs

none

consts

none

functions

15func main() -> i64