Bluwing transforms natural language instructions into validated, grounded tool calls through pre-compiled brick indices, sub-millisecond graph traversal, and dynamic tool masking. Understanding this pipeline helps you design sharper tool descriptions and diagnose routing behavior.
The Resolution Pipeline
Every resolution request passes through four deterministic stages:
Computes canonical tool names and 32-byte content hashes
Matches existing ready bricks in <1ms or compiles JIT via Kiln
Traverses AVX2 SIMD vector index with dynamic tool masking
Binds typed arguments via Sinkhorn-Knopp bijective alignment
1. Schema Validation & Hashing
When you pass inline tools with model: "bluwing", the gateway immediately validates your schemas and computes canonical 32-byte content hashes:
- Tools are sorted deterministically by name.
- Hash accounts for function signatures, descriptions, parameters, and required arrays.
- Matching against existing ready bricks completes in under 1 millisecond.
2. Dynamic Tool Masking & Subsets
You don't need to rebuild an index for every minor variation of tools:
- If your request passes 3 tools that belong to a pre-compiled 70-tool brick, Bluwing executes on the pre-compiled brick with zero compilation delay (35 ms).
- Non-passed tools are strictly masked from candidate generation and parameter extraction. The model cannot hallucinate or emit unpassed tools.
- If the tools are completely novel, Bluwing compiles an ephemeral brick Just-In-Time (JIT) and resolves the request within the same call.
3. Split & Candidate Retrieval (MASON)
Compound user sentences often require multiple operations. For example:
"Find the invoice for Acme Corp and post a summary to #finance"
MASON (C++23) decomposes the prompt and walks hierarchical vector clusters:
- Evaluates candidate tools using AVX2 SIMD dot products and BM25 Okapi lexical scoring.
- Calibrates probabilities via Platt scaling and EVT Weibull tail thresholds.
- If confidence falls below the deadband, it returns
no_toolto prevent false positives.
4. Parameter Extraction & Grounding (MORTAR)
For each selected tool, arguments are parsed from the prompt and supplied facts:
- Strict Typing: Values are validated against JSON Schema types and enums.
- Bijective Parameter Grounding: Uses Sinkhorn-Knopp optimal transport to associate tokens with argument slots.
- Temporal Normalization: Relative dates like "tomorrow at 3pm" resolve to ISO timestamps.
- Zero Hallucination Guarantee: Arguments must be grounded in user words or supplied
facts. Missing required arguments triggerneeds_inputrather than an invented value.
Traditional LLM Calling vs. Bluwing Engine
| Metric | Traditional LLM Tool Calling | Bluwing Compiled Engine |
|---|---|---|
| Tool Definition Tokens | 5,000 to 25,000+ tokens per conversational turn | 0 tokens (compiled into high-speed index) |
| Token Cost | $0.02 – $0.08 per turn ($20 – $80 per 1,000 turns) | $0.015 per 1,000,000 input tokens (~$0.0003 per 1,000 turns) |
| Execution Latency | 800 ms – 2,500 ms | 18 ms – 40 ms |
| Compilation Latency | N/A | 54 ms (30 tools) to 1.08s (70 tools) via parallel Perplexity embeddings |
| Scaling Limit | Degrades sharply past 20–30 tools | Scales cleanly to 10,000+ tools per brick |
| Dynamic Tool Masking | Requires resending filtered schemas into prompt | Instant zero-overhead masking ($T_{\text{in}} \subseteq T_{\text{brick}}$) |
| Hallucination Risk | Models frequently invent missing arguments | Zero hallucination: Missing values trigger needs_input |
| Argument Provenance | Opaque black box | Grounding trace: Exact character offsets for every argument |
Dependency Graphs & Sequential Calls
When a compound request contains steps that depend on each other, Bluwing returns them with dependency ordering:
- Independent calls (e.g. fetching weather and checking calendar) are returned together with
parallel: true. - Dependent calls (e.g. creating a customer record then creating an order with the returned
customer_id) list the prerequisite call independs_on.
Generates call_01 with name and email
call_02 requires customer_id produced by call_01
Listed in pending until call_01 yields customer_id
What Bluwing Does Not Do
- Does Not Run Tools: Bluwing returns the structured JSON call objects; your backend executes them with your own credentials and databases.
- Does Not Store Conversational State: Each turn is stateless. Contextual session details should be passed via
facts. - Does Not Generate Chat Output: Your existing LLM or frontend handles user conversational replies.