Find the rule fora bank complaint.

This AI reads a complaint sent to the federal consumer-finance regulator (CFPB) and names the federal rule that applies, or says none does. On 60 real complaints it gave the right answer 75% of the time, versus 35% for keyword search.

Complaint 2892126quote checked

“The cash deposit was not credited to my checking account after the ATM accepted it.”

“The consumer's receipt of an incorrect amount of money from an electronic terminal.”
1Rule foundDebit and ATM errors
2Quote matches the rule word for wordPASS
3A person approvesWAITING

Every bank complaint needs the right rule.

When a customer complains, the bank must handle it under the matching federal rule, and those rules set deadlines. An ATM deposit that never showed up falls under the rule for debit, ATM and money-transfer errors (12 CFR 1005.11). A wrong charge on a credit card bill falls under the rule for credit card billing errors (12 CFR 1026.13). An AI that misquotes a rule, or makes one up, can turn a time-saver into a legal problem.

Public complaint archiveReal complaints published by the regulator, with personal details removed.Rule for debit, ATM and money-transfer errorsOfficial text from the federal rulebook (eCFR).Rule for credit card billing errorsOfficial text from the same federal rulebook.
Readsa real complaint
Looks upthe closest passages
Rules it knows2 federal rules
AI answers withone rule, one quote
Safety checkquote is in the rule
Final saya person approves
Rule12 CFR 1026.13
Quote checkPASS
ApprovalWAITING

The AI may read the rule. It cannot rewrite it.

The AI must answer with one rule and one quote. Code then checks that the quote appears word for word in the official rule text. If it does not, the answer is thrown out. "No rule applies" is always an allowed answer.

Tested on 60 real complaints.

Each complaint is labeled by the category the consumer picked. We compared the AI with keyword search, which was tuned on these same 60 complaints. That gives keyword search a head start. Higher is better for every number below.

75%right answers from the AI
35%right answers from keyword search, tuned on the same 60
33.3%right answers from keyword search, untuned
100%look-alike complaints correctly told "no rule applies" (keyword search: 10%)
100%times the right rule was among the first 3 passages found
100%quotes that matched the rule word for word (29 of 29)

By type, the AI got 65% of debit and ATM cases right, 65% of credit card cases, and 95% of cases where no rule applies. Each answer took about 8.8 seconds. Running it cost $0.00.

How it works

The AI only picks from passages it is handed. Code checks its work. A person makes the final call.

  1. Read the complaint

    Start from a real complaint the regulator published.

  2. Look up the closest passages

    Keyword search finds the parts of the two rules that share the most words with the complaint.

  3. Ask the AI for one answer

    It names one rule, copies one quote from it, and gives a short reason. Or it says no rule applies.

  4. Check the quote, then a person approves

    Code throws out any quote that is not word for word in the rule. Nothing happens until a person approves.

Loading…

LOADING…

Source: public complaint archive

Try your own complaint

This part needs your own AI account key (optional). The key stays in this browser tab and goes only to the AI company you pick.

The answer appears here.

Try it

Pick a real complaint. The quote box turns green when the quote matches the rule word for word. Then approve it, as a reviewer would. Complaints 02, 06, 07 and 08 get "no rule applies", which shows the red path.

Under each answer, both rules are ranked by how many words they share with the complaint (a higher match score means more in common).

Saved answers from Claude Haiku 5.5, recorded October 12, 2026.

Technical details

For engineers. Full numbers and method are in the README.

Model and output

Claude Haiku 5.5 via Claude Code, recorded 2026-10-12, prompt full-section-v2. Closed JSON with exactly section, quote and reason; Pydantic rejects extra fields. section is 1005.11, 1026.13 or none. Final run: 2 new calls, 58 cached. Median latency 8.8 s, cash cost $0.00.

Retrieval and baseline

rank_bm25 over the paragraphs of two eCFR sections fetched from the versioner API (2026-10-01): 12 CFR 1005.11 (Regulation E error resolution) and 12 CFR 1026.13 (Regulation Z billing error resolution). Recall at 3: 100%. Baseline: top BM25 section, or none when the top score is at or below a cutoff tuned on the same 60 cases (35%, flatters the baseline). Threshold-0 BM25: 33.3%.

Guardrail

Exact substring check of the quote against the fetched section text; 29 of 29 cited outputs passed. A refusal (none, empty quote) is a valid output. Every result waits for human approval.

Evaluation

60 CFPB narratives, 20 per class. Labels are mapped from consumer-selected Product, Issue and Sub-issue fields. The none class has 10 near misses and 10 other-product cases. Recall (1005.11 / 1026.13 / none): agent 65 / 65 / 95%, tuned BM25 70 / 25 / 10%, threshold-0 BM25 75 / 25 / 0%. Near-miss none accuracy: 100% vs 10% vs 0%.

Data and licenses

CFPB Consumer Complaint Database Narratives Archive, an official public record published after CFPB PII scrubbing. eCFR regulation text, public domain U.S. government source.

Limitations

Labels are consumer-selected categories, not a lawyer's judgment. Narratives are unverified, one-sided allegations. Only 12 CFR 1005.11 and 1026.13 are covered. The live demo is BYOK: the key stays in sessionStorage and is sent only to the chosen provider (claude-3-5-haiku-latest or gpt-4o-mini).

See the code.

The repository holds the lookup, the quote checker, the 60 test complaints and the automated tests.