code wiki / (root) / nx_forge_rag_ab.nx

nx_forge_rag_ab.nx

buildroot/runtime/nx_forge_rag_ab.nx

5719 B136 linesdepth 9pulls 16 transitivereach 0 importersview sourcekind tooltopic forge
docsdependenciesstructsconstsfunctions

about

nx_forge_rag_ab.nx -- THE RAG VALUE A/B (2026-07-17): base-pack vs rag-augmented-pack on the held-out fbench tasks, same engine, same judge, greedy pass@1 (mirrors nx_forge_curves cv_task: fe_run maxc=1 maxnew=400 nsamples=0). Because the 0.5B floors at 0 on fbench pass@1 (A1 measured), each leg ALSO classifies the failure from the banked loop ctx (/tmp/forge_loop_ctx.txt) -- 1=GREEN 2=COMPILE-FAIL 3=RUN-FAIL 4=OUTPUT-MISS -9=unknown -- the softer signal with real discrimination on a weak model. Rows -> sovereign store knowledge/store/rag_ab keyed "<leg>:<task>" = [rc, class, us] (latest-wins; re-runnable suite command per growth-loop law). Pre-step (documented): regenerate rag packs via _offc/nx_forge_rag.elf augment <taskf> <mini> ... 2 <ragpack>. usage: nx_forge_rag_ab <port> <chat> license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_forge_engine.nx nx_sov_ledger.nx nx_forge_rag_ab.nx

imports: nx_forge_engine.nxnx_sov_ledger.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main std_putln std_puts std_slen sys_write std_atoi ab_leg std_puts ↻ fe_run std_putln ↻ flp_run std_slen ↻ fg_mkpath sys_openat_wr std_puts ↻ std_pdec sys_mmap std_itoa sys_mmap ↻ sys_write ↻ flp_cycle fm_compose_prompt sys_read flp_build_gen_body fm_build_gen_body std_itoa ↻ flp_splice_sampling std_itoa ↻ fm_post_gen sys_socket nx_http_client_sockaddr_ip nx_connect_bounded nx_http_client_build_reque _drain fm_extract_text std_slen ↻ fm_hexval fm_strip_fences sys_openat_wr ↻ fc_ws

structs

none

consts

14const AB_CTXCAP: i64 = 65536

functions

16func ab_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: ab_classify calls 1: sys_read
36func ab_find(hay: *u8, hn: i64, needle: *u8) -> i64
called by 1: ab_classify
52func ab_classify(rc: i64) -> i64
called by 1: ab_leg calls 2: ab_readab_find
72func ab_row(key: *u8, rc: i64, cls: i64) -> i64
called by 1: ab_leg calls 2: sys_now_ussov_put_ints
82func ab_leg(key: *u8, organ: *u8, taskf: *u8, expectf: *u8, packf: *u8, port: i64, chat: i64) -> i64
101func main(argc: i64, argv: *i64) -> i64