DEV Community

Ramkumar Jayakumar
Ramkumar Jayakumar

Posted on

The agent said $62,421.60. The records said $50,075.93.

The moment I stopped trusting a plausible number

On a synthetic account, six cash deposits had landed in one week. I wanted to see what my system would do with a believable lie, so I played a misbehaving agent and posted two claims to the case board:

  1. "The account received 6 cash deposits in the window." True.
  2. "Those deposits total **62,421.60." Invented. The real total was 50,075.93. I had added a made-up 12,345.67 to the real number.

Both claims read like something a language model would write. Neither raised any alarm for me, and I wrote the lie.

The verifier did not ask another model whether the claim sounded right. It re-ran the query against the records and wrote this on the claim:

CONTRADICTED  expected sum == 62421.60, actual 50075.93
Enter fullscreen mode Exit fullscreen mode

The first claim came back corroborated. The second came back contradicted, with the real number next to it.

I want to be straight about that scene: I staged that lie. But the system also met real model slips. In the evaluation I describe below, the specialists posted 389 claims across 46 synthetic alerts. 366 were corroborated, 5 were contradicted and 18 were unsupported. (One run, synthetic data, small model: treat those as illustrations of the mechanism, not a measured error rate for any real system.) During development, one specialist even asserted a link between a customer and themselves.

That small scene is the whole project: agents propose, records verify, a human decides.


The business problem

Fraud and anti-money-laundering (AML) monitoring systems raise a lot of alerts. Most turn out to be harmless, but an investigator still has to prove that, alert by alert: pull transactions, check the customer file, check watchlists, look for links to other accounts, and write it all up. When an alert is real, the bank files a Suspicious Activity Report (SAR) with the regulator.

AI agents can do a lot of that legwork. But a bank cannot accept two things:

  • Agents that state facts that are not in the data. A confident wrong total in a regulatory report is worse than no report.
  • An agent that can freeze an account or file a report on its own. Accountability has to sit with a person.

I am not going to quote an industry false-alarm percentage here, because I don't have a figure I can verify. What I can show is a design that treats those two non-negotiables as architecture, not as prompt instructions, and a measurement of what that design costs and buys on synthetic data.


What I built

I built Case Board solo for a Fraud & AML hackathon track.

  • Every alert becomes a case on a shared, typed GraphQL board, stored in Azure Database for PostgreSQL.
  • Three specialist agents investigate in parallel: transaction pattern, KYC and watchlist, and link analysis. A fourth, non-voting agent explains which rule fired. They run on Azure AI Foundry model deployments: a small model for the specialists, and a larger model only to draft the SAR narrative.
  • The specialists never talk to each other. They read the bank's records through read-only tools and post typed claims to the board.
  • A verifier with no language model in it re-executes every claim against the records.
  • A deterministic aggregator turns verified claims into a proposal: clear, hold or escalate.
  • The board compiles an evidence pack from verified claims only (it lists the excluded claims too), and a SAR draft from the same.
  • Only a human can hold, file or clear. Filing is simulated: nothing is transmitted anywhere.

All data is synthetic: 60 generated alerts, 20 of them truly suspicious, with the answer key hidden from the agents by database permissions.


Architecture

Case flow: Synthetic alert → specialist agents → shared GraphQL board → deterministic verification against source records → human review.

All alert and account data shown in this prototype is synthetic. Filing is simulated.

Three design choices matter more than the rest.

1. Typed claims. An agent can't just say "this account looks suspicious". Each claim carries an assertion with a type, such as the sum of cash deposits on this account in this window equals X, or these two customers share a phone number. Each type has a handler that re-runs the query. That is what makes the opening scene possible.

2. A shared board, not one coordinating AI. The common way to build multi-agent systems is a supervisor design: one coordinating model calls the specialists one after another and relays everything between them. I built exactly that as my baseline, with the same models, tools and alerts, so the only difference is how the work is organised. On the board, specialists react to case events and write structured findings with their sources.

3. Governance in the data layer. More on that next.

I also built a Foundry Agent Service backend for the specialists. It worked on one case, but a later re-test gave weaker evidence references, so the demo and every measured run use direct chat completions, not Agent Service.


What the verifier does, and what it doesn't

My first verifier checked that claims were true. A reviewer (a fresh, adversarial pass over my code) showed that wasn't enough: a claim like "this account has at least zero transactions" is true, tight-looking and meaningless, and it would have been counted as support for a hold.

