code wiki / _hdl_build / nx_deepresearch_census.nx

nx_deepresearch_census.nx source

↩ module page · 109 lines · 11518 B

1// nx_deepresearch_census.nx -- HONEST measured landscape census: where does the NISHI RESEARCHER stand vs the 2// PUBLISHED deep-research SOTA (June 2026) -- DeepResearcher (GAIR, arXiv 2504.03160, GRPO/Qwen2.5-7B), Tongyi 3// DeepResearch (Alibaba, 30B-A3B MoE), DeepSearcher (Zilliz, Milvus RAG), multimodal-deepresearcher (FDV), and 4// dzhng/deep-research (minimal breadth/depth)? Operator 2026-07-02: "benchmark ... census + evaluate options." 5// Verdict per axis COMPUTED by xcd_verdict(us,bar) -- NEVER asserted; AHEAD liar-killed unless we meet ALL 6// criteria; SOVEREIGNTY/determinism tagged [FLOOR] (a real win that does NOT close the deep-research INTELLIGENCE 7// gap). The "bar" is the cohort's best on that axis, grounded in knowledge/fetched/dr_*.raw (banked by 8// nx_deepresearch_research). Ground truth for the two quality axes = the pre-registered liar-killed 2026-06-20 9// h2h (SYNTHESIS 0-vs-7, adversarial 0-vs-9). Mirrors the honest nx_researcher_exceed_census; NOT the rigged 10// nx_research_exceed_test. Run SOLO after nx_deepresearch_research + nx_library_harvest_v2. 11// license_tier: ORIGINAL expect_exit: 0 12import "nx_cms_exceed.nx" // XCD_* + xcd_verdict + xcd_referee_ok + xcd_vname + sys_* (transitive) 13 14func sw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } 15func sn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0} 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{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 } 16func have(path: *u8) -> i64 { let fd: i64=sys_openat_rd(path); if fd<0 { return 0 } sys_close(fd); return 1 } 17 18// tot: [0]=BEHIND [1]=PARITY [2]=AHEAD [3]=INVALID [4]=AHEAD-FLOOR [5]=AHEAD-CAPABILITY [6]=UNGROUNDED 19func row(dom: *u8, cap: *u8, our_c: i64, inc_c: i64, n: i64, ev: *u8, ground: *u8, floor: i64, tot: *i64) -> i64 { 20 let v: i64 = xcd_verdict(our_c, inc_c) 21 let ok: i64 = xcd_referee_ok(v, our_c, n) 22 let g: i64 = have(ground) 23 sw(" [" as *u8); sw(dom); sw("] " as *u8); sw(cap); sw(" -> " as *u8); sw(xcd_vname(v)) 24 sw(" (us " as *u8); sn(our_c); sw("/" as *u8); sn(n); sw(") " as *u8); sw(ev) 25 if floor==1 { sw(" [FLOOR: sovereignty/determinism, NOT the deep-research intelligence gap]" as *u8) } 26 if ok==0 { sw(" <== INVALID: AHEAD without meeting all criteria (LIAR-KILL)" as *u8); tot[3]=tot[3]+1 } 27 if g==0 { sw(" [UNGROUNDED: bar not banked -- run nx_deepresearch_research]" as *u8); tot[6]=tot[6]+1 } 28 sw("\n" as *u8) 29 if v==XCD_BEHIND { tot[0]=tot[0]+1 } 30 if v==XCD_PARITY { tot[1]=tot[1]+1 } 31 if v==XCD_AHEAD { tot[2]=tot[2]+1; if floor==1 { tot[4]=tot[4]+1 } else { tot[5]=tot[5]+1 } } 32 return 0 33} 34 35func main() -> i64 { 36 let tot: *i64 = sys_mmap(128) as *i64 37 var z: i64=0; while z<7 { tot[z]=0; z=z+1 } 38 // grounding = the banked published SOTA sources (the BAR each axis is measured against) 39 let DP: *u8 = "knowledge/fetched/dr_deepresearcher_paper.raw" as *u8 40 let DRR: *u8 = "knowledge/fetched/dr_deepresearcher_repo.raw" as *u8 41 let TY: *u8 = "knowledge/fetched/dr_tongyi_deepresearch.raw" as *u8 42 let DS: *u8 = "knowledge/fetched/dr_deepsearcher_rag.raw" as *u8 43 let DZ: *u8 = "knowledge/fetched/dr_dzhng_deepresearch.raw" as *u8 44 let MM: *u8 = "knowledge/fetched/dr_multimodal.raw" as *u8 45 46 sw("=== nx_deepresearch_census -- NISHI researcher vs the PUBLISHED deep-research SOTA (June 2026) ===\n" as *u8) 47 sw("cohort: DeepResearcher(GAIR RL/GRPO) . Tongyi-DeepResearch(Alibaba 30B-A3B) . DeepSearcher(Zilliz RAG) . multimodal-deepresearcher(FDV) . dzhng/deep-research\n" as *u8) 48 sw("verdict = xcd_verdict(us,bar) COMPUTED; AHEAD liar-killed unless we meet ALL criteria; [FLOOR]=sovereign win, not the intelligence gap.\n" as *u8) 49 sw("quality-axis ground truth = the pre-registered, liar-killed 2026-06-20 h2h (SYNTHESIS 0-vs-7, adversarial 0-vs-9). Scale: 2=full 1=partial 0=absent.\n" as *u8) 50 51 sw("\n-- A. SOVEREIGN / OPS FLOOR (genuine, by-construction -- SEPARATED; does NOT make us better at deep research) --\n" as *u8) 52 row("FLR" as *u8, "zero-dependency sovereignty (own TLS-1.3/CA/crawler; no OpenAI/Firecrawl/Milvus/Serper/Jina)" as *u8, 1,0,1, "[ev: nishi-hs/certloop; all 6 systems call paid/3rd-party APIs]" as *u8, DP, 1, tot) 53 row("FLR" as *u8, "deterministic + reproducible (integer, no-float; same Q -> same bytes)" as *u8, 1,0,1, "[ev: nx_cc->nxasm integer path; cohort all stochastic]" as *u8, DRR, 1, tot) 54 row("FLR" as *u8, "crash-resumable research journal (RES-R6; none of the 6 persist mid-run)" as *u8, 1,0,1, "[ev: nx_research_journal_gate GREEN, skip-completed]" as *u8, TY, 1, tot) 55 row("FLR" as *u8, "persistence / no-link-rot (content-addressed Library; cohort output ephemeral)" as *u8, 1,0,1, "[ev: rf_fetch_bank -> knowledge/library, idempotent]" as *u8, DS, 1, tot) 56 row("FLR" as *u8, "near-zero LLM-call cost (0 vs 107 agents / paid tokens on same question)" as *u8, 1,0,1, "[ev: h2h llm_calls 0 vs 107]" as *u8, DZ, 1, tot) 57 58 sw("\n-- A'. CAPABILITY WE HAVE THAT THE COHORT LACKS (genuine AHEAD, not floor) --\n" as *u8) 59 row("GRW" as *u8, "self-grow compounding corpus (grow->miner->freshness->gate autonomous cycle)" as *u8, 1,0,1, "[ev: nx_research_cycle 7-step; 1350 docs/24 idx; cohort corpora don't self-compound]" as *u8, MM, 0, tot) 60 61 sw("\n-- B. DEEP-RESEARCH INTELLIGENCE (the POINT of deep research -- where we are BEHIND) --\n" as *u8) 62 row("SYN" as *u8, "reasoned cross-source synthesis (arguments+caveats, not sentence extraction)" as *u8, 1,2,2, "{h2h SYNTHESIS 0-vs-7; extractive nx_ge_synth reached only 5/10 -- reasoning is LLM-bound}" as *u8, DP, 0, tot) 63 row("ADV" as *u8, "adversarial verification (REFUTE wrong-but-popular; not source-agreement)" as *u8, 1,2,2, "{h2h adversarial 0-vs-9; DeepResearcher 3-vote KILLED 9 incl SPIR-V-portability}" as *u8, DP, 0, tot) 64 row("POL" as *u8, "RL-TRAINED search policy (GRPO-learned multi-hop behavior)" as *u8, 0,2,2, "{DeepResearcher/Tongyi GRPO on Qwen; we have NO trained policy -- prompt/mechanical only}" as *u8, DP, 0, tot) 65 row("BEN" as *u8, "MEASURED scores on public benchmarks (NQ/HotpotQA/2Wiki/Bamboogle/GAIA/BrowseComp)" as *u8, 0,2,2, "{DeepResearcher F1/MBE on 7 sets; Tongyi HLE/BrowseComp -- we have NEVER run them}" as *u8, DP, 0, tot) 66 row("SEM" as *u8, "semantic / dense-vector retrieval (embeddings + ANN)" as *u8, 0,2,2, "{deep-searcher Milvus; ours is LEXICAL BM25 end-to-end -- no dense retriever exists}" as *u8, DS, 0, tot) 67 row("MMR" as *u8, "multimodal report generation (charts/visualizations in output)" as *u8, 0,1,1, "{multimodal-DR FDV; we are text-only (own DiT/viz suite EXISTS to compose)}" as *u8, MM, 0, tot) 68 row("DEC" as *u8, "LLM-planned query decomposition + reflection loop (plan->search->read->refine)" as *u8, 1,2,2, "{cohort ReAct/IterResearch/breadth-depth; sovereign side = SREACH depth, not LLM-planned}" as *u8, TY, 0, tot) 69 70 sw("\n-- C. PARITY / PRESENT (we have it, roughly at the bar; sovereignty is the FLOOR bonus counted above) --\n" as *u8) 71 row("FCH" as *u8, "live web fetch + open-web crawl" as *u8, 2,2,2, "[ev: nx_https_fetch_follow + nx_crawl_web sovereign TLS; cohort via Serper/Firecrawl]" as *u8, DRR, 0, tot) 72 row("LOC" as *u8, "private/local corpus ingest + query (RAG-style retrieval)" as *u8, 2,2,2, "[ev: nx_library_harvest_v2 + BM25 federated 24 idx; cohort = deep-searcher]" as *u8, DS, 0, tot) 73 row("API" as *u8, "served API / MCP tool surface for the RESEARCHER" as *u8, 1,2,2, "{nx_tools_api MCP+REST is LIVE, but the researcher is not yet exposed as /api/research}" as *u8, DZ, 0, tot) 74 row("HON" as *u8, "honesty discipline (build-time liar-kill + runtime gap-flag / refusal)" as *u8, 1,1,1, "[ev: liar-kill gates + research_gaps.txt adequacy; DeepResearcher runtime refusal]" as *u8, DP, 0, tot) 75 76 sw("\n=== SUMMARY ===\n" as *u8) 77 sw("BEHIND = " as *u8); sn(tot[0]); sw(" (the deep-research INTELLIGENCE + API axes we LOSE)\n" as *u8) 78 sw("PARITY = " as *u8); sn(tot[1]); sw(" (fetch/local-RAG/honesty -- we match the bar)\n" as *u8) 79 sw("AHEAD = " as *u8); sn(tot[2]); sw(" of which capability=" as *u8); sn(tot[5]); sw(" FLOOR(sovereignty/determinism)=" as *u8); sn(tot[4]); sw("\n" as *u8) 80 sw("INVALID (liar-killed) = " as *u8); sn(tot[3]); sw(" UNGROUNDED = " as *u8); sn(tot[6]); sw("\n" as *u8) 81 let cells: i64 = tot[0]+tot[1]+tot[2] 82 sw("TOTAL GRADED CELLS = " as *u8); sn(cells); sw("\n" as *u8) 83 84 sw("\n-- NEG-CONTROL (must be CAUGHT) -- fabricated 'researcher already AHEAD on reasoned synthesis' (us 0/1) -> " as *u8) 85 let neg_ok: i64 = xcd_referee_ok(XCD_AHEAD, 0, 1) 86 var neg_caught: i64 = 0 87 if neg_ok==0 { sw("REJECTED (liar-kill fired)\n" as *u8); neg_caught=1 } else { sw("ACCEPTED (BROKEN)\n" as *u8) } 88 89 sw("\n=== OPTIONS LADDER (what it takes to close the gap -- priority order; each composes existing nishi primitives) ===\n" as *u8) 90 sw(" R1 SOVEREIGN SYNTH+REFUTE: wire the no-float LLM lane as the synthesis + adversarial-refutation stage -> closes SYNTHESIS(0->7) + ADVERSARIAL(0->9), the two MEASURED quality gaps. THE headline lever.\n" as *u8) 91 sw(" R2 BENCHMARK HARNESS: run the public sets (NQ/HotpotQA/2Wiki/Bamboogle + GAIA/BrowseComp subset) sovereignly -> real MEASURED F1/MBE numbers (turns 'never run' into data; the literal 'benchmark' ask).\n" as *u8) 92 sw(" R3 DENSE RETRIEVER: no-float trained bi-encoder + ANN over the Library -> semantic retrieval (closes deep-searcher; today lexical BM25 only).\n" as *u8) 93 sw(" R4 MULTIMODAL REPORTS: compose the sovereign DiT/viz suite -> charts/visualizations in output (closes multimodal-DR).\n" as *u8) 94 sw(" R5 API SURFACE: expose /api/research + MCP tool via nx_tools_api -> researcher usable by agents + login-gated /research UI.\n" as *u8) 95 sw(" R6 TEAM FAN-OUT: grow sovereign multi-agent fan-out (nx_arbiter + racing_crew, role specialization) -> DeepResearcher/Tongyi-style parallel browsing agents.\n" as *u8) 96 sw(" (KEEP the FLOOR: sovereignty + determinism + crash-durability + persistence + near-zero-cost + self-grow = the moat we build the intelligence layer ON TOP of.)\n" as *u8) 97 98 sw("\n=== VERDICT ===\n" as *u8) 99 var green: i64 = 1 100 if tot[3] != 0 { green = 0 } 101 if neg_caught != 1 { green = 0 } 102 if green==1 { 103 sw("GREEN -- census honest: 0 fabricated exceeds, liar-kill armed. TRUTH: the Nishi researcher EXCEEDS the published cohort ONLY on the sovereign FLOOR (" as *u8); sn(tot[4]); sw(") + self-grow (" as *u8); sn(tot[5]); sw("); PARITY on " as *u8); sn(tot[1]); sw(".\n" as *u8) 104 sw(" It is BEHIND on " as *u8); sn(tot[0]); sw(" deep-research INTELLIGENCE/API axes (synthesis/adversarial/RL-policy/benchmarks/semantic/multimodal/decompose/api) -> NOT s-class-exceed on deep research. R1..R6 above = the path (R1 no-float synth+refute first: it closes the two MEASURED quality gaps).\n" as *u8) 105 return 0 106 } 107 sw("RED -- liar-kill integrity failed\n" as *u8) 108 return 1 109}