> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qwedai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Verification engines

> QWED provides 11 specialized verification engines, each using deterministic methods first and LLM only as fallback.

## Engine overview

| Engine        | Technology          | Key features                                                                       |
| ------------- | ------------------- | ---------------------------------------------------------------------------------- |
| **Math**      | SymPy + Decimal     | Calculus, matrix ops, NPV/IRR, statistics                                          |
| **Logic**     | Z3 theorem prover   | ForAll/Exists quantifiers, BitVectors, arrays                                      |
| **Reasoning** | Multi-LLM + cache   | Chain-of-thought validation, result caching                                        |
| **Stats**     | Wasm/Docker sandbox | Secure code execution with AST validation                                          |
| **Fact**      | TF-IDF + NLP        | Semantic similarity, entity matching, citations                                    |
| **Graph**     | Knowledge graph     | Triple verification (subject-predicate-object)                                     |
| **Code**      | Multi-lang AST      | Python, JavaScript, Java, Go security analysis                                     |
| **SQL**       | SQLGlot AST         | Complexity limits, cost estimation, schema validation                              |
| **Taint**     | Data flow analysis  | Trace untrusted inputs to sensitive sinks (e.g., `exec`, `os.system`, SQL queries) |
| **Image**     | Deterministic + VLM | Metadata extraction, size verification, multi-VLM                                  |
| **Schema**    | Pydantic + Math     | JSON structure + embedded calculation checks                                       |

## Deterministic-first philosophy

All engines follow a **deterministic-first** approach:

1. **Try deterministic methods first** (100% reproducible)
2. **Fall back to LLM only when necessary**
3. **Discount LLM confidence** when used

```python theme={null}
# Example: fact verification is deterministic
result = client.verify_fact(
    claim="Paris is in France",
    context="Paris is the capital of France."
)
# Uses TF-IDF similarity + entity matching
# No LLM needed for most claims
```

> **See [Determinism guarantee](/advanced/determinism-guarantee)** for the full engine classification and how to check if a response is `SYMBOLIC` or `HEURISTIC`.

## Engine selection

QWED auto-detects the appropriate engine:

| Content pattern                        | Detected engine |
| -------------------------------------- | --------------- |
| `2+2=4`, `sqrt(16)`, `derivative`      | Math            |
| `(AND ...)`, `ForAll`, `Exists`        | Logic           |
| `SELECT`, `INSERT`, `DROP`             | SQL             |
| \`\`\`\`python`, `import`, `function\` | Code            |
| Claims with context                    | Fact            |
| Image bytes + claim                    | Image           |

Or specify explicitly:

```python theme={null}
result = client.verify(query, type="math")
```

## Engine documentation

### Deterministic engines

* [Math engine](/engines/math) — calculus, matrix, financial
* [Logic engine](/engines/logic) — quantifiers, theorem proving
* [Schema engine](/engines/schema) — JSON structure & math

### Security engines

* [Code engine](/engines/code) — multi-language security
* [SQL engine](/engines/sql) — complexity limits
* [Taint engine](/engines/taint) — data flow analysis

### Data verification engines

* [Stats engine](/engines/stats) — Wasm sandbox execution
* [Fact engine](/engines/fact) — TF-IDF + citations
* [Graph engine](/engines/graph) — knowledge graph triples
* [Image engine](/engines/image) — deterministic verification

### Orchestration engines

* [Reasoning engine](/engines/reasoning) — multi-LLM validation
* [Consensus engine](/engines/consensus) — parallel execution
