Skip to main content

QWED GitHub Action

Neurosymbolic verification for your CI/CD pipeline

GitHub Marketplace Version

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:
query: "What is the derivative of x^2?"
provider: "openai"
api-key: ${{ secrets.OPENAI_API_KEY }}

Inputs

InputDescriptionRequiredDefault
queryQuestion or statement to verify✅ Yes-
providerLLM provider (openai, anthropic, gemini)Noopenai
api-keyAPI key for LLM providerNo-
modelModel name (e.g., gpt-4o-mini)Nogpt-4o-mini
mask-piiEnable PII masking (true/false)Nofalse
verification-typeType: auto, math, logic, codeNoauto

Outputs

OutputDescription
verifiedVerification result (true/false)
valueVerified value or result
confidenceConfidence score (0.0-1.0)
evidenceJSON evidence of verification

Examples

Verify Math in PRs

- name: Check Math
uses: QWED-AI/qwed-verification@v2.2.0
with:
query: "What is 2^10?"
provider: "openai"
api-key: ${{ secrets.OPENAI_API_KEY }}

Verify Logic

- name: Check Logic
uses: QWED-AI/qwed-verification@v2.2.0
with:
query: "Is (A AND NOT A) satisfiable?"
provider: "anthropic"
api-key: ${{ secrets.ANTHROPIC_API_KEY }}

Check Code Security

- name: Security Check
uses: QWED-AI/qwed-verification@v2.2.0
with:
query: |
Is this code safe?
```python
eval(user_input)

verification-type: "code"


### Enterprise: PII Masking

```yaml
- name: Secure Verification
uses: QWED-AI/qwed-verification@v2.2.0
with:
query: "User email: john@example.com, calculate 2+2"
mask-pii: "true"
provider: "openai"
api-key: ${{ secrets.OPENAI_API_KEY }}

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