Skip to main content
Promptfoo Evaluation Harness · 320-Test Combined Suite (Workhorse Cost-Displacement + Frontier Run 11)

Hard Numbers: Testing AI Models Where They Actually Break

In multi-step production runs, unassisted models drift, give up early, and eagerly agree with flawed user assumptions. Below are the audited findings across 320 automated red-team audits evaluating 20 high-consequence production traps across Gemini 2.5 Flash, GPT-4o-mini, Claude Sonnet 4.5, and GPT-4o using live, automated rule retrieval.

Methodology, Audit Controls, and Limitations
Workhorse Cost-Displacement
100.0% 20/20 Traps ($0.020)

Gemini 2.5 Flash + Ejentum Graph

Achieves 20/20 compliance (mean score 1.000) at $0.0196 total run cost, outperforming Claude Sonnet 4.5 Vanilla (85.0%) and Wrapper (95.0% at ~$0.30) for 15x lower inference cost.

Small Model Structural Lift
75.0% +15% vs Vanilla ($0.009)

GPT-4o-mini: 60% to 75% Compliance

Ejentum Single ($0.0090) and Graph ($0.0104) lift GPT-4o-mini from 60.0% vanilla and 65.0% wrapper to 75.0% (15/20), beating raw GPT-4o (60.0% at $0.15) at 1/16th the inference cost.

Stochastic Frontier Lift
+15.0% GPT-4o vs Wrapper

GPT-4o Elevated: 55% to 70%

Where a static system prompt wrapper degraded GPT-4o to 55.0% via attention dilution, targeted ~150-token Ejentum scaffolds elevated compliance to 70.0% (+15% over wrapper, +10% over vanilla).

Live Unassisted Retrieval
1.82ms 20/20 Top-1 Accuracy

Zero Secondary LLM Round-Trips

Verified 100% (20/20) unassisted top-1 ability selection across all benchmark traps in 1.82ms cold (0.0029ms warm LRU cache hit) from precompiled binary and FTS5 indexes.

In-Process Rust Engine
114ns Wasm & PyO3 Native

Sub-Microsecond Invariants

Zero-allocation spatial verifiers, Mermaid DAG traps, and HMAC attestation running at 114ns to 8us in-process, bypassing WAN network hops entirely.

Gemini 2.5 Flash & GPT-4o-mini (All 8 Test Arms · Independent GPT-4o Grader)

Temperature: 0.2 · 20 Scenarios · Sample size: N=160 · Uncached live evaluation

System Configuration Underlying LLM Scaffold Architecture Pass Rate Mean Score Tokens (Prompt / Out) Est. Run Cost Cost-Displacement Verdict
Ejentum Enterprise (Graph) Gemini 2.5 Flash Multi-Hop Synergy DAG 100.0% (20/20) 1.000 19,125 / 60,678 $0.0196 +15% vs Vanilla; beats Sonnet 4.5 at 15x lower cost
Ejentum Core (Single) Gemini 2.5 Flash Single Domain Invariant 95.0% (19/20) 0.988 10,378 / 50,866 $0.0160 +10% vs Vanilla; 17% fewer output tokens than Wrapper
Prompt Wrapper Baseline Gemini 2.5 Flash Static System Checklist 95.0% (19/20) 0.992 5,881 / 61,323 $0.0188 Ties Single; higher output token verbosity
Gemini 2.5 Flash Vanilla Gemini 2.5 Flash None (Raw API) 85.0% (17/20) 0.973 1,361 / 43,442 $0.0131 Failed 3/20 traps (stampede, sharding, DNS TTL)
Ejentum Enterprise (Graph) GPT-4o-mini Multi-Hop Synergy DAG 75.0% (15/20) 0.901 19,343 / 12,517 $0.0104 +15% vs Vanilla, +10% vs Wrapper; highest mean score
Ejentum Core (Single) GPT-4o-mini Single Domain Invariant 75.0% (15/20) 0.876 11,151 / 12,185 $0.0090 Beats raw GPT-4o (60% at $0.15) at 1/16th the cost
Prompt Wrapper Baseline GPT-4o-mini Static System Checklist 65.0% (13/20) 0.866 5,903 / 14,715 $0.0097 Failed 7/20 traps; 10 points below Ejentum
GPT-4o-mini Vanilla GPT-4o-mini None (Raw API) 60.0% (12/20) 0.855 1,403 / 12,712 $0.0078 Failed 8/20 critical traps

Claude Sonnet 4.5 & GPT-4o Across Execution Tiers (All 8 Test Arms)

Fixed temperature: 0.2 · 20 Scenarios · Sample size: N=160 (8 configurations × 20 traps)

