Failed-transfer complaints: the customer's rights and AI triage
A customer says 'debited, no credit, no refund' and the words are the same whether the money failed, arrived or was refunded twice. The logs decide which. A model may read the message and draft the reply; code checks it and a person signs
In the lab week, a customer whose transfer timed out opens a ticket if their money is still out 10 minutes after the debit. That gives 72 tickets, and every message says 'debited, app said no response, no reversal'. In how many had the receiving bank in fact credited the money?
The chapter on debited but not credited followed the same timeouts from the reversals desk: what the sending bank holds, how it asks the switch, and why it must not reverse on a timer. The sending bank covers its books. This chapter sits one desk over, with the person the customer actually reaches. The customer sees a screen. The records are spread over three institutions. Care has to turn the first into an answer using the second, within the rights the customer has, and AI can help with part of that work and must not do the rest.
The lab is the same generated week (Monday 15 to Sunday 21 June 2026, 17,998 transfers). The week has no complaints table, so you build one. Every code, time, wait and wording in the lab is illustrative, and the English and Pidgin complaint lines were written by this chapter’s author: they are not real customers’ messages and not native-speaker data, and no Pidgin speaker has checked them. The chapter writes nothing in Yoruba, Igbo or Hausa and leaves those to speakers of them: the lab’s switch, its timeouts and its customers are not NIBSS, the CBN or any real bank. The real rules sit in dated notes, and where this build could not read a source, the chapter says so.
One message, three outcomes
The customer’s view of a failed transfer is thin. The app says “no response”. The balance shows a debit. The friend says nothing yet. That is all the customer knows, so every message is the same, and the intake desk has one useful extra: the customer is signed in, so the care system knows which account the customer is calling about.
The records know much more. For each transfer the sender’s log shows the debit and any reversal. The switch holds the status queries and the final status. The receiving bank’s log shows whether and when it credited. The settlement tables show whether the transfer was paid for. Your code reads those four sources into an evidence pack, and a small function turns the pack into a class. The class is the answer, and nothing the customer writes changes it.
Step 2 builds the tickets. The rule is a lab input: a customer waits 10 minutes with the money out, then contacts care, unless the money has come back before then. Of the 101 transfers that timed out, 72 produce a ticket, and the other 29 were refunded within the 10 minutes.
| Evidence class (decided by code) | Tickets | Value | What the customer is owed |
|---|---|---|---|
| Credited: no refund due | 34 | ₦396,046.00 | An answer: the receiver has the money, and the debit stands |
| Failed: refund made | 38 | ₦669,124.00 | The refund already posted, and an apology for the wait |
| Break: refunded but receiver credited | 0 | ₦0.00 | Nothing more, and a specialist: the bank is out of pocket |
Read the first row. Thirty-four customers have been debited, the screen said “no response”, and they are right to be worried and wrong about the outcome. The money arrived. For fourteen of them the sender’s own log already held a status answer of 00 before the ticket opened: the bank knew and the customer did not. A reply that says “we are looking into it” wastes their time, and a reply that says “we will refund you” promises money the customer has already sent to someone else.
The third row is empty in this week, and the reason matters. Eight of the timeouts have a break behind them: the sender reversed 40 to 45 seconds after the timeout, and the receiver credited afterwards, as with the transfer of ₦16,295.00 debited at 15:29:52, refunded at 15:30:37 and credited at 15:31:11. The customer has the money back before any complaint would open, so no ticket forms. The bank is still out of pocket, and the break reaches care only if the customer or the receiver writes in later about the same transfer. The honest answer then depends on what is true by the time care replies, and that is why the evidence is read at the moment of the reply, and not copied into the ticket at intake.
The clocks: what the customer is entitled to, and from when
A complaint has deadlines. They differ by source, by type of complaint and by the event that starts them, and a care team that treats them as one number makes mistakes in both directions. The notes below are as far as search results go. This build could not open the CBN’s documents, so every figure rests on a summary and the chapter says which. Read the text before you build a rule on any of them.
The CBN’s Consumer Protection Regulations 2019 are a PDF on the CBN’s site. Search summaries and December 2019 press reports of it give a five-working-day window for responding to customers’ enquiries and requests, say complaints are first lodged with the institution, and refer to an Annexure D of resolution timelines by type of complaint. Press reports give a penalty of ₦500,000 per complaint per week while a complaint stays unresolved past its timeline. This build could not open the PDF, so none of these figures is confirmed. The CBN has also published an exposure draft of revised regulations, which search results date to late 2023, and this build did not confirm whether it was adoptedas of 2026-11.
A 2023 journal article on e-banking consumer protection says internet-banking funds-transfer failures are to be resolved by the bank’s internal dispute unit within three working days, and that the regulations give the CBN’s own department no deadline to finish a disputeas of 2026-11. That is secondary: this build did not find the annexure table itself, so the three days, and which annexure holds them in the current text, must be checked against the regulation.
The instant-payment regulation has its own clocks. Law-firm summaries of the CBN’s 2018 Regulation on Instant (Inter-Bank) Electronic Funds Transfer Services (effective 2 October 2018 according to most sources; one entry gives 20 October) say that funds delivered within 60 seconds mark a payment as instant; that the sending entity must refund the customer within 10 minutes for a failed transaction returned by the receiving entity, and for one it was unable to process within one hour after the next settlement closure; that a wrongly credited transfer is to be reversed by the receiving entity within one business day where funds are available; that settlement is as agreed among participants but no later than T+1, the next business day; one summary adds that the sending entity must write to the receiving entity within 14 working days of the transaction. Press reports, not the text, say a failed instant transfer not reversed within 24 hours of a complaint by the sender or beneficiary attracts a ₦10,000 fine per item. The summaries do not reconcile these figures, and this build could only see the PDF’s cover page and contentsas of 2026-11. Whether the 10 minutes runs from the return, from the debit or from the complaint is not settled by the summaries, which lean to the return. The lab measures the debit reading as a stress case only.
Then there is the route the customer can take. The CBN’s complaint page, in search summaries, tells customers to report to the institution first and wait up to two weeks before escalating to the CBN’s Consumer Protection Department. Other summaries mention 30 days for complaints about excess charges and loans, which this build did not confirmas of 2026-11. A BusinessDay article, which is press and not the rule, adds that a customer may escalate if the bank has not acknowledged within three days or issued a tracking numberas of 2026-11. The CBN department’s FAQ, per search results, is the department’s own question-and-answer document; this build could not read what it says about the department’s resolution time, so no figure is taken from itas of 2026-11. For the customer, the bank’s clock comes first and the CBN’s route opens when the bank misses it.
One more regulator is in dispute. A law firm’s note, and press reports of April 2026, say the Federal High Court in Abuja dismissed a suit by a bank against the Federal Competition and Consumer Protection Commission (FCCPC) and held that the Commission may investigate consumer complaints against banks, the bank having relied on section 65(1)(a) of the Banks and Other Financial Institutions Actas of 2026-11. A 2025 law-firm commentary argues the opposite, that for financial services the CBN holds the consumer-protection poweras of 2026-11. This build did not read the judgment or find whether it was appealed, and it could not open the FCCPC’s own FAQ, so it does not state the Commission’s view. A care team does not settle that dispute. It knows that a customer may write to either body, and that its complaint log is the evidence either will ask for.
The week can measure one thing here: how far the refunds sit from each clock. Step 3 takes every timed-out transfer that was refunded, 67 of them, and counts how many would breach each candidate.
| Candidate clock (a lab input) | Refunds that breach it |
|---|---|
| 10 minutes from the debit | 38 of 67 |
| 24 hours from the complaint | 0 of 67 |
| 3 working days from the complaint (at least 72 hours) | 0 of 67 |
| 5 working days from the complaint (at least 120 hours) | 0 of 67 |
| 2 weeks from the complaint | 0 of 67 |
The generator never leaves a customer more than about half an hour, so nothing breaches a clock measured in days, and the week proves nothing about a bank that really is slow. What it shows is the cost of picking the reading. The same 67 refunds are 38 breaches or none depending on one start event and one limit, and the summaries do not agree on either. A ticket system that stores a single “SLA hours” column cannot hold that. It needs, per complaint type, the rule’s source, the event that starts the clock and the limit, with the date someone checked it. That record is the thing an examiner will ask for.
Triage: who does what
Triage is three jobs: read the message, find the transfer, decide the route. Each has a natural owner.
Read the message. This is where a model is useful. Customers write in English, Nigerian Pidgin, Yoruba, Igbo and Hausa, in the amount styles module 1 taught (“₦1.5k”, “N1,500”, “1500 naira”, “15k”), with typos, and with several problems in one message. A model that returns one of four labels for each message is a classification task you can measure. How such models work is the AI Engineering course’s subject, and how to measure one is the earlier chapter on language models in payments operations.
Find the transfer. This is code. The customer is signed in, so the lookup is the customer’s own debits in the 24 hours before the ticket, with an amount close to the one in the message. Close, because customers round: “₦16.4k” is ₦16,445.00 to within 0.3%. A model must never be the thing that picks which transaction the complaint is about, because a plausible wrong match produces a confident wrong reply. The lab lets you see the cost of removing the account number: without it the same message matches a median of four debits from the sending bank in the same 24 hours, and exactly one for 8 of 72.
Decide the route. This is code again, from the evidence class. Two classes go to an agent who can approve a template. Any class that starts with BREAK goes to a specialist, because the bank is out of pocket, the customer may hold money twice, and the reply needs a person who can say what happens next. A model drafts only after the route is fixed.
What a keyword rule does, and what it leaves for a model
Before asking what a model adds, write the rule an operator would write. Step 4 creates 80 messages: the 72 tickets in wordings the lab invents (English and Pidgin, three amount styles) and eight others written by hand: three “I did not make this transfer”, two wrong-account messages and three that are not transfer complaints at all. Step 5 classifies them by keywords (“debit”, “transfer”, “sent”, “no response” for a transfer; “did not make”, “not me” for fraud; and so on).
The rules get 68 of 80 right. The twelve misses are not random. Ten are one Pidgin template (“Oga, bank don take my ₦8.5k and I no know if the money reach”), because none of the keywords is a Pidgin word. One is a card complaint (“My ATM card was debited ₦12,000”) that the rules read as a transfer. And one is “N45k don comot from my account and I no do am. Na thief.”, a fraud complaint in Pidgin that the rules file under “other”. That last miss costs the most. A customer saying the money was stolen waits in the wrong queue, with a clock the bank does not know is running.
A model can plausibly read the Pidgin, and that is the case for using one. The lab does not tell you how well. The wording is the lab’s, the 80 messages are too few to give an interval, and the Pidgin is the author’s own writing, not checked by a speaker, so a model that misses it or reads it well proves little either way. What the lab does give you is a harness: the same scoring function runs on the keyword rules and on whatever a model returns, and it reports the fraud messages sent elsewhere separately, because that number is the one a head of care would reject a tool on.
The amount reader has its own limits. It handles “N5,833”, “5833 naira”, “₦5.8k” and “2.3m”, and it finds nothing in “fifty thousand naira”, so a message in words arrives with no amount and goes to a person. One message in the lab matches two debits: a customer who sent ₦7,601.00 and then ₦7,672.00 within a day writes “N7,672”, which fits both inside 5%. The right behaviour is to ask the customer for the reference from the receipt, and no model should guess.
What a reply may say
A reply to a customer is a statement by the bank. Three things in it can be wrong: a fact, a promise and a number.
The fact comes from the pack. “Your transfer was credited at 12:55” is allowed when the class says so, and it is the most useful sentence in the whole exchange. The promise is the dangerous one. “We will refund you” is allowed only for a customer whose logs say a refund is owed, and “within 24 hours” is allowed only if a person has checked the rule that gives 24 hours, from which event, for this complaint type. The number is the amount, which must equal the transfer’s, and a ten-digit number in a draft may be an account number that should not be there.
Step 6 encodes those three as a guard. It reads a draft and the pack and returns flags: a reply on a break goes to a specialist, the amount differs from the transfer’s, the reply promises a refund where the receiver was credited, the reply says “credited” where the logs show a refund, a deadline nobody has approved, a ten-digit number. The list of approved deadlines starts empty, so every deadline is flagged until a person with the current rules adds one. The guard does not approve anything. An empty list of flags means a person still reads the reply, and its decision is logged with the draft, the flags and who approved.
Run it on three drafts you write by hand and you see the value of the design. The reply that says what the logs say passes. The reply that promises a refund and a time is stopped twice. The reply on the break, with a typo in the amount, goes to the specialist and is stopped for the amount as well. Then you run a model’s draft through the same guard, and the guard does not care who wrote it.
A model on its own must not decide anything that matters to the customer. The Nigeria Data Protection Act 2023, per search results and law-firm commentary, gives a data subject in its section 37 a right not to be subject to a decision based solely on automated processing, including profiling, where it has legal or similarly significant effects, with exceptions for contract, legal authorisation and consent, and commentary reads the section as allowing a person to ask for human involvement and to contest the decision. This build read the statute only through search results and commentary, and quoted the human-intervention wording second-hand, so take it from the gazetted textas of 2026-11. Whether a refund refusal is such a decision is a question for counsel. The design answer is cheap: the model drafts, a person decides, and the customer can reach the person.
What the week does not show
Complaints are a poor detector. The key plants eleven money breaks around reversals: four customers refunded after a late success, four credits never settled and three customers reversed twice. At 10 minutes of patience none of the eleven sits behind a ticket, and the same is true at 5, 1 and 30. Eight of them are timeouts that the sender reversed 40 to 45 seconds later, wrongly, and only a customer who called in the first 45 seconds would see them in a queue. The three double refunds follow transfers that the switch declined at once, so there is no timeout ticket and the customer holds the money twice and says nothing. The customers who were refunded before they would complain, or whose bank lost the money and not them, never write in. That is the reason the earlier chapters used reconciliation to find them, and why a care team that has the evidence pack should still send its breaks to the people who reconcile.
The lab also has no real complaints, no complainant who writes twice, no customer who is wrong about the amount, no phone call and no regulator’s letter. Resolution in the lab is the moment the sender’s own log settles the customer’s position, which is not the moment care replies. A real clock would run to a reply and a closure, and your ticket system would need both.
Where it goes wrong
A reply written from the message. The model hears “debited, no credit, no refund” and drafts a refund promise. In the lab week that is wrong for 34 of the 72.
One clock for every complaint. A single SLA column hides that the sources disagree on the limit, on the event that starts it and on the complaint type. A rule that is checked once is out of date after the next circular.
A model that picks the transaction. It chooses the likeliest debit and sounds sure. Match in code, from the signed-in account, and ask the customer for the reference when more than one debit fits.
Fraud claims in the wrong queue. A message that says “I did not make this” is not a failed-transfer complaint. Test the classifier on the wordings you know it will meet, in every language the customers use, and count the fraud messages it routes elsewhere separately.
No log. When the examiner or the customer asks why a reply said what it said, the answer is the pack, the draft, the flags and the name of the person who approved. Keep all four.
You work in labs/finance and make a folder complaints/ for your scripts. Every script reads data/rails.sqlite and never writes to it. Money is integer kobo. Nothing opens the answer key until step 8.
1. Generate the week and check it. Skip the first command if data/rails.sqlite exists.
cd labs/finance
python3 rails.py
python3 check.py --rails-only
mkdir -p complaints32 participants, 22,835 accounts, 17,998 transfers, 12,158 name enquiries, 136 status queries
21 settlement sessions, 125 batch files, 193 RTGS payments, 3,412 USSD sessions, 3,453 PSB postings
planted (answers/rails_truth.csv): credited_without_settlement 4, customer_fee_not_charged 6, customer_reversed_twice 3, levy_not_charged 5, mmo_trust_shortfall 1, participant_limit 4, participant_outage 1, psb_cash_out_fee_not_posted 1, psb_cash_out_posted_twice 1, reversed_after_late_success 4, same_number_two_banks 8, switch_incident 1, telco_record_missing 12
rails week: 17,998 transfers, 21 settlement sessions, 22,835 accounts; checks 21-25 run
OK: all invariants holdThe last line says invariants 21 to 25 hold. The planted line names breaks the chapters find; do not open answers/rails_truth.csv yet.
2. Build the evidence packs and the tickets. lib.py holds the shared code: the pack, the evidence class, the ticket rule, the amount reader and the keyword rules. Write it, then run the first script.
cat > complaints/lib.py <<'EOF'
"""Shared code for the complaints lab. Money is integer kobo; naira() only formats it."""
import datetime as dt
import re
import sqlite3
PATIENCE_MIN = 10 # LAB INPUT: minutes a customer waits with money out before contacting care
db = sqlite3.connect("data/rails.sqlite")
when = dt.datetime.fromisoformat
naira = lambda k: f"₦{k // 100:,}.{k % 100:02d}"
minutes = lambda a, b: (when(b) - when(a)).total_seconds() / 60
def pack(sid):
"""Everything the logs say about one transfer: the evidence pack."""
t = db.execute("""SELECT session_id, src, dest, debit_account, amount_kobo, at, channel, first_response,
final_status, final_at, settlement_session FROM transfers WHERE session_id = ?""", (sid,)).fetchone()
p = dict(zip(["sid", "src", "dest", "account", "kobo", "at", "channel", "first", "final", "final_at", "settled"], t))
p["settled"] = p["settled"] != ""
out = db.execute("""SELECT amount_kobo, status, reversed_at FROM bank_log
WHERE session_id = ? AND direction = 'out' ORDER BY amount_kobo DESC""", (sid,)).fetchall()
p["reversals"] = [r[2] for r in out if r[1] == "reversed" and r[2]]
p["credited_at"] = (db.execute("SELECT posted_at FROM bank_log WHERE session_id = ? AND direction = 'in'", (sid,)).fetchone() or [None])[0]
p["asked"] = [(a, r) for a, r in db.execute("SELECT at, response FROM tsq WHERE session_id = ? ORDER BY at", (sid,))]
return p
def evidence_class(p):
"""What the logs say happened, decided by code and never by the customer's words or a model."""
refunded, credited = bool(p["reversals"]), p["credited_at"] is not None
if len(p["reversals"]) > 1:
return "BREAK refunded twice"
if refunded and credited and p["settled"]:
return "BREAK refunded but receiver credited"
if credited and not p["settled"]:
return "BREAK credited, never settled"
if credited and p["final"] == "00" and not refunded:
return "credited: no refund due"
if refunded and not credited:
return "failed: refund made"
return "UNEXPLAINED"
def bank_knew_at(p):
"""When the sender's own status query first answered 00 (it held the answer), else None."""
return next((a for a, r in p["asked"] if r == "00"), None)
def resolved_at(p):
"""When the customer's position was settled in the sender's own record: the refund, else the first 00 answer."""
return p["reversals"][0] if p["reversals"] else bank_knew_at(p)
def tickets(patience=PATIENCE_MIN):
"""One ticket per timed-out transfer whose customer is still waiting patience minutes after the debit."""
out = []
for (sid,) in db.execute("SELECT session_id FROM transfers WHERE first_response = '97' ORDER BY at"):
p = pack(sid)
cls = evidence_class(p)
opened = when(p["at"]) + dt.timedelta(minutes=patience)
res = resolved_at(p)
if p["reversals"] and when(p["reversals"][0]) <= opened: # money back before the customer would call
continue
out.append(dict(p, cls=cls, opened=opened.isoformat(), resolved=res))
return out
def parse_amount(text):
"""Read a naira amount from a customer's words into integer kobo, or None. Handles N5,833 / 5833 naira / 5.8k / 2.3m."""
s = text.lower().replace("₦", "n ").replace(",", "")
for m in re.finditer(r"(\d+(?:\.\d+)?)\s*(k|m)?", s):
num, unit = m.groups()
whole, _, frac = num.partition(".")
scale = {"": 1, "k": 1000, "m": 1_000_000}[unit or ""]
kobo = (int(whole) * 100 + int((frac + "00")[:2])) * scale
if kobo >= 10_000: # ignore clock times and such: under ₦100
return kobo
return None
RULES = [("not_me", ["did not make", "didn't make", "not me", "unauthorised", "unauthorized", "someone has", "somebody has", "without my"]),
("wrong_account", ["wrong account", "wrong person", "wrong number"]),
("transfer", ["debit", "transfer", "sent", "send", "reverse", "no response"])]
def classify(text):
low = text.lower()
for label, words in RULES:
if any(w in low for w in words):
return label
return "other"
EOF
cat > complaints/step2_tickets.py <<'EOF'
from collections import Counter
from lib import *
T = tickets()
print(f"1. tickets opened when money is still out {PATIENCE_MIN} min after the debit (a lab input)")
timed_out = db.execute("SELECT COUNT(*) FROM transfers WHERE first_response = '97'").fetchone()[0]
print(f" {len(T)} tickets from {timed_out} timed-out transfers")
by = Counter(t["cls"] for t in T)
kobo = Counter()
for t in T:
kobo[t["cls"]] += t["kobo"]
for cls in sorted(by):
print(f" {by[cls]:>3} {naira(kobo[cls]):>13} {cls}")
print("2. the same rule with other patience values")
for m in (0, 1, 5, 10, 30):
c = Counter(t["cls"].split(" ")[0] for t in tickets(m))
print(f" patience {m:>2} min: {sum(c.values()):>3} tickets, {c['BREAK']} of them a break")
print("3. the bank already held the answer when the customer called")
known = [t for t in T if t["cls"] == "credited: no refund due" and when(t["resolved"]) <= when(t["opened"])]
nocred = [t for t in T if t["cls"] == "credited: no refund due"]
print(f" {len(known)} of {len(nocred)} customers who were never refunded, because the transfer had been credited, "
f"had a status answer 00 in their bank's log before the ticket opened")
print("4. the breaks among all timed-out transfers, ticket or not")
ticketed = {t["sid"] for t in T}
B = []
for (sid,) in db.execute("SELECT session_id FROM transfers WHERE first_response = '97' ORDER BY at"):
p = pack(sid)
if evidence_class(p).startswith("BREAK"):
B.append(p)
print(f" {len(B)} breaks, {sum(p['sid'] in ticketed for p in B)} of them behind a ticket at {PATIENCE_MIN} min of patience")
for p in B[:3]:
print(f" ...{p['sid'][-8:]} {p['src']}->{p['dest']} {naira(p['kobo'])}: debited {p['at'][11:19]}, refunded {p['reversals'][0][11:19]} "
f"({minutes(p['at'], p['reversals'][0]) * 60:.0f} s later), receiver credited {(p['credited_at'] or 'never')[11:19]}, switch final {p['final']} settled {p['settled']}")
EOF
python3 complaints/step2_tickets.py1. tickets opened when money is still out 10 min after the debit (a lab input)
72 tickets from 101 timed-out transfers
34 ₦396,046.00 credited: no refund due
38 ₦669,124.00 failed: refund made
2. the same rule with other patience values
patience 0 min: 101 tickets, 8 of them a break
patience 1 min: 86 tickets, 0 of them a break
patience 5 min: 80 tickets, 0 of them a break
patience 10 min: 72 tickets, 0 of them a break
patience 30 min: 36 tickets, 0 of them a break
3. the bank already held the answer when the customer called
14 of 34 customers who were never refunded, because the transfer had been credited, had a status answer 00 in their bank's log before the ticket opened
4. the breaks among all timed-out transfers, ticket or not
8 breaks, 0 of them behind a ticket at 10 min of patience
...18609909 B01->B19 ₦6,336.00: debited 07:46:48, refunded 07:47:28 (40 s later), receiver credited 07:47:53, switch final 97 settled False
...06270881 B11->B05 ₦16,295.00: debited 15:29:52, refunded 15:30:37 (45 s later), receiver credited 15:31:11, switch final 00 settled True
...64397192 S02->B10 ₦13,822.00: debited 06:10:04, refunded 06:10:49 (45 s later), receiver credited 06:12:01, switch final 00 settled TrueSeventy-two tickets from 101 timeouts: 34 credited and 38 failed and refunded. No break sits behind a ticket at 1 minute or more of patience, because the sender’s wrong refund arrives 40 to 45 seconds after the timeout; only a customer who calls at once (patience 0) is ahead of it, in 8 of the 8. Fourteen of the 34 credited customers called when their bank already held the answer.
3. Measure the clocks. The candidate clocks are lab inputs; the chapter’s notes say where each reading comes from.
cat > complaints/step3_clocks.py <<'EOF'
import statistics
from lib import *
T = tickets()
rows = []
for t in T:
res = t["resolved"]
rows.append(dict(refund=bool(t["reversals"]), cls=t["cls"], wait_open=max(0.0, minutes(t["opened"], res)), wait_debit=minutes(t["at"], res)))
print("1. minutes from ticket opened to the customer's position being settled in the sender's log")
for cls in sorted({r["cls"] for r in rows}):
w = [r["wait_open"] for r in rows if r["cls"] == cls]
print(f" {cls:<40} {len(w):>3} tickets: median {statistics.median(w):>5.1f}, longest {max(w):>5.1f}, answered at once {sum(x == 0 for x in w)}")
# Candidate clocks. Each is a LAB INPUT: the chapter's notes say where each reading comes from and how far to trust it.
clocks = [("10 minutes from the debit", "debit", 10),
("24 hours from the complaint", "open", 24 * 60),
("3 working days from the complaint (at least 72 hours)", "open", 72 * 60),
("5 working days from the complaint (at least 120 hours)", "open", 120 * 60),
("2 weeks from the complaint", "open", 14 * 24 * 60)]
print("2. refunds that would breach each candidate clock (every timed-out transfer that was refunded, ticket or not)")
refunds = []
for (sid,) in db.execute("SELECT session_id FROM transfers WHERE first_response = '97'"):
p = pack(sid)
if p["reversals"]:
opened = (when(p["at"]) + dt.timedelta(minutes=PATIENCE_MIN)).isoformat()
refunds.append(dict(wait_debit=minutes(p["at"], p["reversals"][0]), wait_open=max(0.0, minutes(opened, p["reversals"][0]))))
for name, start, limit in clocks:
n = sum(1 for r in refunds if r["wait_" + start] > limit)
print(f" {name:<56} {n:>3} of {len(refunds)}")
print("3. the slowest five, from the debit")
for t, r in sorted(zip(T, rows), key=lambda x: -x[1]["wait_debit"])[:5]:
print(f" ...{t['sid'][-8:]} {t['src']} {naira(t['kobo']):>11} {r['wait_debit']:>5.1f} min from the debit {t['cls']}")
EOF
python3 complaints/step3_clocks.py1. minutes from ticket opened to the customer's position being settled in the sender's log
credited: no refund due 34 tickets: median 3.5, longest 20.0, answered at once 14
failed: refund made 38 tickets: median 11.0, longest 20.9, answered at once 0
2. refunds that would breach each candidate clock (every timed-out transfer that was refunded, ticket or not)
10 minutes from the debit 38 of 67
24 hours from the complaint 0 of 67
3 working days from the complaint (at least 72 hours) 0 of 67
5 working days from the complaint (at least 120 hours) 0 of 67
2 weeks from the complaint 0 of 67
3. the slowest five, from the debit
...15922224 B02 ₦3,248.00 30.9 min from the debit failed: refund made
...18514715 B04 ₦3,906.00 30.2 min from the debit failed: refund made
...91846121 B13 ₦19,185.00 30.0 min from the debit failed: refund made
...63493152 B15 ₦20,950.00 30.0 min from the debit credited: no refund due
...47639016 B22 ₦83,699.00 29.9 min from the debit failed: refund madeNothing breaches a clock measured from the complaint, because the generator never leaves a customer more than about 30 minutes. Measured from the debit against 10 minutes, 38 of 67 refunds are late. The week cannot say which reading is the rule.
4. Write the messages. The wording is yours to change; the amounts, banks and times are the week’s. The script also writes the truth for each message, which step 5 uses to score the rules.
cat > complaints/step4_messages.py <<'EOF'
"""Write what customers would send, from the week's tickets. LAB INPUT: the wording is invented; the amounts, banks and times are the week's."""
import json
import random
from lib import *
rng = random.Random(42)
STYLES = [lambda k: f"N{k // 100:,}", lambda k: f"{k // 100} naira", lambda k: f"₦{round(k / 100000, 1)}k"]
EN = ["I sent {amt} to a {bank} account. My account was debited and the app said no response. The money has not come back. Please help.",
"Transfer of {amt} to {bank} debited from my account, app showed no response and I still have no reversal.",
"pls reverse my {amt}, i was debited and it didnt go through",
"I was debited {amt} for a transfer to {bank}. My friend says he has not checked. Is it successful or failed?"]
PCM = ["Dem don debit me {amt} but my person never see money. Wetin I go do?",
"I send {amt} go {bank}, e show say no response, my money no come back. Abeg help me.",
"Oga, bank don take my {amt} and I no know if the money reach. Make una check am."]
OTHER = [("not_me", "I did not make the ₦45,000 transfer on my account on Tuesday night. Someone has used my account. Block it."),
("not_me", "N45k don comot from my account and I no do am. Na thief."),
("not_me", "Somebody has my phone and sent 120000 naira from my app without my permission."),
("wrong_account", "I sent ₦20,000 to the wrong account number. Please reverse it."),
("wrong_account", "I mistakenly sent 15k to a wrong person, the account number was one digit wrong."),
("other", "My ATM card was debited ₦12,000 at a POS but I got no goods."),
("other", "Why was I charged an SMS alert fee twice this month?"),
("other", "I want to know the status of my loan application.")]
msgs = []
for t in tickets():
amt = rng.choice(STYLES)(t["kobo"])
text = rng.choice(EN if rng.random() < 0.65 else PCM).format(amt=amt, bank=t["dest"])
msgs.append(dict(text=text, account=t["account"], opened=t["opened"], truth_type="transfer", truth_sid=t["sid"], truth_class=t["cls"]))
for kind, text in OTHER:
msgs.append(dict(text=text, account="", opened="", truth_type=kind, truth_sid="", truth_class=""))
rng.shuffle(msgs)
for i, m in enumerate(msgs, 1):
m["id"] = f"C{i:03d}"
json.dump(msgs, open("complaints/messages.json", "w"), ensure_ascii=False, indent=1)
kinds = {}
for m in msgs:
kinds[m["truth_type"]] = kinds.get(m["truth_type"], 0) + 1
print(f"{len(msgs)} messages written to complaints/messages.json: " + ", ".join(f"{k} {v}" for k, v in sorted(kinds.items())))
for m in msgs[:6]:
print(f" {m['id']} {m['text']}")
EOF
python3 complaints/step4_messages.py80 messages written to complaints/messages.json: not_me 3, other 3, transfer 72, wrong_account 2
C001 I sent ₦10.1k to a B02 account. My account was debited and the app said no response. The money has not come back. Please help.
C002 pls reverse my 12396 naira, i was debited and it didnt go through
C003 I sent N3,248 to a B07 account. My account was debited and the app said no response. The money has not come back. Please help.
C004 I send N20,950 go B22, e show say no response, my money no come back. Abeg help me.
C005 Transfer of N4,359 to B12 debited from my account, app showed no response and I still have no reversal.
C006 I was debited 18037 naira for a transfer to B19. My friend says he has not checked. Is it successful or failed?Eighty messages: 72 transfer complaints and eight others. Look at the wordings, and add three of your own in a language you speak.
5. Score a keyword baseline and the transfer matcher.
cat > complaints/step5_baseline.py <<'EOF'
import json
import statistics
from collections import Counter
from lib import *
msgs = json.load(open("complaints/messages.json"))
print("1. message type: the keyword rules against what each message really was")
conf = Counter((m["truth_type"], classify(m["text"])) for m in msgs)
right = sum(v for (a, b), v in conf.items() if a == b)
print(f" {right} of {len(msgs)} right")
for (a, b), v in sorted(conf.items()):
if a != b:
print(f" was {a}, rules said {b}: {v}")
for m in msgs:
if m["truth_type"] != classify(m["text"]):
print(f" {m['id']} {m['text']}")
def candidates(m, tol=0.05):
"""The customer's own debits in the 24 hours before the ticket, whose amount is within tol of what the message says."""
amt = parse_amount(m["text"])
if amt is None:
return None
lo = (when(m["opened"]) - dt.timedelta(hours=24)).isoformat()
rows = db.execute("SELECT session_id, amount_kobo FROM transfers WHERE debit_account = ? AND at >= ? AND at <= ?",
(m["account"], lo, m["opened"])).fetchall()
return [s for s, k in rows if abs(k - amt) <= tol * amt]
print("2. matching a transfer message to a debit, with the customer's account number known at intake")
res = Counter()
for m in (m for m in msgs if m["truth_type"] == "transfer"):
c = candidates(m)
res["no amount read" if c is None else "no match" if not c else "one match, right" if c == [m["truth_sid"]] else
"one match, wrong" if len(c) == 1 else "several matches"] += 1
for k, v in sorted(res.items()):
print(f" {v:>3} {k}")
print("3. the same lookup without the account number: debits from the same sending bank within 24 hours of the real debit, amount within 5%")
n = []
for m in (m for m in msgs if m["truth_type"] == "transfer"):
amt = parse_amount(m["text"])
p = pack(m["truth_sid"])
t0 = when(p["at"])
c = db.execute("""SELECT COUNT(*) FROM transfers WHERE src = ? AND at >= ? AND at <= ? AND ABS(amount_kobo - ?) <= 0.05 * ?""",
(p["src"], (t0 - dt.timedelta(hours=12)).isoformat(), (t0 + dt.timedelta(hours=12)).isoformat(), amt, amt)).fetchone()[0]
n.append(c)
print(f" candidates per message: median {statistics.median(n):.0f}, most {max(n)}; exactly one for {sum(x == 1 for x in n)} of {len(n)}")
EOF
python3 complaints/step5_baseline.py1. message type: the keyword rules against what each message really was
68 of 80 right
was not_me, rules said other: 1
was other, rules said transfer: 1
was transfer, rules said other: 10
C012 Oga, bank don take my ₦2.3k and I no know if the money reach. Make una check am.
C015 Oga, bank don take my ₦1.8k and I no know if the money reach. Make una check am.
C024 Oga, bank don take my ₦17.3k and I no know if the money reach. Make una check am.
C027 Oga, bank don take my ₦6.6k and I no know if the money reach. Make una check am.
C028 Oga, bank don take my 3573 naira and I no know if the money reach. Make una check am.
C039 Oga, bank don take my ₦8.9k and I no know if the money reach. Make una check am.
C043 Oga, bank don take my N100 and I no know if the money reach. Make una check am.
C062 My ATM card was debited ₦12,000 at a POS but I got no goods.
C073 N45k don comot from my account and I no do am. Na thief.
C076 Oga, bank don take my 5276 naira and I no know if the money reach. Make una check am.
C077 Oga, bank don take my ₦11.3k and I no know if the money reach. Make una check am.
C080 Oga, bank don take my 9163 naira and I no know if the money reach. Make una check am.
2. matching a transfer message to a debit, with the customer's account number known at intake
71 one match, right
1 several matches
3. the same lookup without the account number: debits from the same sending bank within 24 hours of the real debit, amount within 5%
candidates per message: median 4, most 11; exactly one for 8 of 72The rules get 68 of 80: ten Pidgin transfer messages missed, a card complaint read as a transfer, and the Pidgin fraud message filed under other. With the account number, 71 of 72 match one right debit and one message, from a customer with two similar debits, matches both. Without it, the median message fits four debits.
6. Guard the replies. Three drafts written by hand, a decision for each, and a log. The approved-deadlines list starts empty.
cat > complaints/step6_guard.py <<'EOF'
import json
import re
import sys
from lib import *
APPROVED_DEADLINES = [] # LAB INPUT: promises a person has checked against the current rules. Empty: every deadline is flagged.
def amounts_in(text):
return [parse_amount(m.group(0)) for m in re.finditer(r"(?:₦|N)\s?\d[\d,]*(?:\.\d+)?\s?[km]?", text)]
def guard(draft, p, cls):
"""Checks a draft reply against the evidence pack. Returns the reasons a person must look; an empty list is not approval."""
low, flags = draft.lower(), []
if cls.startswith("BREAK"):
flags.append("evidence class is a break: a specialist owns this reply")
for a in amounts_in(draft):
if a is not None and a != p["kobo"]:
flags.append(f"amount {naira(a)} is not the transfer's {naira(p['kobo'])}")
promises_refund = re.search(r"\b(will|shall|going to)\b[^.]*\b(refund|reverse|credit(ed)? back)", low)
if cls == "credited: no refund due" and promises_refund:
flags.append("promises a refund where the logs show the receiver was credited")
if cls == "failed: refund made" and re.search(r"\bwas credited\b|\bsuccessful\b", low):
flags.append("says the transfer was credited where the logs show a refund")
for d in re.findall(r"\b\d+\s*(?:working\s+)?(?:minutes?|hours?|days?|weeks?)\b", low):
if d not in APPROVED_DEADLINES:
flags.append(f"states a deadline ('{d}') nobody has approved")
if re.search(r"\b\d{10}\b", draft):
flags.append("contains a ten-digit number that may be an account number")
return flags
def decide(draft, p, cls, approved_by=None):
flags = guard(draft, p, cls)
route = "specialist" if cls.startswith("BREAK") else "agent"
sent = bool(approved_by) and not flags
return dict(route=route, flags=flags, sent=sent)
T = tickets()
credited = next(t for t in T if t["cls"] == "credited: no refund due")
brk = next(pack_class for pack_class in (dict(pack(sid), cls=evidence_class(pack(sid)))
for (sid,) in db.execute("SELECT session_id FROM transfers WHERE first_response = '97' ORDER BY at"))
if pack_class["cls"] == "BREAK refunded but receiver credited") # no ticket yet: the customer writes after the refund
cr_at, cr_p = credited["credited_at"][11:16], credited["kobo"]
drafts = [
("1. says what the logs say", credited,
f"Your transfer of {naira(cr_p)} was credited to the receiving account at {cr_at}. No refund is due, so the debit stands. "
f"If the receiver cannot see it, ask them to check with their bank and give them that time."),
("2. promises a refund", credited, f"Sorry for the delay. We will refund your {naira(cr_p)} within 24 hours."),
("3. the break, with a typo in the amount", brk, "Your transfer of ₦16,925.00 failed and has been refunded. Thank you for your patience."),
]
if len(sys.argv) > 1:
drafts.append(("4. your file " + sys.argv[1], credited, open(sys.argv[1]).read()))
log = open("complaints/decisions.jsonl", "w")
for name, t, text in drafts:
d = decide(text, t, t["cls"], approved_by="agent-1")
log.write(json.dumps(dict(ticket=t["sid"][-8:], draft=text, **d), ensure_ascii=False) + "\n")
print(f"{name}: class '{t['cls']}', route {d['route']}, may be sent: {d['sent']}")
for f in d["flags"] or ["no flags (a person still reads it)"]:
print(f" - {f}")
print(f"{len(drafts)} decisions logged to complaints/decisions.jsonl")
EOF
python3 complaints/step6_guard.py1. says what the logs say: class 'credited: no refund due', route agent, may be sent: True
- no flags (a person still reads it)
2. promises a refund: class 'credited: no refund due', route agent, may be sent: False
- promises a refund where the logs show the receiver was credited
- states a deadline ('24 hours') nobody has approved
3. the break, with a typo in the amount: class 'BREAK refunded but receiver credited', route specialist, may be sent: False
- evidence class is a break: a specialist owns this reply
- amount ₦16,925.00 is not the transfer's ₦16,295.00
3 decisions logged to complaints/decisions.jsonlThe first draft says what the logs say and may be sent after a person approves it. The second promises a refund the logs do not owe and a deadline nobody approved. The third is a break, found in the logs and not through a ticket, with a mistyped amount, so a specialist owns it. complaints/decisions.jsonl holds each decision.
7. Ask an assistant, and score it. This step writes two prompts and a scorer. Paste complaints/prompt_triage.txt into a free assistant or a local model, save its JSON reply as complaints/assistant_labels.json and run the script again. Then paste complaints/prompt_draft.txt, save the reply as complaints/assistant_draft.txt and run python3 complaints/step6_guard.py complaints/assistant_draft.txt. The --selftest option scores the step 5 rules with the same function, so you know what you are comparing against.
cat > complaints/step7_assistant.py <<'EOF'
"""Prompts for a free assistant or a local model, and a scorer for what it gives back. No account numbers go in: message text only."""
import json
import os
import sys
from collections import Counter
msgs = json.load(open("complaints/messages.json"))
LABELS = ["transfer", "not_me", "wrong_account", "other"]
INSTRUCTION = ("Classify each customer message for a Nigerian bank's care desk as one of: transfer (a transfer debited the customer "
"and the customer wants to know what happened or wants money back), not_me (the customer says they did not make "
"the transaction), wrong_account (the customer sent money to the wrong person or number), other. "
"Reply with JSON only: {\"C001\": \"transfer\", ...}. If a message is unclear, use other. Do not add anything else.")
def score(labels):
wrong = [(m["id"], m["truth_type"], labels.get(m["id"], "(missing)")) for m in msgs if labels.get(m["id"]) != m["truth_type"]]
invented = [k for k in labels if k not in {m["id"] for m in msgs}]
bad_label = [k for k, v in labels.items() if v not in LABELS]
risky = [w for w in wrong if w[1] == "not_me"]
print(f" {len(msgs) - len(wrong)} of {len(msgs)} right; {len(wrong)} wrong; invented ids {len(invented)}; labels outside the four {len(bad_label)}")
print(f" fraud messages (not_me) sent to another route: {len(risky)} of {sum(m['truth_type'] == 'not_me' for m in msgs)}")
for w in wrong[:5]:
print(f" {w[0]} was {w[1]}, labelled {w[2]}")
if "--selftest" in sys.argv:
from lib import classify # the keyword rules from step 5, scored by the same function
print("self-test: the step 5 keyword rules, scored as an assistant's reply would be")
score({m["id"]: classify(m["text"]) for m in msgs})
sys.exit()
from lib import naira, tickets
t = next(x for x in tickets() if x["cls"] == "credited: no refund due")
PACK = (f"The customer sent {naira(t['kobo'])} by app. The bank debited it and the switch answered with a timeout. "
f"The receiving bank credited its customer at {t['credited_at'][11:16]}. The switch settled the transfer. The customer was not refunded. "
f"The customer says: 'debited, app said no response, still no reversal'.")
DRAFT = ("Write a reply of at most four sentences to the customer, using only the facts below. Do not state any deadline, "
"do not promise anything not in the facts, and do not mention the receiving customer's name.\n\n" + PACK)
with open("complaints/prompt_draft.txt", "w") as f:
f.write(DRAFT + "\n")
print("draft prompt written to complaints/prompt_draft.txt; save the reply as complaints/assistant_draft.txt and run: python3 complaints/step6_guard.py complaints/assistant_draft.txt")
with open("complaints/prompt_triage.txt", "w") as f:
f.write(INSTRUCTION + "\n\n" + "\n".join(f"{m['id']}: {m['text']}" for m in msgs) + "\n")
print(f"prompt written to complaints/prompt_triage.txt ({len(msgs)} messages, none with an account number)")
print("PROMPT: " + INSTRUCTION)
if os.path.exists("complaints/assistant_labels.json"):
print("scoring complaints/assistant_labels.json")
score(json.load(open("complaints/assistant_labels.json")))
else:
print("no complaints/assistant_labels.json yet: paste the prompt file into an assistant, save its JSON reply there and rerun")
EOF
python3 complaints/step7_assistant.py
python3 complaints/step7_assistant.py --selftestdraft prompt written to complaints/prompt_draft.txt; save the reply as complaints/assistant_draft.txt and run: python3 complaints/step6_guard.py complaints/assistant_draft.txt
prompt written to complaints/prompt_triage.txt (80 messages, none with an account number)
PROMPT: Classify each customer message for a Nigerian bank's care desk as one of: transfer (a transfer debited the customer and the customer wants to know what happened or wants money back), not_me (the customer says they did not make the transaction), wrong_account (the customer sent money to the wrong person or number), other. Reply with JSON only: {"C001": "transfer", ...}. If a message is unclear, use other. Do not add anything else.
no complaints/assistant_labels.json yet: paste the prompt file into an assistant, save its JSON reply there and rerunself-test: the step 5 keyword rules, scored as an assistant's reply would be
68 of 80 right; 12 wrong; invented ids 0; labels outside the four 0
fraud messages (not_me) sent to another route: 1 of 3
C012 was transfer, labelled other
C015 was transfer, labelled other
C024 was transfer, labelled other
C027 was transfer, labelled other
C028 was transfer, labelled otherI did not run a model for this chapter, so there is no model result to quote. The self-test is the baseline: 68 of 80, one of three fraud messages sent elsewhere. When you score a model, read the fraud line first, then the wrong labels. Run the same prompt three times: a result that changes between runs is a result you cannot sign.
8. Open the key. Which of the week’s planted reversal breaks had a customer behind them?
cat > complaints/step8_key.py <<'EOF'
import csv
from lib import *
key = {}
for r in csv.DictReader(open("data/answers/rails_truth.csv")):
if r["kind"] in ("reversed_after_late_success", "credited_without_settlement", "customer_reversed_twice"):
key[r["ref"]] = r["kind"]
print(f"the key plants {len(key)} money breaks around reversals: " +
", ".join(f"{k} {sum(v == k for v in key.values())}" for k in sorted(set(key.values()))))
for m in (30, 10, 5, 1, 0):
found = {t["sid"] for t in tickets(m)} & set(key)
print(f" patience {m:>2} min: {len(found)} of {len(key)} are behind a ticket")
print(" the rest are in the week's logs and in no customer's mouth: only a reconciliation finds them")
EOF
python3 complaints/step8_key.pythe key plants 11 money breaks around reversals: credited_without_settlement 4, customer_reversed_twice 3, reversed_after_late_success 4
patience 30 min: 0 of 11 are behind a ticket
patience 10 min: 0 of 11 are behind a ticket
patience 5 min: 0 of 11 are behind a ticket
patience 1 min: 0 of 11 are behind a ticket
patience 0 min: 8 of 11 are behind a ticket
the rest are in the week's logs and in no customer's mouth: only a reconciliation finds themEleven breaks, none behind a ticket at 10 minutes of patience. Even at 0 minutes, only the 8 timeouts can be ahead of the sender’s refund. They cost the bank and were found, if at all, by reconciling logs against the switch.
Change PATIENCE_MIN = 10 in lib.py to 1 and rerun step 2. A customer who calls after one minute produces more tickets, but still no break:
1. tickets opened when money is still out 1 min after the debit (a lab input)
86 tickets from 101 timed-out transfers
34 ₦396,046.00 credited: no refund due
52 ₦866,850.00 failed: refund madeCare’s volume rises by 14 tickets, about a fifth, all of them failed transfers whose refund came between 1 and 10 minutes. Only 1 of the 34 credited customers now calls when the bank already holds the answer, against 14 at 10 minutes, and still 0 of the 8 timeout breaks sit behind a ticket, since the sender’s wrong refund lands 40 to 45 seconds after the timeout. Only the patience 0 row of step 2 shows them, 8 of 8, and no customer calls at that speed. Put the value back to 10 and ask which number your own bank’s customers have.
Template
# Complaint-handling procedure: failed transfers, with AI triage
Owner · Signed by · Validated by (not the builder) · Version · Date
## 1. Intake
How a message arrives, what the system already knows (signed-in account), how the transfer is matched, and what the agent asks for when more than one debit fits.
## 2. What the AI may and may not decide
| Step | Who decides | The AI may | The AI may not |
|---|---|---|---|
## 3. Evidence class and route
<Classes, decided by code from the logs, and where each goes>
## 4. The clocks
| Complaint type | Source | Starts at | Limit | Confirmed? | Date checked |
|---|---|---|---|---|---|
Approved deadlines a reply may state: <list, empty until a person adds one>
## 5. Escalation
<Breaks, fraud claims, missed clocks, the customer's route to the regulator>
## 6. Weekly sample
Size, how drawn, who checks, what they compare against, what result pauses the tool.
## 7. How this could be wrong
<One way, and what would show it>
## 8. Sign-off
<Names, roles, date for review> WORKED EXAMPLE
At a real bank the head of complaints owns this procedure and the head of customer care signs it. Here Sadiya drafts it for Northmere Bank, Otuoke owns it and the head of customer care signs; a colleague who did not build the pipeline validates it first.
Intake. Every message arrives with the signed-in account. Code matches it to that customer’s own debits in the previous 24 hours. In the lab 71 of 72 matched one right debit and one matched two, so where more than one fits the agent asks for the receipt reference.
The AI may label the message (transfer, not_me, wrong_account, other), read the amount and draft wording. It may not pick the transaction, set the evidence class, promise a refund or a time, send anything, or refund, reverse or restrict. Keyword rules got 68 of 80 and sent 1 of 3 fraud messages elsewhere. Nobody has measured a model on Northmere’s messages, so it runs in shadow mode first.
Evidence class comes from the four logs. Of 72 tickets, 34 were credited (no refund due) and 38 failed and refunded; 14 of the 34 had a status answer of 00 before the ticket opened. Any BREAK goes to a specialist, as does any not_me message.
Clocks. Stored per complaint type with source, start event, limit and date checked. The 10-minute reading breaches 38 of 67 refunds when measured from the debit, and 0 of 67 against 24 hours from the complaint. Both rest on summaries this build could not confirm, so the approved-deadlines list is empty and any deadline in a draft is flagged.
Weekly sample (assumption, not a lab figure). 20 sent replies drawn at random, plus every break and every not_me message, checked against the pack by someone who did not approve them. One reply that promises what the logs do not show pauses drafting.
Could be wrong. Complaints do not find breaks: 0 of the 11 planted breaks sat behind a ticket at 10 minutes. Reconciliation finds them, so a rising count there would show this procedure is not enough.
Now you
It is a month later and you are head of support at Owoleaf at 60 people, live in four states, where you would write this and the founder would sign it. The founder wants a language model to draft replies for the support desk’s failed-transfer tickets, with three agents approving them. Write the procedure. Treat your own copy of the lab week as a stand-in for Owoleaf’s: step 2 gives the ticket classes and how many of the credited customers were already answerable, step 3 the clocks, step 5 the keyword baseline and step 8 what complaints cannot see. The founder has said the desk answers within the hour, but nobody has written down from which event, so treat that as an unconfirmed clock. Decide the weekly sample size yourself and say why. The founder will read it and sign it, and the decision it supports is whether the drafts go live after a shadow period or stay shadow only.
Self-check
Otuoke has the pack, the guard and Sadiya's step 5 results: the keyword rules get 68 of 80 messages right and send one of three fraud messages to the wrong queue. The vendor's demonstration is persuasive and nothing has been measured on Northmere's own messages, which include Pidgin, Yoruba, Igbo and Hausa. The queue is long today and the head of customer care wants the model live next month. Which rollout should Otuoke approve?
- DOC CBN Consumer Protection Regulations (2019) Central Bank of Nigeria, 2019
The CBN's own text. Read the part on complaints handling and redress and the annexure of resolution timelines by complaint type, and check which one covers a failed funds transfer. This chapter's figures rest on search summaries of it. Skip the sections on disclosure and advertising.
- DOC Complaint Lodgment (CBN) Central Bank of Nigeria, 2026
The customer's route as the CBN describes it: contact the institution first, wait, then escalate. Read it as the customer will, and compare its waiting times with the annexure. A consumer page, not the regulation itself.
- DOC Complaints Management (CBN Consumer Protection Department) Central Bank of Nigeria, 2026
The department's own page on how complaints are handled. Read what it asks an institution to show, and check the date of the page before relying on it.
- DOC Consumer Protection Department Frequently Asked Questions (CBN) Central Bank of Nigeria, 2018
Short questions and answers from the department. Read it for the shape of the escalation route and check what it says about timing, which this build could not read. It dates from 2018, so check each answer against the 2019 regulations.
- DOC Regulation on Instant (Inter-Bank) Electronic Funds Transfer Services in Nigeria (CBN, 2018) Central Bank of Nigeria, 2018
The source of the 60-second, 10-minute and 24-hour figures that summaries quote. Read the sending and receiving entities' duties and the clause on erroneous transfers, and note which event starts each clock. Skip the licensing sections.
- DOC Nigeria Data Protection Act 2023 Federal Republic of Nigeria, 2023
The statute. Read section 37 on decisions based solely on automated processing and the safeguards around it, and the parts on lawful basis and transfers abroad that a hosted assistant raises. A copy hosted by a data-protection information site, not the gazette; check the gazetted text.
- POST Air Peace, UBA and the FCCPC: rethinking early litigation strategy (law-firm note) SCP Law, 2026
A law firm's reading of the 2026 Federal High Court decision on the FCCPC and banks. Commentary, not the judgment: read it for what the court is reported to have held and what it left open.
- POST Does the CBN override the FCCPC in protecting consumers of financial products and services? (law-firm commentary) Perchstone & Graeys, 2025
The opposing reading, from before the 2026 decision. Read it with the note above to see that the position is disputed.
All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.