Dual-Engine Schema Pruning & Tool Selection

Calibrated tool selection for AI agents.

Prune 100 tool schemas to top candidates in 0.2ms offline, or direct-dispatch with calibrated confidence.

0.18ms offline TurboQuant -97% prompt tokens 99.5% BFCL v3 Retrieval (N=200) Zero external dependencies
Live Interactive Engine

Playground

Test real TurboQuant vector search in your browser. Type an intent or choose an example query below.

Try:
Candidate Mode:
Direct Dispatch Threshold: 85%
0.2ms zero-dep PolarQuant

Pruned Candidates (Auto)

Adaptive score drop-off

Real-Time Pruning Impact

Search Latency
0.24 ms
Offline vector search
Prompt Reduction
-91.2% tokens
Compared to 30 schemas
Unpruned Catalog ~4,680 tokens
tool-prune Candidate Set ~180 tokens

// Loading snippet...
            
Financial & Latency ROI

How much does schema pruning save?

Agents that pass entire MCP catalogs into each prompt burn thousands of redundant tokens every turn. Adjust the sliders below to calculate your savings.

5,000
500 25,000 50,000
40 tools
10 tools 60 tools 120 tools
Note: Assumes 160 tokens per tool schema (uncached input), Top-3 candidate pruning, and ~6.3ms LLM prefill latency per pruned schema (measured on 60 tools: 555ms → 195ms).

Estimated Monthly Savings

Monthly Tokens Saved
888M

Prompt tokens avoided

Monthly Cost Saved
$2,664

Direct LLM invoice savings

Total Agent Hours Saved
9.7h
~234ms saved/step (93% schema reduction)

Beyond token cost, schema pruning accelerates agent execution and unlocks smaller models: multi-model evaluation across Claude Haiku/Sonnet/Opus 5.5 confirms 97.5% selection accuracy is preserved while cutting tokens by up to 87% and slashing P50 dispatch latency down to 105ms via calibrated fast-path.

Empirical Evaluation (Full N = 200 Split)

BFCL v3 Tool Retrieval & Schema Pruning

Evaluated across all 200 queries and 443 unique tool schemas in Gorilla BFCL_v3_multiple (measuring tool-name retrieval and candidate schema recall prior to LLM argument generation, against a pre-indexed camelCase/snake_case-splitting BM25 baseline).

Engine Backend Distractor Top-1 (2–4) 100-Tool Top-5 443-Tool Top-5 100-Tool Latency Network
TypeSafe (Jev) Cloud System One 99.5% 100.0% 99.5% 84 ms Cloud API
TurboQuant (Python) Rust SIMD (turbovec) 99.0% 99.0% 97.5% 0.040 ms Offline
TurboQuant (JS) Pure JS (built-in) 99.0% 99.0% 96.5% 0.11 ms Offline
TurboQuant (Python) Pure Python (stdlib) 99.0% 99.0% 97.0% 0.93 ms Offline
BM25 Baseline Identifier-Split Lexical 94.5% 97.5% 93.5% 0.04 ms Offline
Agent Orchestration Evals (Claude 5.5 + Gemini 4 + Local SLM)

End-to-End Agent Performance (60 Tools, 79 Queries)

Evaluated with Claude Haiku 5.5 (with B=1,000 bootstrap 95% confidence intervals) and cross-validated across Claude Sonnet 5.5, Claude Opus 5.5, Claude Fable 5.2, Gemini 4 Carbon, Gemini 4 Argon, and local Gemma 3 1B.

Architecture Accuracy (95% CI) Latency (P50) Tokens / Query Roundtrips Execution Model
Tool-Prune Direct 97.5% [93.7, 100] 105 ms 397 tokens 0 turns LLM Bypassed (93.7% fast-path)
Tool-Prune + LLM 97.5% [93.7, 100] 777 ms 581 tokens 1 turn Jev Top-3 Pruned Schema (-71% tokens)
TurboQuant + LLM 93.7% [88.6, 98.7] 650 ms 270 tokens 1 turn Offline Top-5 Pruned (-87% tokens, 0 keys)
Full-Context LLM 97.5% [93.7, 100] 683 ms 2,026 tokens 1 turn All 60 Tool Schemas in Prompt
Tool-Search (BM25 + LLM) 93.7% [88.6, 98.7] 1,185 ms 469 tokens 2 turns Two-Turn Lexical Discovery
Code Mode (search + eval) 57.0% 1,530 ms 1,565 tokens 1.9 turns Multi-Turn Discovery Drop
Cross-Model Matrix (60 Tools • Accuracy / P50 Latency) Paired 79-query split
Model Full-Context (60) Offline TurboQuant + LLM Tool-Prune + LLM Tool-Prune Direct Code Mode
Claude Opus 5.5 97.5% (1,106 ms) 93.7% (1,106 ms) 97.5% (1,502 ms) 97.5% (105 ms) 74.7% (3,360 ms)
Claude Sonnet 5.5 97.5% (843 ms) 93.7% (854 ms) 97.5% (989 ms) 97.5% (105 ms) 50.6% (1,986 ms)
Claude Fable 5.2 97.5% (2,643 ms) 93.7% (1,804 ms) 96.2% (3,008 ms) 97.5% (105 ms) 50.6% (4,529 ms)
Claude Haiku 5.5 97.5% (683 ms) 93.7% (650 ms) 97.5% (777 ms) 97.5% (105 ms) 57.0% (1,530 ms)
Gemini 4 Carbon 97.5% (7,575 ms) 92.4% (7,415 ms) 96.2% (5,333 ms) 97.5% (100 ms) 62.0% (102,403 ms)
Gemini 4 Argon 97.5% (3,785 ms) 92.4% (3,676 ms) 96.2% (4,121 ms) 97.5% (100 ms) 87.3% (16,636 ms)
Gemma 3 1B (Local Ollama) 15.2% (353 ms) 68.4% (252 ms) 87.3% (359 ms) 96.2% (105 ms) N/A
Key takeaways across models: (1) On small local models like gemma3:1b, 60 unpruned tool schemas cause catastrophic context dilution (15.2% accuracy), whereas schema pruning boosts accuracy up to 87.3% (and 96.2% with direct dispatch). (2) Across Claude 5.5 and Gemini 4 models, forcing discrete API calls through two-stage Code Mode (search_tools → execute_code) drops accuracy to 50.6%–87.3% and adds a 15x–1,000x P50 latency tax compared to calibrated direct dispatch (100–105ms).
Dual-Engine Design

Architecture & Workflow

Three simple stages to eliminate agent prompt bloat and achieve deterministic sub-millisecond execution.

1

Corpus-IDF & FWHT Projection

Tool schemas (MCP, Anthropic, OpenAI) and query tokens are weighted by Corpus-IDF Count-Sketch and rotated with a Fast Walsh-Hadamard Transform in O(d log d), with zero training overhead.

Zero network • Pure local math
2

4-Bit PolarQuant & QJL Residual

Vectors are quantized to 4-bit symmetric PolarQuant intervals, while residual error vectors are captured with 1024-bit SRHT Johnson-Lindenstrauss random signs via SWAR popcount.

Calibrated [0, 1] probability range
3

Conformal Prune & Direct Dispatch

When confidence clears your threshold, dispatch deterministic tool handlers directly in under 1ms offline. When ambiguous, conformal scoring forwards only top candidate schemas to your LLM.

Save up to 98% schema tokens