317,000+ queries, multi-million-token conversations, indirect prompt-injection attacks, and sandboxed coding/SQL trajectories on ten peer-reviewed public benchmarks, krusch-stack achieves: (1) state-of-the-art cost-accuracy routing across all three major routing suites (0.7883 / 80.72% accuracy at $0.2117/1K in official RouteWorks/RouterArena GitHub CI PR #169, pending merge; #1 lowest Pareto distance 0.4269 at -83.95% cost on ACL 2026 LLMRouterBench; and #1 In-Distribution Micro AIQ = 0.7488 / 0.7695 with -72.63% cost at 98% GPT-4 quality plus #1 Leave-One-Suite-Out OOD AIQ = 0.7268 / 0.7455 across 72,980 rows on Martian RouterBench); (2) 0.00% Targeted Attack Success Rate (0/949, down from 19.28% unprotected) across all 1,046 episodes of ETH SpyLab AgentDojo v1.2.2 with 0.00 pp benign utility loss (61.86% Policy-Floor / 69.07% Spotlighting); (3) #1 10-task Macro NDCG@10 = 56.40% (73.88% Recall@10) across all 2,389,123 docs and 162,216 queries of ACL 2025 CoIR alongside strong open-weights retrieval on ICLR 2026 BEAM (100K–10M, 2,000/2,000 probes), RepoBench-R (47,998 Qs), and LegalBench-RAG (6,889 Qs); and (4) large deterministic $0-API harness lifts on open-weights openai/gpt-oss-120b across Aider Polyglot (19.56% → 51.56% Pass@2, 2.64x), BIRD-SQL Mini-Dev (26.00% → 40.20% EX, 1.55x, 100% valid SQL across 500/500 queries), and UC Berkeley BFCL v3 Live (59.88% → 66.28% Micro, 84.69% Irrelevance, -80.67% schema tokens across 2,251/2,251 queries). Scope qualifiers matter: frontier multi-turn reasoning models still hold the 75%–88%+ coding and 65%–75%+ multi-candidate SQL ceilings, and self-judged cloud memory stacks lead aggregate BEAM E2E QA. All 21 raw logs and deterministic verifiers are public on Hugging Face.
1. Condensed 6-Pillar External Scorecard (10 Suites)
Rather than inventing custom micro-benchmarks or grading models with themselves, we ran each subsystem of krusch-stack against ten established academic and industry benchmarks inside an isolated 96 GB NVIDIA RTX PRO 6000 Blackwell (sm_120) clean-room VM and local 1024d snowflake-arctic-embed2 loopback (zero outbound cloud API calls on every open-weights run).
| Pillar & Repo | External Benchmark & Scale | Verified Sovereign Result | External Stack / Leaderboard Context |
|---|---|---|---|
Cascade Routerkrusch-cascade-router |
RouterArena (8,400 Qs + 420 rob.)ACL 2026 LLMRouterBench ( 12,566 Qs × 13 LLMs)Martian RouterBench ( 36,497 0-shot + 36,483 5-shot × 11 LLMs) |
0.7883 RouterArena CI (80.72% Acc @ $0.2117/1K)0.4269 #1 Pareto (-83.95% cost, 1.27ms)0.7488 / 0.7695 #1 ID AIQ (-72.63% @ 98% GPT-4) & 0.7268 / 0.7455 #1 OOD AIQ-48.0% TTFT live SSE · 51.67% Pass@2 |
Tops Paix2 (0.7763), KT-ModelRouter (0.7628), vLLM-SR (0.7486), Azure-Model-Router (0.7042), Martian ($4.83/1K), NotDiamond ($4.10/1K), RouteLLM (25.25% vs. 8.75% unseen ARC-AGI) & KNN/SVM/MLP/ZeroRouter across ID + Leave-One-Suite-Out OOD. |
Working Memorykrusch-context-mcp (v2.0.0) |
ICLR 2026 BEAM100 chats (~178.34M tok), 2,000/2,000 probes across 100K, 500K, 1M, 10M in ~8K budget |
92.58% (100K) & 93.00% (10M IE) recall0% E2E drop 100K → 1M (70.60% → 72.86%)92.50% / 98.13% 100K CR (Stock / QLoRA) |
Beats pure dense 8K across all 4/4 splits; beats cloud past.dev (gpt-5.6-luna) on Contradiction Resolution (4/4 splits), 10M IE (70.00% vs. 68.75%) & 10M MSR (29.54% / 38.33% vs. 28.17%); trails cloud on overall E2E (see §3). |
Code AST & Gitkrusch-git (v1.2.3) |
ACL 2025 CoIR (10/10 Tasks) (2,389,123 docs, 162,216 Qs)RepoBench-R (ICLR 2024) ( 47,998 Py & Java Qs across 8 splits; 0 LLM judges) |
56.40% #1 CoIR Macro NDCG@10 (73.88% R@10, 50.94% MRR@10)19.12% RepoBench Macro Acc@1 · 68.58% Acc@5 (31.33% Py / 27.45% Java cfr Easy) |
+7.42 pp NDCG@10 over CoIR BM25 (48.98%) & exceeds all 10 published CoIR Table 3 512-tok baselines incl. Voyage-Code-002 (56.26%) & E5-Mistral 7B (55.18%; see §3); +21.8% Acc@1 over pure dense on RepoBench-R, beating CodeBERT & UniXcoder. |
Evidentiary Span RAGKruschNexus (v0.2.6) |
LegalBench-RAG714 docs, 6,889 full / 776 mini character-exact span queries (0 LLM judges) |
26.74% Full Macro F1 (k=1)25.81% F1 / 44.72% R (k=2) · 47.71% R@633.95% MAUD Recall@2 |
2.29x (+128.5%) Macro F1 over fixed 160-tok dense chunks (11.70%) using the same embedder; MAUD Recall@2 (33.95%) beats published OpenAI text-embedding-3-large + Cohere Rerank Recall@64 (28.28%). |
2PC Code & SQL Harnesskrusch-coding-harness |
Aider Polyglot (225/225) (6 languages, un-skipped tests)BIRD-SQL Mini-Dev ( 500/500) (11 SQLite DBs; 0 LLM judges) |
Polyglot: 19.56% → 51.56% Pass@2 (72 healed)BIRD-SQL: 26.00% → 40.20% EX (35.75% R-VES, 100.00% valid SQL, 13 healed) |
2.64x (+32.00 pp) coding lift tying cloud Claude 3.5 Sonnet (51.6%) & beating GPT-4o (23.1%) + 1.55x (+14.20 pp) SQL lift (5.00x on toxicology, 50.00% moderate) at $0 API cost; trails multi-turn frontier reasoning (see §3). |
MCP Hub & Security Shieldkrusch-stack |
ETH SpyLab AgentDojo (v1.2.2) (1,046 eps: 97 benign + 949 attacks)UC Berkeley BFCL v3 Live ( 2,251/2,251 across all 6/6 splits in 64-tool hub) |
AgentDojo: 19.28% → 0.00% ASR (0/949), 61.86% / 69.07% Benign (83 floor blocks)BFCL v3: 59.88% → 66.28% Micro, 84.69% Irrel., -80.67% schema tok |
Eliminates all 183 indirect prompt-injection compromises on raw gpt-oss:120b (57.14% slack, 52.78% banking) with 0.00 pp benign loss; cuts 64-tool MCP schema tokens from 7,894 → 1,526 tok/turn while lifting abstention +17.46 pp & healing 29 schema calls. |
2. How the Stack Compares Against Three Architecture Archetypes
A. vs. Standard Open-Source "Wrapper" Stacks
Typical open-source agent stacks glue LangChain or LlamaIndex splitters (fixed 500-token windows) to a single vector store, stuff every MCP tool schema into the system prompt, pass raw untrusted tool outputs straight back into the model, and allow coding or SQL agents to execute unverified 1-shot generations. Our controlled ablations isolate why each of those defaults breaks at scale:
- Out-of-Distribution Routing Collapse & Preflight Latency: Supervised routers fit in-distribution benchmarks well, then degrade sharply when domains shift. On ACL 2026
LLMRouterBench,RouteLLM(8.75%) andMLP(9.25%) collapse on unseenARC-AGIreasoning tasks while zero-shot structural complexity gating + isotropic8Ksnowflake-arctic-embed2centroids reach25.25%and #1 overall Pareto distance (0.4269). Independently on MartianRouterBench(arXiv:2403.12031Sec. 5.2,36,4970-shot+36,4835-shotrows),KNN(0.6648),SVM(0.6363), andMLP(0.5572) all collapse below non-predictiveZeroRouter(0.6941) under Leave-One-Suite-Out OOD, whereasKruschZeroShotRouter(0.72680-shot/0.74555-shot) andKruschCascadeRouter(0.7083/0.7389) rank #1 and #2 aboveZeroRouterwhile also taking #1 In-Distribution MicroAIQ(0.7488/0.7695). On multi-stepAider Polyglot(n=60), replacing a569.51ms7BLLM preflight classifier with deterministic compiler/test failure routing (0.395ms,1,442xfaster) liftsPass@2from21.67%to51.67%(2.38x). - Structure-Preserving Indexing vs. Fixed Token Windows: Holding
snowflake-arctic-embed2(1024d) constant onLegalBench-RAG, replacing fixed160-token windows (11.70%F1) withKruschNexushierarchicalSection → Clauseparsing + contextual section-path headers + localmxbai-rerank-large-v2cross-encoder reranking lifts span-exact Macro F1 by+128.5%(26.74%). Across all10/10ACL 2025CoIRtasks (2,389,123docs &162,216queries),krusch-gitAST-spine + identifier subtoken hybrid RRF reaches56.40%MacroNDCG@10(+7.42 ppover BM2548.98%, liftingcodefeedback-mt+8.00 ppto60.23%andsynthetic-text2sql+4.22 ppto48.71%) while beating pure dense vectors across all8/8RepoBench-Rsplits. - 2PC State Grounding, Deferred MCP Discovery & Taint-Tracked Tool Guards: Staging code patches behind
TruncationGuard+Verify-on-Stopheals72failedAider Polyglotsuites (+32.00 pp), while read-onlynode:sqliteFK/cell-value introspection + 2PC SQL self-healing liftsBIRD-SQL Mini-Devfrom26.00%to40.20%EX (100.00%valid SQL across500/500queries) at just0.09extra calls/query. Mounting a64-tool Enterprise MCP hub on all2,251UC BerkeleyBFCL v3Live queries,createDeferredToolBridge+ schema-repair guard cuts prompt schema tokens by-80.67%(7,894 → 1,526tok/turn) while lifting Micro accuracy from59.88%to66.28%(+144queries) and irrelevance abstention from67.23%to84.69%(+17.46 pp). And on ETH SpyLabAgentDojo v1.2.2(1,046episodes), taint-tracked untrusted boundary delimiting + deterministic sink-provenance policy floors drive indirect prompt-injection ASR from19.28%(183/949) down to0.00%(0/949) with zero benign utility degradation.
B. vs. Commercial Cloud Router, Memory, Code & Legal Stacks
- Cloud Routing Economics: In official
RouteWorks/RouterArenaGitHub CI,krusch-cascade-routerachieves0.7883(80.72%accuracy) at$0.2117 / 1Kqueries—surpassing commercial routers such asAzure-Model-Router(0.7042),Martian(0.5756@$4.83/1K,22.8xcostlier), andNotDiamond(0.5729@$4.10/1K,19.4xcostlier). On MartianRouterBench(0-shotID,n=10,953eval),KruschCascadeRouterretains98%ofGPT-4accuracy at$9.89vs.$36.15(-72.63%cost,504.7 µs/q—2.83xfaster and half the cost ofKNN$18.71) and95%ofGPT-4at$6.08(-83.18%). On live multi-GPU generation, speculative SSE logprob/loop stream abort (Path B) cuts120BTTFT by-48.0%(1,694.5ms → 880.7ms) and compute cost by-37.4%even with all325aborted streams (58,743wasted tokens) strictly billed. - Contradiction & 10M Multi-Session Memory: Packing a fixed
~8K-token slice (0.66%of a10M-token chat) on zero-Dockernode:sqlite,krusch-context-mcp v2.0.0shows zero E2E degradation from100K→500K→1M(70.60% → 71.82% → 72.86%onhermes3) and beats cloudpast.dev(openai/gpt-5.6-luna) on Contradiction Resolution across all4/4splits (92.50%Stock /98.13%SRE-QLoRA vs.78.13%at100K;89.64%vs.78.57%at500K;77.68%vs.75.36%at1M;78.75%vs.73.13%at10M) and on10MMulti-Session Reasoning (29.54%Qwen /38.33%Hermes vs.28.17%). - Air-Gapped Code & Legal Retrieval Precision: On
MAUDmerger agreements (1,676queries),KruschNexushits33.95%character-exactRecall@2locally—exceeding published OpenAItext-embedding-3-large+ Cohere RerankRecall@64(28.28%) while retrieving32xfewer spans. On ACL 2025CoIR(10/10tasks,2.39Mdocs),krusch-git's local1024dhybrid RRF (56.40%NDCG@10) tops proprietaryVoyage-Code-002(56.26%) andOpenAI-ada-002(53.66%; see §3 context-window disclosure).
C. Clean-Room Auditability vs. Unverified Leaderboard Claims
Every run in our benchmark archive passes 68 / 68 automated integrity gates: (1) loopback air-gap verification (127.0.0.1:11434, cloud API keys unset), (2) runtime JavaScript Proxy traps, opaque RPC session tokens, and Python pre-eval column stripping on ground-truth answer/SQL/qrel/injection fields that block oracle access before inference, (3) RestrictedUnpickler + SafeZipExtractor guards, read-only DatabaseSync SQL enforcement, full-corpus 2,389,123-doc anti-shrinkage checks, and zero hardcoded attacker literals on AgentDojo, (4) mandatory Exercism test un-skipping + pristine test SHA-256 checks, and (5) zero LLM self-judging (deterministic compiler, SQL set-equivalence, AST bijection, and math verifiers on 9 benchmarks; dual cross-family open-weights referees on BEAM).
3. Where Frontier Cloud Stacks Still Beat Us (Honest Gaps & Open PRs)
-
1. Aggregate
BEAME2E Reader Ceiling (70.6%–73.5%Open-Weights vs.86.2%Hindsight/92.1%past.dev): Three distinct factors drive this gap:- Cross-family referees vs. cloud self-judging: We grade open-weights
gpt-oss:120b(5.1Bactive MoE) with two independent cross-family open-weights judges (qwen2.5:32bandhermes3:latest,81%–88%binary agreement). By contrast,past.dev's92.1%usesopenai/gpt-5.6-lunaas both reader and judge. - Exact-position ordering rubrics: On
Event Ordering(100K),krusch-context-mcp v2.0.0retrieves81.19%of gold turns, yetqwen2.5:32bscores9.68%whilehermes3:latestscores43.17%(vs.100%past.dev) becauseqwen2.5:32bawards0.0whenever a 10-event timeline shifts by one slot. - Passive
supersedes_id = NULLingestion onKnowledge Update: Despite97.50%retrieval recall at100K, E2E QA lands at37.5%–52.5%(vs.86%–92.5%past.dev) because our zero-heuristic benchmark loader ingests raw chat turns withsupersedes_id = NULL, leaving outdated historical turns active in the8Kwindow. In production IDE sessions, coding agents explicitly invokekrusch_context_revise({ action: "supersede" })to mark superseded facts inactive at the SQLite/Postgres layer.
- Cross-family referees vs. cloud self-judging: We grade open-weights
-
2. Multi-Turn Frontier Reasoning Upper Bound on Coding & Text-to-SQL (
51.56%Polyglot&40.20%BIRD-SQLvs.65%–88%+Cloud): Lifting open-weightsgpt-oss:120bat$0API cost from19.56% → 51.56%(116/225) onAider PolyglotmatchesClaude 3.5 Sonnet(51.6%) and beatsGPT-4o(23.1%), and liftingBIRD-SQL Mini-Devfrom26.00% → 40.20%EX (100%valid SQL at1.09calls/query) recovers+14.20 ppwithout fine-tuning—yet109/225hard algorithmic C++/Rust/Go/Java suites and complex multi-join SQL aggregates still separate single-retry open-weights MoEs from multi-turn/multi-candidate frontier reasoning pipelines (o3,gpt-5,Claude 4,Gemini 4 Argonat75%–88%+coding and65%–75%+multi-candidate SQL). That gap is why our Cascade Router retains an L3 frontier escalation tier for the hard tail. -
3. Monolingual English Feature Variance on Held-Out CJK OOD (
0.0811leave-chinese-out0-Shot): On MartianRouterBench0-ShotLeave-One-Suite-Out OOD, learnedKruschCascadeRouterranks #1 among learned routers on 7-suite MacroAIQ(0.6873) and #2 overall MicroAIQ(0.7083, behind zero-shotKruschZeroShotRouterat0.7268), yet drops toAIQ = 0.0811on held-outchinese(n=236, pullingMacro-9to0.6156) because training exclusively on English0-shotsuites producesstd(cjk_ratio) ≈ 0against the1e-4z-score variance floor. In-distribution0-shotchineseranks #1 (0.4880) and5-shotOODchineserecovers to0.3059; zero post-hoc test tuning was applied. -
4. ACL 2025
CoIRContext-Length Protocol Difference (8,192-Token Production Window vs. Table 3512-Token Truncation): In the ACL 2025CoIRpaper's Table 3, all 10 baseline retrievers (includingVoyage-Code-00256.26%andE5-Mistral 7B55.18%) were evaluated under a uniform512-token truncation cap so legacy512-token encoders could be compared side by side. Ourkrusch-gitrun (56.40%10-task MacroNDCG@10across all2,389,123unshrunk docs) evaluatessnowflake-arctic-embed2:latestat its native8,192-token production context window + AST spine headers—reflecting real repository indexing while accounting for part of the margin on long-document tasks such asappsandstackoverflow-qa. -
5. Open Upstream Leaderboard Submissions (Explicit Status):
RouteWorks/RouterArena(PR #169): Scored0.7883by the officialRouteWorksgithub-actions[bot]CI workflow across all8,400queries +420robustness perturbations; PR #169 is open and awaiting maintainer merge onto the upstream leaderboard.withmartian/routerbench(kruschdev/routerbench:feat/krusch-cascade-router): Drop-inAbstractRouterimplementation (KruschCascadeRouter+KruschZeroShotRouter) and 4-regime ID/OOD harness published on our public fork branch and ready for upstream PR submission.ETH SpyLab AgentDojo,UC Berkeley BFCL&Aider Polyglot: Our full1,046-episodeAgentDojo v1.2.2(0.00%ASR),2,251-queryBFCL v3Live, and225/225Aider Polyglotruns execute the official upstream suites inside clean-room harnesses; upstream Python adapter PR playbooks forethz-spylab/agentdojoandAider-AI/polyglot-benchmarkremain unsubmitted next steps.
-
6. Upstream Dataset Hygiene Notes:
Two upstream rows in
RepoBench-R([5522, 7591]inpython_cff/test_easy) carry out-of-boundsgold_snippet_indexpointers and are deterministically quarantined (47,998 / 48,000evaluated). In MartianRouterBenchrouterbench_5shot.pkl,28upstream rows have missing model cells across the 11-model matrix and are deterministically filtered so all 6 routers evaluate the identical36,483 / 36,511complete rows. In UC BerkeleyBFCL v3BFCL_v3_live_relevance.json, upstream ships a duplicate row ID (live_relevance_3-3-0at lines3and4with distinct prompts), deterministically disambiguated aslive_relevance_3-3-0__dup2so all18 / 18rows (2,251 / 2,251Live queries) execute without overwrite. In ICLR 2026BEAM100K, upstream Conversation 14 Knowledge Update Q1 asks about a nonexistent"running shoe"topic; our verifier assertsscore == 0.00(canary_conv14_ku_q1_zero: true).
4. Raw Artifacts & 60-Second Cryptographic Verification
Every raw per-query JSON audit log (21 files, SHA-256 pinned) and 13 Hugging Face Dataset Viewer splits (35 files / 350.90 MiB) are published under CC-BY-4.0 at krush420/sovereign-g4-benchmarks, alongside the interactive Pareto & trajectory explorer at krush420/sovereign-router-arena and repository-level reproduction docs in kruschdev/krusch-stack.
# Clone the raw clean-room audit logs & verify all SHA-256 digests in <60s
git clone https://huggingface.co/datasets/krush420/sovereign-g4-benchmarks
cd sovereign-g4-benchmarks
python3 -c '
import hashlib, json, pathlib
rows = [json.loads(l) for l in pathlib.Path("data/scorecard_summary.jsonl").read_text().splitlines()]
for r in rows:
if r["audit_log_file"].startswith("raw_audit_logs/"):
digest = hashlib.sha256(pathlib.Path(r["audit_log_file"]).read_bytes()).hexdigest()
assert digest == r["audit_log_sha256"], f"Mismatch: {r[\"audit_log_file\"]}"
print("VERIFIED:", r["audit_log_file"], digest[:16])
'
Inspect the Raw Logs or Install KruschStack Locally
npx krusch-stack init --defer-tools · 68/68 SHA-256 Clean-Room Gates · MIT Licensed