The 3-tier engine architecture
A single verification request flows through the tiers: proof engines attempt a deterministic proof, policy enforcement engines apply runtime rules, and advisory engines contribute structured diagnostics. Only a deterministic proof — whether from the proof tier or a deterministic sub-path of a hybrid engine — can produce aVERIFIED status.
As of v6.0.0 every trust-boundary path returns the unified
DiagnosticResult model — agent-safe, developer, and proof layers. See the Verification Diagnostics guide for the full model.Tier 1: Proof engines
Proof engines produce mathematical evidence using symbolic solvers and formal methods. They are the only tier whose entire surface emitsVERIFIED, and VERIFIED always requires a proof_ref. (Hybrid advisory engines can also emit VERIFIED, but only on a deterministic sub-path — see Tier 3.)
Guarantee. For supported proof domains, hallucinations cannot bypass deterministic verification — an answer either has a reproducible proof or it is not VERIFIED.
When to use. Any claim that can be reduced to arithmetic, algebra, a constraint system, an AST invariant, a SQL structure, or a schema check.
Example proof-engine output:
Tier 2: Policy enforcement engines
Policy enforcement engines apply deterministic policies to inputs, contexts, and tool calls at runtime. They produce enforcement decisions —BLOCK or UNVERIFIABLE — but never a mathematical proof.
Guarantee. Rule-based, reproducible enforcement. The same input against the same policy produces the same decision, with a full decision trace.
When to use. Runtime guardrails on agents, MCP tools, RAG contexts, configs, and processes — anywhere you need a deterministic gate but the underlying question is not a math problem.
Example policy-engine output:
Tier 3: Advisory engines
Advisory engines run structured heuristic analysis on inputs where a formal proof is not available. Heuristic and model-based paths emitAdvisoryCheck records only — they can never emit VERIFIED, and their signals are carried as advisory_checks in the diagnostic result. The exception is a deterministic sub-path inside a hybrid engine (Graph or Image), which can emit VERIFIED with a proof_ref; a purely heuristic signal never can.
Guarantee. Advisory outputs are transparent and inspectable, but not deterministic proofs. Treat them as inputs to audit and human review, not as verification statuses. An LLM or VLM fallback never overwrites a deterministic verdict.
When to use. Fact-similarity checks, knowledge-graph triples, reasoning traces, multi-model consensus, and image analysis — signals that inform a decision but should not gate execution on their own.
Some engines in this tier are hybrid: a deterministic sub-path (for example, an Image pixel check or a Graph full-triple match) can still emit
VERIFIED with a proof_ref or BLOCKED on a refutation. Only the heuristic or model fallback path is strictly advisory. The Fact engine is the exception: its deterministic path is heuristic TF-IDF analysis, so even a SUPPORTED verdict is capped at UNVERIFIABLE. Consensus is a status-preserving aggregator: it never invents a VERIFIED from disagreement, and math-translation failures fail closed.
Example advisory-only output (LLM fallback path):
UNVERIFIABLE even when a claim is supported — heuristic TF-IDF support is never a proof:
Behavior by engine type
Compare engines by the output guarantee they provide, not by a single accuracy number — different tiers are answering different questions.
For comparison to other approaches:
Engine selection
QWED auto-detects the appropriate engine based on content, then routes through the tiers:
Or specify explicitly:
Deterministic-first philosophy
Across all tiers, QWED follows a deterministic-first approach:- Try deterministic methods first (100% reproducible).
- Fall back to advisory signals only when necessary.
- Never promote a heuristic signal to
VERIFIED— advisory outputs stay inadvisory_checks.
See Determinism guarantee for how to inspect whether a response isSYMBOLICorHEURISTIC, and the Verification Diagnostics guide for the fullDiagnosticResultmodel.
Engine documentation
Proof engines
- Math engine — calculus, matrix, financial
- Logic engine — quantifiers, theorem proving
- Schema engine — JSON structure and math
- Code engine — multi-language security
- SQL engine — complexity limits
- Stats engine — Pandera invariants, Wasm sandbox
- Taint engine — data-flow analysis
Advisory engines
- Fact engine — TF-IDF and citations
- Graph engine — knowledge-graph triples
- Image engine — metadata and VLM cross-check
- Reasoning engine — multi-LLM review
- Consensus engine — parallel execution
Policy enforcement
Policy enforcement engines ship as SDK guards — see that page forSystemGuard, ConfigGuard, RAGGuard, MCPPoisonGuard, ExfiltrationGuard, SelfInitiatedCoTGuard, SovereigntyGuard, StartupHookGuard, and ProcessVerifier.