code wiki / _hdl_build / nx_researcher_fuse_gate.nx
nx_researcher_fuse_gate.nx
buildroot/runtime/_hdl_build/nx_researcher_fuse_gate.nx
about
nx_researcher_fuse_gate.nx -- GATE: RRF FUSION of the researcher's INTERNAL + EXTERNAL ranking arms (the core of
"internal and external sources so we exceed deep-research"). The internal arm (BM25 over our 511-doc banked corpus,
proven live via nx_search_cli) ranks sources by OUR-corpus relevance; the external arm ranks by external authority.
nx_rrf (Cormack-Clarke-Buettcher 2009, parameter-free k=60, integer-exact Q16.16) fuses them by RANK POSITION:
score = sum 1/(k+rank). A source must rank well in BOTH arms to top the fused brief -- so internal-relevance AND
external-authority must AGREE, neutralizing single-source bias (the same property that neutralizes SEO).
T1 the fused top is the source ranked well in BOTH arms (not the one strong in only one).
T2 both-agreement beats single-source strength (score(both) > score(internal-only) and > score(external-only)).
T3 DETERMINISM: identical fusion -> byte-identical scores.
T4 EXTERNAL ARM LOAD-BEARING: internal-only fusion picks a DIFFERENT top -> adding external sources changes the answer.
expect_exit: 0 license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_rrf.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
| none |
functions
| 14 | func rw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } called by 1: main |
| 15 | func rn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{sys_write(1,"-" as *u8,1);m=0-m} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 } called by 1: main |
| 17 | func main() -> i64 |