What is QWED?
QWED combines Neural Networks (LLMs) with Symbolic Reasoning (SymPy, Z3) to provide deterministic verification of AI outputs. Use cases:- ✅ Verify mathematical calculations in PRs
- ✅ Check logical reasoning in documentation
- ✅ Detect unsafe code patterns
- ✅ Validate LLM outputs before deployment
Quick start
Add this to your.github/workflows/verify.yml:
Extension GitHub Actions
Use these extension-specific actions when you want domain-focused checks in your pipeline.| Icon | Action | Description |
|---|---|---|
| 💰 | QWED Finance Guard | Verify financial calculations and compliance signals before merging. |
| ⚖️ | QWED Legal Verification | Validate legal reasoning, deadlines, citations, and clause consistency. |
| 🧾 | QWED Protocol Verification | Verify protocol-level logic and deterministic rule conformance. |
| 🛒 | QWED Commerce Auditor | Audit checkout math, pricing, and transaction integrity in commerce flows. |
Inputs
| Input | Description | Required | Default |
|---|---|---|---|
api_key | QWED API key (optional for local mode) | No | - |
action | Action type: verify, scan-secrets, scan-code, verify-shell | No | verify |
query | The user query (e.g., “Derivative of x^2”). Required for math and logic engines. | Conditional | - |
llm_output | The LLM output to verify. Required for the code engine. | Conditional | - |
engine | Verification engine: math, logic, code, sql, shell | No | math |
paths | Glob patterns for files to scan (e.g., **/*.py,**/*.env) | No | . |
output_format | Output format: text, json, sarif | No | text |
fail_on_findings | Fail the action if security issues are found | No | true |
Each engine requires different inputs:
- math — requires
query(passed as the expression to verify) - logic — requires
query - code — requires
llm_output(passed as the code to analyze)
Outputs
| Output | Description |
|---|---|
verified | true if verification passed or no issues found |
explanation | Detailed proof or error explanation |
findings_count | Number of security issues found (for scan modes) |
badge_url | URL for QWED verified badge |
sarif_file | Path to SARIF output file (if output_format=sarif) |
Examples
Verify math in PRs
Verify logic
Check code security
Scan files with SARIF output
Privacy & Security
- 🔒 PII Masking: Automatically mask sensitive data (emails, SSNs, credit cards)
- 🏠 Local Option: Use local LLMs (Ollama) for zero cloud exposure
- 🔐 API Keys: Use GitHub Secrets for secure credential management
- ✅ Open Source: Full transparency, no black boxes
How It Works
- Query: “What is the derivative of x^2?”
- LLM says: “2x”
- SymPy computes:
diff(x**2, x) = 2*x - QWED: ✅ MATCH! Verified with 100% confidence
Requirements
API Keys (choose one):- OpenAI:
OPENAI_API_KEY - Anthropic:
ANTHROPIC_API_KEY - Google:
GOOGLE_API_KEY
Documentation
Support
- Issues: GitHub Issues
- PyPI: qwed
- Twitter: @rahuldass29
License
Apache 2.0 - See LICENSEMade with 💜 by QWED-AI