After three adversarial review rounds, a claim only counts as support for a hold or escalation if it is:

  • corroborated when re-run against the records,
  • about the alert's own account or customer (or one tightly linked to it),
  • inside the alert window,
  • tight (not "at most 999,999,999"), and
  • matching a template for the rule that fired.

Anything else can still be shown as corroborated context, but it never drives a decision.

What that does not mean. The verifier catches arithmetically false claims, and it keeps true-but-irrelevant ones from steering a decision. It is not general hallucination detection, and it cannot judge whether a true, in-template claim is persuasive. A model can still choose which true facts to emphasise.


Where human review fits

The prototype separates investigation from decision authority. The application restricts case decisions to a reviewer role and records decision attempts in an audit log. The database also checks that a case has an approval before it enters a terminal state.

The demo uses shared credentials, so it demonstrates the approval flow at a prototype level. A production version would need named reviewers, narrowly scoped credentials, and a stronger separation between the application and audit storage. Filing is simulated.

The evaluation, with its caveats attached

Setup. 60 synthetic alerts from a seeded generator (20 truly suspicious). I excluded the 14 I had used for prompt tuning or live checks, which leaves 46 scored alerts: 34 benign and 12 suspicious. Each alert was run once, with the same small model, the same tools and the same specialist prompts for both designs. The supervisor baseline is a design I built myself.

Default policy against the supervisor baseline

Supervisor baseline Case Board (default policy)
Benign alerts wrongly flagged 13/34 (38.2%) 11/34 (32.4%)
Suspicious alerts missed 0/12 0/12
Tokens per alert (in + out, mean) 27,297 20,982
Time per alert (mean) 56.0 s 52.7 s
Verified claims behind each decision (mean) 0 (checked afterwards, as a diagnostic) 8.0
Unsupported claim rate 6.9% 4.6%
Cost per alert, investigation only USD 0.0091 USD 0.0072

Read this with it. Synthetic data, 46 alerts, one run each, so the intervals are wide. The false-positive gap (32.4% against 38.2%) is within noise: the 95% intervals overlap, and I am not claiming a false-positive improvement. The time difference is also within what I would call noise. Both designs caught all 12 suspicious alerts, and both still flagged nearly every look-alike rapid-movement benign alert (the board 11 of 12, the supervisor 12 of 12). Cost uses Azure's published retail prices for the two deployments, retrieved on 2026-10-18, with input priced at the full uncached rate, so it is an upper bound, and it covers the investigation only (one SAR draft with the larger model cost about USD 0.019). The baseline's claims were only verified after its decisions, as a diagnostic, so "0" means its decisions did not depend on verification.

What I will say: in this one-run synthetic evaluation, both designs caught all 12 suspicious alerts; the board used about 23% fewer tokens and cost about 21% less per alert, and each board decision had a mean of eight verifier-checked claims behind it. These are prototype measurements, not production outcomes.

What I won't say: that the board reduces false positives, that this would hold on real data, or that these are production outcomes.

Fairness caveats you should know about: my specialist prompts were hand-tuned on five alerts, and they encode the synthetic generator's typologies, which helps both designs but means this isn't a blind test. The supervisor's own prompt is a first draft that I never iterated. The board's timing includes real database round trips; the baseline writes nothing. Both ran on one machine, one alert at a time.

The decision trade-off: a policy dial

Both designs struggled with benign rapid-movement alerts, so I tried one change. In the strict policy, a wire count or sum no longer counts as support for a rapid-movement alert. Only ring evidence does: a link to another alerted account, or a shared payee.

Default policy Strict policy (optional)
Benign alerts wrongly flagged 11/34 (32.4%) 0/34 (0%)
Suspicious alerts missed 0/12 2/12 (16.7%)
Alerts sent to human review 23/46 (50.0%) 10/46 (21.7%)
Cost per alert, investigation only USD 0.0072 USD 0.0073
Benign alerts wrongly flagged   (lower is better)
  default  █████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░  32%  (11 of 34)
  strict   ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░   0%  ( 0 of 34)

Suspicious alerts missed        (lower is better)
  default  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░   0%  ( 0 of 12)
  strict   ███████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  17%  ( 2 of 12)
Enter fullscreen mode Exit fullscreen mode

Read this with it. Same 46 synthetic alerts, one run each, so one extra miss or false alarm moves these percentages a lot. I designed the strict policy after seeing the first results on these same alerts, so its numbers are in-sample and optimistic. It is not a held-out test. One of its two misses is a structuring alert that the rule change does not touch, which points to ordinary run-to-run model variation rather than the policy.

