code wiki / (root) / nx_bench_intent.nx

nx_bench_intent.nx

buildroot/runtime/nx_bench_intent.nx

10597 B254 linesdepth 4pulls 4 transitivereach 7 importersview sourcekind benchtopic bench
docsdependenciesstructsconstsfunctions

about

nx_bench_intent.nx -- intent/facet-aware retrieval metrics, bits-up. module: nishi-core.search.bench.intent depends: fx.nx (Q16.16 + fx_log2), syscalls.nx (scratch) capability: CORE_COMPUTE wired_status: FULLY_WIRED WHY (operator directive 2026-05-29): rankings must not be "ours" -- they must be grounded in standard, up-to-today IR research and be AGNOSTIC (a person / place / thing-in-time entity model), while still satisfying the DIFFERENT intents a person query carries at once: her WORKS from her own SOCIALS, what she's been IN (filmography), and WHERE/WHEN (timeline, age/date). One ranking cannot over-serve one intent at the others' cost. Method (verified from NIST TREC Dynamic Domain Overview + primary papers): * Graded relevance 1-4 (1 marginal .. 4 key result) [TREC-DD 2017] * Subtopic decomposition == FACETS/INTENTS [TREC-DD] * S-recall: fraction of intents covered in top-k [Zhai-Cohen-Lafferty, "Beyond independent relevance", SIGIR 2003] * Cube Test water-filling with per-subtopic MaxHeight cap: rewards covering many intents, caps redundant hits on one [Luo, Wing, Yang & Hearst, "Water filling: the cube test", CIKM 2013] * Derivative commentary capped at grade <= 2 so it can never outrank a primary source at equal relevance (encodes first-hand > commentary inside the standard graded framework). Agnostic by construction: the facet ids below are a person decomposition, but the kernels take (subtopic_id, grade) arrays -- swap the facet table for a place or product and the same math applies. Subtopic WEIGHTS belong in a config table, never hardcoded (Rule #11); these kernels take the caller's grades as given.

dependencies 2 imports · 3 importers

fx.nx syscalls.nx nx_bench_intent.nx nx_bench_harness.nx nx_bench_intent_test.nx nx_facet_classify.nx

imports: fx.nxsyscalls.nx

imported by: nx_bench_harness.nxnx_bench_intent_test.nxnx_facet_classify.nx

structs

none

consts

37const NX_FACET_IDENTITY: i64 = 0 // bio facts + time/age/where-now
38const NX_FACET_WORKS: i64 = 1 // filmography / what they've been in
39const NX_FACET_OFFICIAL_MEDIA: i64 = 2 // first-hand photos / film stills
40const NX_FACET_INTERVIEWS: i64 = 3 // direct first-hand statements
41const NX_FACET_PRESS: i64 = 4 // professional editorial coverage
42const NX_FACET_SELF_SOCIAL: i64 = 5 // verified own social presence
43const NX_FACET_LONGTAIL: i64 = 6 // archive / forum / foreign-locale
44const NX_FACET_COUNT: i64 = 7
49const NX_CUBE_MAX_HEIGHT: i64 = 5 // TREC 2017 DD: MaxHeight = 5

functions

53func nx_bench_cap_derivative_grade(grade: i64, is_derivative: i64) -> i64
called by 1: main
63func nx_bench_subtopic_recall(subtopic: *i64, grade: *i64, n: i64, k: i64,
96func nx_bench_cube_filled(subtopic: *i64, grade: *i64, n: i64, k: i64,
131func nx_bench_cube_speed(subtopic: *i64, grade: *i64, n: i64, k: i64,
189func nx_bench_gold_reach(retr: *i64, n: i64, k: i64, qr_n: i64) -> i64
called by 1: nx_bench_score_serp calls 1: fx_from_frac
215func nx_bench_longtail_reach(facet: *i64, retr: *i64, n: i64, k: i64,
called by 1: nx_bench_score_serp calls 1: fx_from_frac
243func nx_bench_offgold_rate(retr: *i64, n: i64, k: i64) -> i64
called by 1: nx_bench_score_serp calls 1: fx_from_frac