nx_research_answer.nx
buildroot/runtime/nx_research_answer.nx
about
nx_research_answer.nx -- GROUNDED, CITED research-answer primitive: "research that cannot hallucinate."
The product face of the verification stack. Given a question's answer-pattern and a source URL, it FETCHES the
source itself over sovereign TLS-1.3, extracts the PHRASE that follows the pattern (up to a natural delimiter),
and returns a grounded answer WITH provenance -- or UNVERIFIABLE if the pattern is absent (it NEVER invents an
answer). Unlike hosted answer engines that can fabricate, this returns only what the cited source actually says.
usage: nx_research_answer <url> <answer_pattern> [maxlen] (run from a dir with data/mozilla_certdata.txt)
e.g.: nx_research_answer https://arxiv.org/abs/1606.05250 "human performance (" -> ANSWER: 86.8 [grounded]
license_tier: ORIGINAL expect_exit: 0
dependencies 5 imports · 0 importers
imports: nx_syscalls.nxnx_itoa_lib.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_fetch_follow.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
| 14 | const K_MAGIC_4194304: i64 = 4194304 |
| 15 | const K_MAGIC_2000: i64 = 2000 |
functions
| 17 | func ra_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 22 | func ra_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 23 | func ra_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: ra_find_after |
| 24 | func ra_int(s: *u8) -> i64 { var v: i64=0; var i: i64=0; while s[i] != (0 as u8) { let c: i64=s[i] as i64; if c>=48 { if c<=57 { v=v*10+(c-48) } } i=i+1 } return v } called by 1: main |
| 26 | func ra_find_after(buf: *u8, blen: i64, pat: *u8) -> i64 |
| 40 | func ra_isdelim(c: i64) -> i64 called by 1: main |
| 52 | func main(argc: i64, argv: *i64) -> i64 |