Why the default stays lenient. In AML, missing a suspicious alert costs a bank far more than reviewing a false alarm. So I ship the safer setting as the default, expose the strict one as an option (AGENTS_RAPID_POLICY=strict), and show the trade-off instead of picking the prettier number.

Run hygiene. In my first full run, two board runs hit defects that I then fixed: a concurrency bug (two agents finishing at the same instant could leave a case stuck; fixed, with a regression test) and a case frozen by a finding with no checkable claim. I re-ran those two once on the fixed system, and the default-policy numbers above include those re-runs. In the strict-policy run, five runs failed from database and network timeouts rather than from decisions, and I re-ran each once. The raw first run is kept alongside.


What I learned

1. Make authority a property of the architecture, not the prompt. A prompt that says "never file a report" is a request. A database trigger that refuses the state change is a fact. I would rather the system be boring and refuse than clever and polite.

2. True is not the same as relevant. My first verifier happily corroborated meaningless-but-true claims. The fix was not a smarter model: it was scoping claims to the alert's own entities, window and rule. A fresh adversarial reviewer found what I would not have.

3. Report the dial, not just the best setting. Tightening one rule removed every false alarm and cost me two suspicious alerts. Showing both settings, with the reason for the default, is more useful to a reader than whichever number looks best.

4. Boring engineering decides whether a demo survives. The failures that cost me time were not model failures. They were a race between two agents finishing together, stale database connections after my laptop changed networks, and a UI that re-rendered every few seconds and swallowed clicks.

5. Separate proposing, verifying and deciding. Agents write typed claims, something deterministic checks them against the records, and a human-only gate sits outside the model.


What this is not

  • Not a production system, and not production results. All data is synthetic, the evaluation is 46 alerts and one run each, and the strict policy is in-sample.
  • Not deployed. It runs locally against Azure AI Foundry and Azure Database for PostgreSQL.
  • Not built: a Power Automate approval flow, a Copilot Studio assistant, a Power BI report, and Entra sign-in.
  • Not general hallucination detection. It re-runs claims against records and keeps irrelevant true claims from driving decisions.
  • Not a real approval workflow. Demo approval, shared token, free-text approver name.

What I would do next

  • Evaluate on a held-out set that I did not look at while tuning, and on more than one run per alert.
  • Use named reviewer identities, isolate database credentials, and add Entra sign-in.
  • Look harder at the one place both designs struggled (look-alike rapid-movement alerts) with ring evidence that doesn't cost recall.
  • Connect it to a real case-management system, with real approvers.

Everything above uses synthetic data. No customer data, and no real alerts, were used.

Top comments (11)

Collapse
 
max_quimby profile image
Max Quimby •

"The verifier did not ask another model whether the claim sounded right — it re-ran the query against the records" is the sentence the whole field needs tattooed somewhere. The dominant anti-pattern right now is LLM-as-judge checking LLM-as-author, which just gives you two plausible stories agreeing with each other. A deterministic verifier that re-derives the fact from source is the only thing that catches the invented 12,345.67, because the fabrication is coherent — it reads exactly like a real total.

The design choice I'd highlight is that the specialists post typed claims to a board and never talk to each other. Agent-to-agent chatter is where confident errors become consensus; isolating them so the only shared surface is a verifiable, typed artifact is a genuinely different safety posture than "multi-agent debate." The one that asserted a link between a customer and themselves is a great example — in a debate setup that might've been rationalized, but a typed claim just gets contradicted by the records.

Honest question on the economics: the verifier re-running queries doubles your read load against Postgres, and the SAR-drafting model is your expensive tier. On the synthetic 46 alerts it's fine, but have you modeled what the verifier's query cost looks like at real alert volume? That re-derivation is clearly worth it for AML, but I'm curious where the line sits for lower-stakes domains.

Collapse
 
rkj180220 profile image
Ramkumar Jayakumar •

Thanks, Max. I haven’t modeled the verifier’s database cost at production alert volumes. The article’s dollar figures cover model usage for the investigation, and I report SAR drafting separately. They don’t establish the total operating cost.

Verification adds reads, though I’d need query-level measurements to determine how much additional load it creates. A fixed doubling would depend on the assertions and queries involved.

The next comparison should include query counts, database CPU and I/O, latency under concurrency, and end-to-end cost including drafting. For lower-stakes use cases, that would help decide which assertions warrant synchronous verification and which can be checked asynchronously.

Collapse
 
maxbuildsdev profile image
Max Kaya •

The five-part rule is the part I'd steal — "corroborated but not tight" is exactly the bucket a supervisor design never sees. Two things to make the verdict survive an audit, though.

