Skip to main content

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

PillarGuardEngineUse Case
CalculationFinance + Calendar + DerivativesSymPyNPV, IRR, Options pricing
RegulationComplianceZ3KYC/AML, OFAC sanctions
InteroperabilityMessageXML SchemaISO 20022, SWIFT MT
Data SafetyQuerySQLGlotSQL 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 OutputQWED VerificationEngine
"NPV is $180.42"SymPy recalculatesMath
"Transaction is compliant"Z3 checks thresholdLogic
"Payment XML is valid"Schema validationStructure
"SELECT * FROM users"AST analysisSQL

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