Skip to main content
Neurosymbolic verification for your CI/CD pipeline

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:
name: Verify with QWED

on: [push, pull_request]

jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - name: Verify Calculation
        uses: QWED-AI/qwed-verification@v2.2.0
        with:
          api_key: ${{ secrets.QWED_API_KEY }}
          action: verify
          engine: math
          query: "x**2 + 2*x + 1 = (x+1)**2"

Extension GitHub Actions

Use these extension-specific actions when you want domain-focused checks in your pipeline.
IconActionDescription
💰QWED Finance GuardVerify financial calculations and compliance signals before merging.
⚖️QWED Legal VerificationValidate legal reasoning, deadlines, citations, and clause consistency.
🧾QWED Protocol VerificationVerify protocol-level logic and deterministic rule conformance.
🛒QWED Commerce AuditorAudit checkout math, pricing, and transaction integrity in commerce flows.

Inputs

InputDescriptionRequiredDefault
api_keyQWED API key (optional for local mode)No-
actionAction type: verify, scan-secrets, scan-code, verify-shellNoverify
queryThe user query (e.g., “Derivative of x^2”). Required for math and logic engines.Conditional-
llm_outputThe LLM output to verify. Required for the code engine.Conditional-
engineVerification engine: math, logic, code, sql, shellNomath
pathsGlob patterns for files to scan (e.g., **/*.py,**/*.env)No.
output_formatOutput format: text, json, sarifNotext
fail_on_findingsFail the action if security issues are foundNotrue
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

OutputDescription
verifiedtrue if verification passed or no issues found
explanationDetailed proof or error explanation
findings_countNumber of security issues found (for scan modes)
badge_urlURL for QWED verified badge
sarif_filePath to SARIF output file (if output_format=sarif)

Examples

Verify math in PRs

- name: Check Math
  uses: QWED-AI/qwed-verification@v2.2.0
  with:
    api_key: ${{ secrets.QWED_API_KEY }}
    action: verify
    engine: math
    query: "2**10 = 1024"

Verify logic

- name: Check Logic
  uses: QWED-AI/qwed-verification@v2.2.0
  with:
    api_key: ${{ secrets.QWED_API_KEY }}
    action: verify
    engine: logic
    query: "(AND (GT x 5) (LT x 10))"

Check code security

- name: Security Check
  uses: QWED-AI/qwed-verification@v2.2.0
  with:
    api_key: ${{ secrets.QWED_API_KEY }}
    action: verify
    engine: code
    llm_output: "eval(user_input)"

Scan files with SARIF output

- name: Scan Code
  uses: QWED-AI/qwed-verification@v2.2.0
  with:
    api_key: ${{ secrets.QWED_API_KEY }}
    action: scan-code
    paths: "**/*.py"
    output_format: sarif
    fail_on_findings: "true"

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

Your Query

LLM Response (GPT-4, Claude, etc.)

Symbolic Verification (SymPy, Z3, AST)

✅ Deterministic Proof or ❌ Verification Failure
Example:
  • 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
Or use local LLMs (Ollama) for free!

Documentation

Support

License

Apache 2.0 - See LICENSE
Made with 💜 by QWED-AI