QWED-Finance
The Seatbelt for Banking Agents 🏦
When an LLM told a customer his Chase card had "$12,889" in rewards, QWED-Finance would have caught the hallucination before it caused a lawsuit.
What is QWED-Finance?
QWED-Finance is a deterministic verification middleware that sits between your banking AI and the financial system. It uses symbolic solvers (not probabilistic AI) to verify every calculation, compliance check, and payment message before execution.
pip install qwed-finance
The 4 Pillars of Banking Verification
| Pillar | Guard | Engine | Use Case |
|---|---|---|---|
| Calculation | Finance + Calendar + Derivatives | SymPy | NPV, IRR, Options pricing |
| Regulation | Compliance | Z3 | KYC/AML, OFAC sanctions |
| Interoperability | Message | XML Schema | ISO 20022, SWIFT MT |
| Data Safety | Query | SQLGlot | SQL injection prevention |
Quick Example
from qwed_finance import ComplianceGuard
guard = ComplianceGuard()
# Verify AML flagging decision
result = guard.verify_aml_flag(
amount=15000, # Over $10k threshold
country_code="US",
llm_flagged=True # LLM flagged it
)
print(result.compliant) # True ✅
print(result.proof) # "amount >= 10000 → flag required"
Architecture
High-Level Flow
Guard Selection Flow
Verification Engine Stack
Payment Verification Sequence
Why Not Just Trust the LLM?
LLMs are probabilistic. They can:
- Hallucinate numbers ($12,889 instead of $2.88)
- Miss compliance thresholds (CTR at $10,000.01)
- Generate malformed XML (rejected by SWIFT)
- Create dangerous SQL (DROP TABLE)
QWED-Finance uses deterministic verification:
| LLM Output | QWED Verification | Engine |
|---|---|---|
| "NPV is $180.42" | SymPy recalculates | Math |
| "Transaction is compliant" | Z3 checks threshold | Logic |
| "Payment XML is valid" | Schema validation | Structure |
| "SELECT * FROM users" | AST analysis | SQL |
Regulatory Alignment
QWED-Finance aligns with:
- RBI FREE-AI Framework (India 2025)
- BSA/FinCEN (AML/CTR thresholds)
- OFAC (Sanctions screening)
- ISO 20022 (Payment messaging)
"Accuracy alone is not sufficient - transparency, auditability, and defensible decision logic are required." — India AI Governance Guidelines
Next Steps
- The 5 Guards - Deep dive into each verification guard
- Compliance & Auditing - Receipts and regulatory proof
- Integrations - Connect with UCP and Open Responses