First, the verifier re-runs a query against a ledger that moves. Unless the claim carries an as-of watermark (last transaction id or snapshot timestamp at posting time) and the re-run reads point-in-time, "CONTRADICTED" isn't reproducible next week: new deposits land, the sum changes, and the same claim now fails for a reason that has nothing to do with the agent. Regulators ask for that reproduction, and it also makes the 18 unsupported claims auditable.

Second, keep the third value distinct. A handler that times out, hits a missing KYC record, or finds two phone-number formats is not the same as "false" — collapsing NULL into unsupported mixes a data gap with a hallucination, and on synthetic data with clean records you'd never notice.

Did any of the 18 unsupported claims cluster on one claim type or one tool, or were they spread evenly? A per-template breakdown is usually the cheapest place to find which read-only tool gives agents ambiguous input.

Collapse
 
rkj180220 profile image
Ramkumar Jayakumar • • Edited

Thanks for calling out both issues. The prototype constrains claims to the alert’s time window, but that alone doesn’t provide point-in-time reproducibility if records are corrected or backfilled. The evaluation used fixed synthetic data. I haven’t demonstrated replay against historical source versions.

On verdicts, the implementation keeps contradicted and unsupported distinct, and database errors propagate. Unsupported covers several conditions, including missing or malformed assertions, unknown types, and claims outside the permitted scope. It would benefit from more explicit reason categories.

I haven’t established a per-template breakdown of the 18 unsupported claims. The saved evaluation summary contains counts, so I’d need the claim-level verification notes to answer the clustering question accurately. I shouldn’t describe all 18 as model hallucinations.

Collapse
 
anp2network profile image
ANP2 Network •

Eight verified claims per decision can overstate the evidence when several claims re-run over the same rows. A count of six cash deposits and a sum of 50,075.93 across those six deposits are one observation stated twice. Re-running both proves each one is correct. It doesn't add any data.

A cheap fix: have each handler return the record ids it actually read, plus which specialist emitted the claim, and count support as distinct row sets (overlap-weighted when two sets partly share rows).

Your strict-policy result reads naturally this way. Wire count and wire sum were the same wires counted twice, and ring evidence is the first kind of support that pulls in rows from outside the alert's own account. It's in-sample, so it proves nothing yet, but it would be easy to check.

Keeping the specialists apart stops contagion. It does nothing for common-mode error. Three specialists on one model with one tuning set fail together, and 11 of 12 versus 12 of 12 on benign rapid-movement alerts looks like a shared blind spot. I'd measure independence from the rows each claim touched.

Outside data point: in a public signed task ledger we audit, 1,932 delivery rows were missing the same back-reference field, and 1,879 of them came from a single signing key. It looked like a widespread pattern until we grouped by source.

How many distinct row sets sit behind your mean of 8?

Collapse
 
rkj180220 profile image
Ramkumar Jayakumar •

That’s a fair correction to how the metric could be read. The mean of eight describes corroborated claims, and I haven’t measured how many distinct underlying row sets they represent. A count and a sum over the same deposits share evidence.

The prototype retains evidence references, but it doesn’t calculate evidence overlap. Having handlers return the complete record IDs they consumed would make that analysis more reliable.

The shared-model blind spot is also a real concern for this evaluation. All specialists used the same small model and tuning fixtures. The rapid-movement results show a weakness worth investigating, but they don’t establish that overlapping evidence caused it. I’d need to group claims by source records and examine their errors together before drawing that conclusion.

Collapse
 
sudokat_ profile image
Gordon Chase •

That untouched structuring miss is the sneaky mirror image of hallucination: a deterministic verifier catches loud lies, while silent omissions still slip past with a clean audit trail. Do you require each specialist to post an explicit negative claim when a rule comes up empty, or can an agent just shrug and stay quiet?

Collapse
 
rkj180220 profile image
Ramkumar Jayakumar •

Good catch, Gordon. The prototype does not require a machine-checkable negative for every rule. The specialist prompt asks it to mention empty tool results in the summary and explicitly keeps negatives such as ‘no links’ out of the typed claims. The submission validator also permits an empty claims list.

So a specialist must submit a finding, but that does not prove it checked everything it should have. Missing or failed specialists are tracked separately; a completed investigation that overlooks a relevant pattern can still slip through. Verification checks the claims that were posted, not the completeness of the investigation.

I’d add a required coverage record for each applicable check: checked with findings, checked with no match, unknown, or failed, tied to the query scope and source version. That would make omissions visible, though the coverage checks would also need testing. It is a next step, not something this prototype currently guarantees.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.