Capabilities
Quick start
Core operations
1. Expression evaluation
Verify that an expression equals a value:2. Identity verification
Check if two expressions are mathematically equivalent:VERIFIED. When symbolic simplification is inconclusive, the engine samples five test points as a fallback. Only points that the engine can successfully evaluate count toward agreement — the engine skips domain-restricted expressions (e.g., log(x) at x = -1) rather than producing a false negative.
3. Derivatives
Verify calculus derivatives:4. Integrals
Verify indefinite and definite integrals:5. Limits
Financial calculations
Compound interest
Net present value (NPV)
Internal rate of return (IRR)
Trust boundary
When you verify a natural language math query through the/verify/natural_language endpoint, the response includes a trust_boundary object. This object describes exactly what the pipeline proved and what it did not.
The overall status for natural language math queries is
INCONCLUSIVE because, while QWED evaluates the expression deterministically, it cannot verify that the LLM correctly interpreted the user’s intent. The trust_boundary gives you the information to decide whether the result is sufficient for your use case.Error handling
When verification fails, QWED provides detailed error information:Exact SymPy arithmetic
When SymPy is available, the math engine evaluates expressions using SymPy-native types (sympy.Integer, sympy.Float) instead of Python built-in int and float. This prevents floating-point drift during intermediate computation and ensures that comparisons between LLM answers and verified results use symbolic simplification rather than string matching alone.
Decimal precision
The math engine acceptsDecimal values for exact arithmetic, which is especially useful for financial calculations:
use_decimal=True (the default), the engine uses Decimal internally regardless of whether you pass a float or Decimal.
Tolerance settings
For floating-point comparisons, you can specify a tolerance:Tolerance bounding
To prevent inflated tolerances from masking incorrect results, the math engine enforces a deterministic upper bound on thetolerance parameter. QWED computes the maximum allowed tolerance as a function of the result’s magnitude:
BLOCKED status instead of returning a potentially misleading VERIFIED result. This applies to both decimal and float precision modes.
NaN, Infinity, or non-numeric strings) with a BLOCKED status and an "Invalid tolerance" error message.
Trust boundary
When math verification runs through the natural language pipeline (POST /verify/natural_language), the response now includes a trust_boundary object. This object describes exactly what the pipeline proved and what it did not, separating deterministic expression evaluation from the non-deterministic LLM translation step.
Because the LLM translation step is non-deterministic, the natural language pipeline now returns
INCONCLUSIVE instead of VERIFIED even when the underlying expression evaluation succeeds. This prevents over-representing a translated-query evaluation as a proven user-query verdict. Use the direct POST /verify/math endpoint if you need a fully deterministic result without the LLM translation layer.Ambiguous expressions
Expressions with implicit multiplication after division are ambiguous — for example,1/2(3+1) could mean (1/2)*(3+1) or 1/(2*(3+1)). Rather than guessing, the math engine fails closed and returns BLOCKED:
* operator:
Edge cases
Performance
Next steps
- Logic engine - Verify logical constraints
- Code engine - Verify code correctness
- API reference - Full API documentation