System Configuration Underlying LLM Scaffold Architecture Pass Rate Mean Score Drift Resilience Verdict Est. Run Cost
Ejentum Core (Single) Claude Sonnet 4.5 Single Domain Scaffold 95.0% (19/20) 0.975 +10% vs Vanilla; ties prompt wrapper ~$0.30
Ejentum Enterprise (Graph) Claude Sonnet 4.5 Multi-Hop Synergy Graph 95.0% (19/20) 0.975 Parity with Single; ties prompt wrapper ~$0.34
Prompt Wrapper Baseline Claude Sonnet 4.5 Standard System Prompt 95.0% (19/20) 0.975 High compliance on tested assertions ~$0.30
Claude Vanilla Baseline Claude Sonnet 4.5 None (Raw API) 85.0% (17/20) 0.955 Failed 3/20 traps (e.g. TRAP-01 stampede omission) ~$0.26
Ejentum Core (Single) GPT-4o Single Domain Scaffold 70.0% (14/20) 0.874 +15.0% Lift over Wrapper (+10% over Vanilla) ~$0.22
Ejentum Enterprise (Graph) GPT-4o Multi-Hop Synergy Graph 70.0% (14/20) 0.864 +15.0% Net Lift over Wrapper (+10% over Vanilla) ~$0.25
GPT-4o Vanilla Baseline GPT-4o None (Raw API) 60.0% (12/20) 0.825 Failed 8/20 critical traps ~$0.15
Prompt Wrapper Baseline GPT-4o Standard System Prompt 55.0% (11/20) 0.821 Failed 9/20 critical traps (attention dilution) ~$0.18
Workhorse Economics

15x to 16x Cost Displacement

Pairing fast workhorse models with sub-2ms Ejentum scaffolds lets engineering teams replace $0.15 to $0.30 frontier calls with $0.009 to $0.020 workhorse calls while matching or exceeding frontier compliance (100% on Gemini 2.5 Flash + Graph; 75% on GPT-4o-mini vs 60% raw GPT-4o).

Attention Concentration

Why Targeted RAR Beats Static Prompts

On OpenAI models (GPT-4o and GPT-4o-mini), generic static checklists suffer from attention dilution (scoring 55% and 65%). Injecting only the single ~150-token domain invariant matched to the live query yields a consistent +10% to +15% compliance lift.

Audit & Retrieval Integrity

100% Unassisted Routing in 1.82ms

All 20 adversarial scenarios are routed live via HybridRetriever (binary vector cosine similarity + SQLite FTS5 BM25 + structural intent signals) with zero oracle hints, graded by an independent model alongside deterministic regex assertions.

Runtime Governance vs. Legacy Guardrails (NVIDIA, Guardrails AI, Patronus, Lakera)

Architectural evaluation across 8 enterprise governance dimensions

Dimension NVIDIA NeMo Guardrails Guardrails AI Patronus AI (Lynx) Lakera Guard Ejentum Enterprise
Intervention Point Middleware / Dialogue Output Validator Post-Hoc Output Scorer Perimeter Proxy In-Flight Cognitive + Tool Boundary
Tool Sequence Invariants Colang flows (complex setup) None None None Stateful Temporal Logic (RequirePrior/Forbid)
Contradiction Detection LLM self-check (~800ms) Regex/Validator (~10ms) Specialized NLI 70B (~600ms) None Sub-millisecond Local NLI (<1ms) + Fallback
Adaptive Risk Budgeting Static rules None None Threshold scoring BAVAR Dynamic Tiering (Token/Latency Clamping)
Schema Coercion + Epistemic Gate Format rail only Pydantic validation only None None Schema Repair + Reasoning Authenticity Gate
Anti-Sycophancy Defense None None Weak None Epistemic Falsification Pass (Active)
CoT Forgery Resistance Vulnerable Vulnerable Masks errors Vulnerable Sentinel Guards + Intermediate Checkpoints
Inference Overhead +500 to 1,500ms +50 to 150ms +400 to 1,200ms +30 to 80ms 0ms (Scaffold) / <1ms (Local Checks)
Ingress Boundary vs. In-Flight Governance

vs. Lakera Guard & Azure Prompt Shields

Lakera is an edge firewall. If an injection bypasses its regex or classifier perimeter, it has zero control over what the model does next.

Ejentum provides defense-in-depth: even if an adversary slips past the router, the injected cognitive scaffold and tool invariants constrain execution at the tool boundary.

Secondary LLM Round-Trips vs. In-Process Scaffolding

vs. NVIDIA NeMo Guardrails

NeMo requires setting up secondary LLM calls for input and output rails, adding 500 to 1,500ms of latency per turn.

