Synthetic Portfolio Use Case

RiverPay — Financial Exception Review Workflow

A workflow-oriented financial risk prototype showing how an LLM can gather evidence and use investigation tools while deterministic policy logic remains authoritative for the final decision.

View on GitHub

Problem

This use case explores automating payment-exception review to reduce manual investigation effort — without allowing an LLM to make uncontrolled financial or compliance decisions on its own.

Architecture & Technical Highlights

The LLM gathers evidence, calls scoped read-only tools, and proposes a decision. Deterministic policy logic recomputes precedence and remains authoritative.

  • Python + n8n workflow orchestration
  • An investigation agent that gathers evidence before any decision is proposed
  • Customer lookup tool
  • Transaction lookup tool
  • Sanctions checks
  • Duplicate detection
  • Recent-transfer checks
  • KYC tier rules
  • Transaction-policy rules
  • Structured outputs for downstream policy evaluation
  • Dockerized local execution
Key Design Decision

I intentionally used a hybrid architecture rather than making the LLM the final decision-maker. The LLM handles investigation and evidence gathering, while deterministic policy logic enforces precedence and the final operational decision.

Governance

  • Policy-based deterministic logic performs the final evaluation, not the LLM
  • Investigation tools are isolated and scoped to a single purpose each
  • All data access from the agent is read-only
  • Uncertain or risky cases are escalated to a human rather than auto-resolved
  • Escalations route to Fraud Ops, Compliance, Tech/Recon, or Agent Network depending on issue type
  • Decisions are structured to be audit-oriented
  • Residual risk is analyzed and surfaced rather than hidden

No compliance certification is claimed for this workflow.

Evaluation

A synthetic evaluation workflow exercises the pipeline against a set of prepared scenarios rather than live production traffic. It checks:

  • Policy/decision correctness checked against a set of expected synthetic outcomes
  • Verifies that deterministic policy logic correctly overrides or resolves inappropriate or conflicting LLM proposals
  • Escalation and routing behavior — does an uncertain case reach the right operational team?
  • Evidence and tool-lookup behavior — are the read-only investigation tools actually being used?
  • A deterministic evaluation report is produced for each run for review
  • Regression behavior is checked across the supplied test scenarios

Results reflect behavior on the supplied synthetic fixtures, not production model-performance statistics.

Limitations & Disclosure

This is a synthetic portfolio/technical use case. It does not process real banking transactions or customer data and is not deployed in a financial institution.

This workflow does not implement:

  • Real money movement
  • Automatic retries
  • KYC approval
  • Sanctions clearance
  • Production banking integrations

Repository

Explore the full n8n workflow, investigation tools, and policy evaluation logic.

View RiverPay-UseCase on GitHub

Get In Touch

Ready to collaborate? Let's talk.

Connect With Me

Interested in freelance work, technical consulting, speaking engagements, or mentoring? I'd love to hear about your project or opportunity.

Quick Meeting?

For a quick conversation, you can also book a time directly. I try to respond to inquiries within 24 hours.

Schedule A Call

Response time: I aim to respond to all inquiries within 24-48 hours.