Paper Trail · Bahman Shadmehr Start a review
For payments, lending & fintech operations

Speed is easy. Explaining the decision eighteen months later is the hard part.

I build retrieval and LLM systems for dispute handling, KYC review and compliance lookups — where every output cites its source, every step is logged, and the system escalates rather than improvises. Built so your auditor, your regulator and your own second-line can reconstruct exactly why an answer was given.

8 years in production financial infrastructure Payment gateway migration lead Independent · remote, UTC+3

Exhibit A

What a machine-assisted decision looks like on paper

This is the artefact that matters — not the answer, the record of how it was reached. Pick a case.

Every line above is written to an append-only log with the model version, prompt hash, retrieved document IDs and confidence score attached. Reproducible on request, for as long as your retention policy requires.

Design principles

Four rules I don't negotiate on

Most AI failures in regulated operations aren't wrong answers. They're right answers nobody can defend.

01

No answer without a source

If the system can't point to the paragraph, scheme rule or prior decision it drew from, it doesn't answer. A confident sentence with no provenance is worse than silence, because someone will act on it.

02

Uncertainty routes to a human

Confidence is measured, thresholded and tuned with your risk team. Below the line it escalates with its reasoning attached, so the human starts from a position rather than from scratch.

03

The machine recommends, people decide

Nothing consequential executes unattended in the first release. Auto-execution is earned per case type, on measured evidence, with your sign-off — not shipped on day one because the demo was impressive.

04

Everything is reconstructable

Model version, prompt, retrieved documents, scores and the human's final action — all logged immutably. When someone asks why in a year's time, the answer is a record, not a recollection.


Where it fits

Three operations where the paperwork is the work

Each of these is knowledge-bound rather than judgement-bound: the answer exists in scheme rules, policy or precedent, and the cost is assembling it.

Dispute and chargeback handling

Every representment needs the same assembly: which scheme reason code, what evidence that code requires, whether you hold it, and what your own past cases suggest about the odds. Analysts spend most of their time gathering, not deciding.

The system drafts the case file — reason code identified, required evidence checklist against what's actually attached, precedent from your resolved disputes, and a recommendation with the deadline calculated. The analyst reviews and files.

Sources it reads
  • Visa and Mastercard scheme rules
  • Your representment history
  • Merchant agreements and policies
  • Transaction and evidence records

Stays with a human: the decision to fight or accept, and anything above your value threshold.

KYC and onboarding review

A queue of applications where most are routine and a few need real scrutiny. The cost is that analysts read all of them at the same depth, because you can't know which is which until you've looked.

The system reads the submitted documents against your onboarding policy, flags what's missing or inconsistent, summarises adverse media hits with links, and separates the routine from the ones that need a person. It never approves anything itself.

Sources it reads
  • Your onboarding policy and risk appetite
  • Submitted documents and forms
  • Screening and adverse media output
  • Prior decisions on similar profiles

Stays with a human: every approval and rejection, without exception.

Compliance and policy lookups

"Can we onboard this business type in this market?" "What are the record-keeping requirements here?" "Does this promotion need a disclosure?" The answers exist across regulations, internal policy and legal advice you've already paid for — and finding them takes a day.

The system answers from your own approved corpus with the paragraph cited, and refuses when the question falls outside it. It is explicitly not a legal opinion, and it says so on every response.

Sources it reads
  • Applicable regulation and guidance
  • Internal policy and procedure manuals
  • Prior legal advice and memos
  • Regulator correspondence

Stays with a human: any novel question, and anything the corpus doesn't cover.


Risk & controls

The questions your second line will ask

These come up in every procurement conversation in this sector. Better answered here than three meetings in.

Where does our data go, and does it train anything?

Decided before any code is written and documented in the agreement. Options range from enterprise API tiers with contractual no-training terms and a specified region, through self-hosted embeddings and vector storage inside your own VPC, to fully local models where nothing leaves your perimeter at all.

For most regulated clients the answer is self-hosted retrieval with a contracted model provider, or fully local where the data classification demands it.

How do we evidence this to a regulator or an auditor?

You get an evidence pack, not a promise: the model card and version history, the evaluation methodology and results, the confidence thresholds and how they were set, the escalation rules, and the immutable decision log with retention aligned to your policy.

Any individual decision can be reconstructed end to end — which documents were retrieved, what the model produced, what score it carried, and what the human did with it.

What stops it hallucinating a scheme rule?

It only answers from retrieved documents, and the citation is generated from the retrieval, not from the model's memory — so a claim without a source can't reach the analyst. Anything below the confidence threshold is escalated rather than shown as an answer.

Then it's measured: an evaluation set built with your own team, run before deployment and continuously afterwards, so a degradation shows up as a number rather than as an incident.

Does this fall under the EU AI Act?

Possibly, depending on the use. Creditworthiness assessment is explicitly high-risk; internal knowledge retrieval that recommends to a human generally is not. The design choices on this page — human decision authority, logging, transparency, human oversight — are deliberately aligned with the high-risk obligations regardless, because building to the stricter bar costs little and keeps your options open.

I'm an engineer, not counsel. Your legal team makes the classification call; I build so that whichever way it lands, the controls are already there.

