Skip to main content

Welcome to QWED

"Trust, but Verify." — QWED treats LLMs as untrusted translators and uses symbolic engines as trusted verifiers.

What is QWED?

QWED (Query-Wise Engine for Determinism) is the verification protocol for AI. It provides deterministic verification of LLM outputs using symbolic engines like Z3, SymPy, and AST analysis.

┌─────────────────────────────────────────────────────────────┐
│ QWED VERIFICATION FLOW │
├─────────────────────────────────────────────────────────────┤
│ │
│ User Query ──▶ LLM (Translator) ──▶ QWED (Verifier) ──▶ ✅ │
│ ↓ (Probabilistic) ↓ (Deterministic) │
│ "2+2=5" "CORRECTED: 4" │
│ │
└─────────────────────────────────────────────────────────────┘

Why QWED?

ProblemQWED Solution
LLMs hallucinate mathSymbolic verification with SymPy
LLMs break logicSAT solving with Z3
LLMs generate unsafe codeAST analysis + pattern detection
LLMs produce SQL injectionQuery parsing + validation

Quick Start

# Install the Python SDK
pip install qwed

# Verify math
qwed verify "Is 2+2=5?"
# → ❌ CORRECTED: The answer is 4, not 5.

# Verify logic
qwed verify-logic "(AND (GT x 5) (LT y 10))"
# → ✅ SAT: {x=6, y=9}

Features

  • 8 Verification Engines — Math, Logic, Stats, Fact, Code, SQL, Image, Reasoning
  • 4 SDKs — Python, TypeScript, Go, Rust
  • 3 Framework Integrations — LangChain, LlamaIndex, CrewAI
  • Cryptographic Attestations — JWT-based verification proofs
  • Agent Verification — Pre-execution checks for AI agents

🆕 What's New in v2.0

EngineUpgradeImpact
MathCalculus, Matrix, Finance10x more use cases
LogicForAll/Exists, BitVectorsFormal proofs
CodeJS, Java, Go support4 languages
SQLComplexity limitsProduction-ready
FactTF-IDF matchingNo LLM needed!
ImageDeterministic size100% accurate
ConsensusAsync + Circuit breakerFault-tolerant
StatsWasm sandboxWorks anywhere

Next Steps