nx_research_verify_synth.nx
buildroot/runtime/nx_research_verify_synth.nx
about
nx_research_verify_synth.nx -- S1 <-> S2 INTEGRATION: the self-verifying researcher. It runs S1 (grounded
synthesis, nx_research_synth_qwen) and then, for every NUMERIC sentence-claim, checks that the model's number
is actually PRESENT (within a tight tolerance) in the source that claim cites -- CONFIRMED if present,
DISCREDITED if the source has numbers but not that one (the model fabricated/altered it), UNVERIFIABLE if the
claim is uncited or the source has no numbers. A synthesized answer thus grades ITS OWN numeric claims against
the evidence, at $0. Composes S1 (rsq_synth / rsq_sentence_cite) + S2 (cvc_iabs, the verdict discipline).
HONEST SCOPE: this catches numeric FABRICATION/ALTERATION (the common hallucination). Metric MISATTRIBUTION
(right number, wrong metric) needs S2's explicit-pattern path (nx_claim_verify_core cvc_verify_text with a
caller-supplied pattern, as in nx_research_refute). license_tier: ORIGINAL
dependencies 4 imports · 3 importers
imports: nx_syscalls.nxnx_research_synth_qwen.nxnx_claim_verify_core.nxnx_text_sentences.nx
imported by: nx_research_crossval.nxnx_research_unified.nxnx_research_verify_synth_gate.nx
structs
| none |
consts
| none |
functions
| 16 | func rvs_num_at(buf: *u8, blen: i64, off: i64, endp: *i64) -> i64 |
| 36 | func rvs_first_number(buf: *u8, s: i64, e: i64) -> i64 |
| 56 | func rvs_span_numbers_near(ans: *u8, s: i64, e: i64, src: *u8, sl: i64, tol: i64, hp: *i64, outp: *i64) -> i64 |
| 81 | func rvs_src_has_near(src: *u8, slen: i64, claimed: i64, tol: i64, has: *i64) -> i64 |
| 98 | func rvs_verify_answer(ans: *u8, alen: i64, srcv: *i64, nsrc: i64, tol: i64, out: *i64) -> i64 |
| 130 | func rvs_answer(q: *u8, srcv: *i64, nsrc: i64, tol: i64, ans: *u8, out: *i64) -> i64 |