Ejentum's compiled compact mode and deterministic guards execute in sub-millisecond time with zero additional LLM hops.

Syntax Coercion vs. Reasoning Grounding

vs. Guardrails AI

Guardrails AI forces valid JSON schemas via Pydantic.

Ejentum matches Guardrails AI in JSON extraction and syntax repair, but adds an Epistemic Invariant Check: it blocks naked or ungrounded JSON outputs that lack prior verified reasoning traces.

Heavy 70B Offline Evaluators vs. Sub-Millisecond Local NLI

vs. Patronus AI Lynx

Patronus Lynx (using an 8B/70B model) remains superior for deep narrative Natural Language Inference across complex medical or financial texts.

However, Ejentum's LocalNLIEngine solves the high-frequency 80% problem (catching direct antonym clashes, negation flips, and numeric discrepancies) in under 0.2ms at zero API cost.

The 20 High-Consequence Failure Modes

Every scenario in the benchmark suite corresponds 1-for-1 to the open-source eval/benchmark_dataset.json file, testing production traps where models commonly validate flawed premises, hallucinate state, or violate safety invariants.

Distributed Systems

Concurrency & Resiliency

  • TRAP-01: Cold-Cache Stampede (FLUSHALL & Pod Restart)
  • TRAP-06: Distributed Split-Brain & Quorum Isolation
  • TRAP-08: Concurrency Race Condition (SELECT / UPDATE TOCTOU)
  • TRAP-09: API Idempotency on 504 Network Timeout
  • TRAP-15: Synchronous Microservice Timeout Cascade
Data & Infrastructure

Database & Stream Traps

  • TRAP-02: 50M-Row PostgreSQL Migration Exclusive Locks
  • TRAP-11: Kubernetes Node.js OOMKilled Cascade
  • TRAP-12: Kafka At-Least-Once Clickstream Deduplication
  • TRAP-17: Monotonic created_date Sharding Write Hotspot
  • TRAP-18: Destructive DB Backup Rollback & State Loss
Security & Boundaries

Crypto, Auth & Injection

  • TRAP-07: Password Hashing Misuse (Fast SHA-256 vs Argon2id)
  • TRAP-10: Fabricated Vulnerability (CVE-2026-99412) Trap
  • TRAP-13: Indirect Prompt Injection Boundary (PWNED Override)
  • TRAP-16: CORS Wildcard Origin with Allow-Credentials
  • TRAP-19: 24-Hour DNS TTL Immediate Cutover Cliff
Causal Diagnosis

Sycophancy & Bias Traps

  • TRAP-03: False Dichotomy Performance Tuning (Shard vs Scale)
  • TRAP-04: Sycophantic Complexity (BubbleSort vs std::sort)
  • TRAP-05: Premature Convergence on Month-1 SaaS Churn
  • TRAP-14: Time-Series Global Normalization Data Leakage
  • TRAP-20: Sunk-Cost Architecture Bias (Custom Rust Graph DB)

Local Engine Retrieval (<2ms) vs. Regional WAN Round-Trip (N=600)

3 Regional Runs (us-east-1, westus2, eu-west-1) · 200 Iterations / Run · Precompiled Binary + SQLite FTS5

Execution Layer / Operation Profile / Region Min (ms) Median p50 (ms) Mean (ms) p95 (ms) p99 (ms) Architectural Takeaway
Local Warm Cache (LRU Hit) In-Memory Engine 0.0020 0.0029 0.0031 0.0039 0.0076 Sub-5 microsecond repeated task lookup
Local 933-Edge DAG Traversal (Depth 2) In-Memory Engine 0.0715 0.0825 0.0858 0.1031 0.1450 2-hop prerequisite/enhancement graph assembly
Local SQLite FTS5 BM25 Search In-Memory / Local SSD 0.6384 0.7310 0.7686 1.0021 1.2910 Sub-millisecond full-text keyword ranking
Local Uncached Hybrid Retrieval us-east-1 / westus2 / eu-west-1 1.6931 1.9300 1.9740 2.3530 2.6840 Full 311-vector cosine + BM25 + intent routing
Cold-Boot Binary Index Load Process Startup (1.28 MB) 10.920 11.434 12.074 13.557 13.557 One-time startup deserialization (zero LLM calls)
External WAN HTTPS Round-Trip us-east-1 / westus2 / eu-west-1 93.56 132.62 158.40 317.18 392.03 Includes internet transit + TLS; mitigated via once-per-task Graph injection & fail-open SLA
Transparency Note on Latency: Server-side retrieval inside the Ejentum engine completes in 1.93ms median uncached (0.0029ms warm cache, 0.73ms FTS5). When calling https://api.ejentum.com over the public internet from external cloud regions, standard WAN network transit adds ~90ms to 150ms per HTTP call. To avoid compounding network latency across 30-step loops, production agents call mode="graph" once at task entry (fetching the 2-hop prerequisite + verification DAG in a single round-trip) with a strict client-side fail-open timeout.