What happens to our team's jobs?

An honest answer: in the deployments this is modelled on, headcount doesn't fall — throughput rises and the work changes shape. Analysts stop assembling and start deciding, which is both the higher-value half and the part they were hired for.

If your actual goal is headcount reduction, say so at the start. It changes what we build and how it's measured, and I'd rather design for the real objective than discover it in month three.

You're one person. How does that pass vendor due diligence?

Sometimes it doesn't, and that's a reasonable outcome — some institutions require a corporate counterparty and I'll say so early rather than waste your procurement cycle.

What I can offer: everything runs in your infrastructure and your accounts, all code in your repositories, no proprietary runtime and no dependency on me continuing to exist. Handover and documentation are contracted deliverables, not goodwill. For many mid-sized fintechs that's a lower concentration risk than a vendor whose product you can't inspect.

Deliverables

What you actually receive, beyond working software

In this sector the documentation is half the value. Every engagement produces the artefacts your risk, audit and legal functions will ask for — because being asked is a certainty, not a risk.

01

Evaluation report

Methodology, the test set your team wrote, measured accuracy per case type, and the failure modes found along the way.

02

Control documentation

Confidence thresholds and their rationale, escalation rules, human authority boundaries, and what the system is prohibited from doing.

03

Data flow record

Where every piece of data travels, which processors touch it, retention periods, and the contractual terms behind each.

04

Runbook & handover

How to operate it, how to re-run the evaluation, how to swap the model, and what to do when a metric moves. Written for your engineers.


Engagement

Start with a review, not a build

In regulated operations the expensive mistake is building the wrong thing carefully. Three weeks of assessment costs less than one month of a misdirected project.

Start here Controls review

Which process, whether the corpus supports it, and what your risk function will require.

$8,500

2 weeks · fixed fee

  • Process and data audit across candidate operations
  • Corpus readiness assessment
  • Draft control framework and escalation design
  • Written report and a session with your risk team
  • Credited in full against a pilot
Book a review
Measured pilot

One case type, one queue, running alongside your analysts with the numbers to prove it.

$28k – $45k

6–10 weeks

  • Evaluation set built with your operations team
  • Working system in a controlled environment
  • Measured accuracy, escalation and time metrics
  • Full evidence pack for internal review
  • Go / no-go recommendation, honestly given
Discuss a pilot
Build & embed

Production deployment across case types, with your engineers taking ownership.

from $60k

3–6 months · or $1,100/day

  • Production deployment in your infrastructure
  • Monitoring, alerting and quality dashboards
  • Integration with your case management systems
  • Engineer enablement and full handover
  • Optional support retainer afterwards
Discuss a build

Terms worth stating plainly

The review can conclude "don't do this." Roughly speaking, if your policy corpus is contradictory, undocumented or scattered across people rather than systems, the honest recommendation is to fix that first — and I'll say so in writing rather than sell you a build that will disappoint in month four.

The pilot has a defined accuracy bar, agreed before it starts, measured on a test set your team writes. If it misses, you have a documented reason not to proceed and an evidence pack explaining why — which is worth having regardless.

Model and infrastructure costs are billed directly by your providers. I don't resell or mark up. Two clients at a time, so capacity is honest rather than aspirational.


Who you'd be working with

I've shipped payment infrastructure. That's why this page is about controls.

I'm Bahman Shadmehr. I led the decomposition of a national payment gateway from a monolith into microservices while it was live and processing — a job where "we'll fix it in the next release" isn't available as an answer.

Since then, automated trading systems on the Texas wholesale power market and US equities: pipelines that place real orders with no one at the keyboard, where the engineering problem isn't making it work, it's knowing immediately when it hasn't.

That's the same problem an LLM poses inside a regulated operation. It runs on its own, it produces confident output, it fails without raising an exception, and its quality drifts as the world moves underneath it. Everything on this page — the logging, the thresholds, the refusal behaviour, the evaluation harness — comes from eight years of building systems where being quietly wrong was expensive.

2024 — 2025Automated energy trading, ERCOT — order placement pipeline, health metrics and anomaly alerting
2023 — 2024US equities trading platform — AWS services on the trading path, monitoring on daily jobs
2020 — 2021Zibal payment gateway — led monolith-to-microservices migration on live infrastructure
2022 — 2023Vgang — Kubernetes platform and integration microservices
2017 — 2020Rahpa — async backends, real-time tracking systems

Python, Go, Kubernetes, AWS, GCP, PostgreSQL, Redis, Prometheus, Grafana. Remote, UTC+3. Writing at dev.to/bshadmehr · LinkedIn

Next step

Describe one queue where your analysts spend more time gathering than deciding

That's enough for a first conversation. I'll tell you within a day whether it's a good candidate — and if your corpus isn't ready, I'll tell you that too, which costs you nothing and saves you a quarter.

info@bshadmehr.me

Two clients at a time Reply within one business day NDA before anything substantive

Useful in a first message

  1. The operation — disputes, KYC, compliance lookups, something else.
  2. Volume per month, and how many people handle it.
  3. Where the governing rules live today.
  4. Your data residency and classification constraints.
  5. Whether your risk function is already involved.