Sub-Microsecond Geometry Primitives & In-Process Cognitive Gates (N=10,000)

Node.js v20.19.0 (Wasm) & Python 3.12 (PyO3 ABI3) · 10,000 Iterations · In-Memory Zero-HTTP

Execution Engine Runtime Target Operation Tested Mean Latency Throughput Memory / Allocation Architectural Role
Python Native (PyO3) CPython 3.12 (ejentum_rs) Primitive compute_iou (BoundingBox) 114.3 ns 8,751,200 ops/s Zero heap alloc Sub-microsecond bounding box overlap detection
Python Native (PyO3) CPython 3.12 (ejentum_rs) Spatial Layout Verifier (Collisions & Directional) 1.03 us 968,500 ops/s Zero network transit Element collisions, containment, and directional traps
Python Native (PyO3) CPython 3.12 (ejentum_rs) Multi-Agent Handshake Gate (HMAC Attestation) 2.38 us 420,600 ops/s Cryptographic HMAC Anti-sycophancy check, command filters, signed receipts
Python Native (PyO3) CPython 3.12 (ejentum_rs) Diagram Semantic Trap (Mermaid DAG + Cycle DFS) 3.66 us 273,200 ops/s In-memory graph Kahn's DAG acyclicity and dangling edge detection
WebAssembly (Wasm) Node.js v20 (pkg-node Wasm) Spatial Layout Verifier (Full Invariants) 3.09 us 324,000 ops/s Wasm Linear Memory Microsecond collision and directional placement gate
WebAssembly (Wasm) Node.js v20 (pkg-node Wasm) Diagram Semantic Trap (Mermaid DAG + Cycles) 4.05 us 246,890 ops/s Wasm Linear Memory Referential integrity checks for generated flowcharts
WebAssembly (Wasm) Node.js v20 (pkg-node Wasm) Multi-Agent Handshake Gate (Attestation) 5.60 us 178,550 ops/s Wasm Linear Memory In-process auditor review verification and receipt minting
TypeScript SDK Facade Node.js v20 (@ejentum/wasm) Spatial Layout Verifier (Typed API + Normalization) 5.70 us 175,520 ops/s V8 Object Mapping Ergonomic TypeScript wrapper for full layout verification
TypeScript SDK Facade Node.js v20 (@ejentum/wasm) Diagram Semantic Trap (Typed API) 5.50 us 181,715 ops/s V8 Object Mapping High-level detectCycles() and verify() helper calls
TypeScript SDK Facade Node.js v20 (@ejentum/wasm) Multi-Agent Handshake Gate (Typed Facade) 8.07 us 123,960 ops/s V8 Object Mapping Agent proposal validation with HMAC attestation receipt
Zero Network Transit

100,000x Latency Reduction

While public internet WAN round-trips add 90ms to 150ms per request, in-process PyO3 native execution runs in 1.03us and Wasm in 3.09us. Tight autonomous loops can verify hundreds of spatial and reasoning invariants per second without paying network tax.

Universal Embedding

Node.js, Browser, Edge & Python

The core engine compiles to both Wasm (usable in Cloudflare Workers, Vercel Edge, browsers, and Node.js) and native CPython ABI3 (.pyd / .so), providing identical invariant guarantees across all frontend and backend runtimes.

Cryptographic Safety at Scale

420,000 Handshakes / Second

Multi-agent coordination gates enforce anti-sycophancy rules, prune destructive shell commands, and generate HMAC-SHA256 attestation receipts in 2.38us. Multi-agent swarms can cross-audit every turn with zero noticeable throughput degradation.

Reproducibility

We encourage third-party security auditors, enterprise architects, and researchers to verify our findings independently. The benchmark runner, YAML configuration, test scenarios, and grading assertions are open source.

# Clone and replicate Frontier, Workhorse, Latency, and In-Process runs directly on your machine
$ git clone https://github.com/ejentum-ai/benchmarks.git
$ cd benchmarks && python eval/generate_promptfoo_tests.py
$ npx promptfoo@latest eval -c promptfooconfig_workhorse.yaml --no-cache
$ python benchmarks/run_latency_benchmarks.py --region westus2 --iterations 200
$ cd crates/ejentum-wasm && node bench_wasm.js
$ cd crates/ejentum-rs && python bench_pyo3.py
$ cd sdk/typescript && node bench.js