← All updates AI in Lending

We stopped copying dummy rows and built a living, 24/7 digital twin of a company as our QA, just to break our software. Here's why.

Most lending software is tested on stale, made-up data. That fake data, not the feature, is often the real bug. So we built a living NBFC we can test on.

We stopped copying dummy rows and built a living, 24/7 digital twin of a company as our QA, just to break our software. Here's why.

We run a digital twin of a fictional NBFC. We call it BACO Finance, and it runs 24/7 as our live QA: real time, every day.

It behaves like a live loan book: real borrowers, real repayment schedules, real collections events, real messiness. None of it is real. All of it is realistic. BACO is a South India retail lender with six products, named officers, and a book that moves every day, run by a small fleet of agents while we sleep. We treat it like a production system, because for the purpose of building good software, it is one.

Here is the claim underneath it, from twenty years around data and lending: test data is the most underrated tool in an engineering org. And in lending, the bug you are chasing is usually the data, not the feature.

6
loan products
~300
branch locations
5
South India states
One fictional NBFC, whole enough to test on. The same borrower, the same book, in every demo, spec, and test.
Why a living twin beats a folder of sample rows
Key takeaways
  • Test data is the most underrated tool in engineering. Most teams build on sample, stale, or dummy records, and ship the same bad data into every environment.
  • In lending, the bug is usually the data. A loan is a long chain of dated events. Toy data gets the chain wrong, so engineers chase feature bugs that were data bugs all along.
  • So we built a digital twin. BACO is a fictional NBFC whose data, activities, and transactions behave like a live loan book. We treat it as a living entity, not a fixture.
  • An agent fleet keeps it alive. Agents open loans, post repayments, ask servicing questions, and run foreclosures every day, so the book ages like a real one.
  • It matters more now, not less. As agents work the book and systems go headless, a feature’s fate in production is decided by the data it was built and evaluated against.

Why is test data the most underrated tool in engineering?

In twenty years around data and lending, I have watched teams pour care into every part of the stack except the one that decides whether any of it works: the data they test on.

It is almost always an afterthought. A sample. A representative slice. A stale export from months ago, seeded with dummy records and copied, unchanged, from the lower environment to the upper one. The same tired rows turn up in unit tests, in staging, in the demo. Everyone knows the data is not quite right. Nobody owns making it right.

Then it costs you. A ticket comes in: this feature is broken. An engineer picks it up and spends half a day chasing it. The logic is fine. The query is fine. The feature was never broken. The test data was. I have watched that exact afternoon play out more times than I can count, on teams that were excellent at everything except the data they pointed their excellence at.

It invents bugs that are not there

A broken date, a missing join, a status that could never occur in a real book. The feature works. The engineer loses the afternoon proving it.

It hides the bugs that are

Tidy sample rows never hit the edge that breaks in production: the co-lent loan, the borrower late in one report and current in another, the foreclosure mid-cycle. Green tests, then a call at 8 in the morning.

What is BACO, and why treat it like a real bank?

So we stopped patching sample data and built the thing it was pretending to be. BACO is a digital twin of an NBFC: a fictional lender, built to behave exactly like a real one, with no real customer data in it. Not a bigger sample: a living book. Its customers, loans, repayments, collections, and service requests carry the same structure, the same relationships, and the same textures as a real lender’s, down to the way a single borrower ties back to a branch, an officer, a co-lending partner, and a repayment history.

The mental shift is the whole idea. We do not treat BACO as test data. We treat it as a production system that happens to be fictional. It has a canon, and the canon is law: one borrower is the same borrower in every screen, every spec, and every demo. A book that contradicts itself feels fake, and fake is exactly what we are trying to escape.

BACO is a servicing book, the post-approval half of lending where the money is actually made or lost, and it is built to behave like a real RBI-regulated NBFC. It runs asset classification and expected-loss provisioning in parallel. It tracks borrower-level NPA across co-lenders. It honours the fair-practice rule that collection contact stops after 7 in the evening. It runs a thirty-day ombudsman response clock. It reports to the credit bureaus on the regulator’s cycle, honours cooling-off refunds, and reaches for SARFAESI only where a loan is genuinely secured. Born compliant is not a footnote in a BACO demo. It is part of why the data feels real enough to trust.

DimensionSample / dummy dataA living digital twin
What it isA frozen slice, seeded once and copied between environments.A book that moves every day, aged by real lifecycle events.
ConsistencyThe same entity contradicts itself across tables and screens.One canon: a borrower is the same borrower everywhere.
Edge casesTidy rows that never reach the hard cases.Delinquency tail, co-lending splits, mid-cycle foreclosure, by design.
PrivacyOften masked production data, still risky to spread around.No real borrower in it, so every engineer can use all of it.
What it provesThat the code runs on data that could not exist.That the feature works on data shaped like a real book.

How did we design a believable synthetic loan book?

None of this works if the book is not believable, so we did not start with a database. We started with a story, written down. Before a single row existed, we wrote detailed specifications in plain markdown: who BACO lends to, what it lends, where it operates, and who runs it. The seed data is generated from that canon, not the other way around.

The specification is specific on purpose. BACO is a five-year-old, technology-first, centralised-credit retail NBFC, RBI-regulated, run lean on about 105 people. It lends across six products and no others, in rupees, across five South India states, on a hub-and-spoke network of roughly 300 branch locations. It services only: origination is a later chapter, deliberately out of scope. And its clock is pinned to a single day, so every days-past-due and ageing calculation has one fixed reference point.

Profile
Lean and technology-first

A five-year-old, centralised-credit retail NBFC, RBI-regulated, run on about 105 people. Small enough to know by heart, real enough to break software.

Footprint
Five states, hub-and-spoke

Karnataka, Telangana, Kerala, Tamil Nadu, and Andhra Pradesh, in rupees, across a registry of roughly 300 branch locations. Every address and officer ties back to a place.

Scope
Servicing only, for now

The post-approval half of lending, where the money is made or lost. Origination is a later chapter, deliberately out of scope.

A frozen today
One reference date

BACO’s clock is pinned to one day, so every ageing calculation has a fixed anchor. The fleet moves the book around it.

It also has a named cast. A CFO who runs the daily cleared-cash board, a head of collections who owns escalations, an ops maker-checker who signs off postings and waivers, each with a role and a span of control, the way a real NBFC does. When an engineer writes a use case, the actor is one of these people, by name.

The one we come back to most is a borrower named Ramesh. Personal-loan customer, based in Hubballi, deliberately parked in mid-delinquency: about a month past due, in the early bucket, with a handful of repayments and a few collection events already on his record. He is not a tidy row. He is the borrower who exercises servicing, collections, hardship, and a co-lending split all at once. When a feature can handle Ramesh, it can handle a lot. When it cannot, we find out on our screens, not a lender’s.

What does BACO’s book actually look like?

Realism is not a vibe. It is a book with a real shape, and every part of BACO’s is specified, then generated from the seed. Over its life it has taken on 500 customers and 500 loans. 450 are live today across the six products. The other 50 have already left the book the way real loans do: 27 closed on schedule, 14 foreclosed early, 4 settled, 5 written off. A book with no closures, no foreclosures, and no write-offs is a quiet giveaway that the data was invented.

The mix is deliberately uneven, because real books are.

ProductShare of book90+ of POS
Loan Against Securities · wealth-backed22%9.9%
Loan Against Mutual Funds · margin-call20%0.5%
Supply Chain Finance · anchor-led invoices19%0.0%
Unsecured MSME · unsecured18%12.1%
Education · co-borrower12%12.6%
Personal Loan · retail9%11.8%

Look at the last column. The wealth-backed books barely blink: securities and mutual-fund loans sit near zero 90-plus, because there is collateral with a margin call behind them. The unsecured and education books run into the low teens, because that is what unsecured retail credit does. If every product carried the same delinquency, that would be the tell. Across the whole book, 36% of live accounts carry some overdue, and the tail is deliberately deep: a servicing product has to be seen working the hard cases, not only the clean ones.

It is provisioned the way a regulated lender’s book is, in stages: 340 accounts performing, 67 under-performing, 43 impaired. Ind-AS expected loss and the regulator’s IRACP run in parallel, and the higher of the two governs the number that reaches the P&L. None of that is set dressing. It is the difference between a table of loans and a book a CFO would recognise.

One thing to hold in mind: this is the book at its seed. The fleet moves it every day, so any single day’s snapshot, like the executive briefing further down, is a later and busier state of the same canon.

How does co-lending work on BACO?

Just over half the live book is co-lent: 246 of the 450 live loans are shared with a funding partner, across one bank and two NBFCs. Co-lending is not a detail you can fake convincingly, so we built the whole mechanism into the canon. The partner names below are masked. The mechanics are not.

PartnerSplit (partner : BACO)Live loans
Meridian Bank · bank80 : 2086
Lattice Capital · NBFC75 : 2581
Vantage Finance · NBFC70 : 3079

Every co-lent rupee carries its own split lineage. Cash moves through a joint escrow with no inter-mingling, settled on a T+1 file. Delinquency is tracked at the borrower level, so if a loan tags as non-performing it classifies that way for both lenders at once, in line with the January 2026 directions. Losses are shared pari-passu. Fees and penal charges stay 100% with BACO, because BACO does the collection work. And each partner sees only its own slice, in a single-tenant Partner Portal reading one swept-cash truth. Get any of it wrong and a partner catches it in the first reconciliation. Getting it right in a test book is most of why the test book is worth building.

How does BACO hang together?

Under all of it is one connected structure we call the spine, the same data model a real loan management system runs on. Every screen, every aggregate, and every agent reads and writes through it, which is what makes the one-canon rule enforceable rather than aspirational.

TableWhat it holds
customersthe borrowers
loansthe book itself
repaymentsevery EMI and prepayment
collectionsevery collection touch
risk_decision_sciencescores and next-best-action
scf_invoicessupply-chain invoices
collateralpledged securities and units
service_requestsborrower queries
branchesthe network
employeesthe officers
productsthe six, and only six
audit_logevery action, with who and when

Everything joins. A loan hangs off a customer, a branch, and an officer. Repayments, collections, collateral, invoices, and risk decisions all hang off the loan. The audit log covers who did what. Identifiers follow one grammar, so a customer is CUST00001 on every screen and a loan is LN000001 on every screen, never a stray format in one corner of the app. And the headline numbers, the ones that go out at 8 in the morning, are computed from this spine, not typed in by hand. When one of them looks wrong, it can be traced back to the row that produced it.

How do we keep the twin alive?

A book that does not move is just a snapshot with ambitions. The moment you freeze it, it starts drifting from anything a real lender would recognise. So we keep BACO alive the way a real lender’s book stays alive: by letting the lifecycle run.

A small fleet of agents does the work. They are not the product. They are a testing tool: a set of simulators pointed at BACO’s own data, each one mimicking a piece of how borrowers and officers behave day to day. They run through the day and leave the book a little further along each time, so the data is never the same twice, and never stale.

01
New businessOpens new borrowers and loans, in the right products and the right places.
Simulator
02
RepaymentsPosts EMIs on schedule, and misses some the way real borrowers do.
Ledger
03
Servicing questionsRaises the requests borrowers actually raise, by product and by segment.
Simulator
04
Foreclosure and payoffRuns prepayments, foreclosures, and payoffs, so the book closes loans as well as opens them.
Ledger
05
Collections and delinquencyMoves accounts through the buckets and works them, so the tail stays alive.
Simulator

Picture an agent fleet that behaves like a lender’s borrowers and back office, running quietly in the background, keeping the book current. That is what turns a data set into a twin. The book moves the more it runs, and we test on whatever it has become that morning.

What does testing on BACO actually catch?

Every feature we build meets BACO before it meets anyone. During development, and again once it is deployed, we watch it run against a book we know cold. Knowing the book is the point. When you know BACO’s shape by heart, a wrong number has nowhere to hide.

A recent example. We built a feature to send executives a running summary of the loan book on WhatsApp at set times through the day, from the 8 o’clock open to the day-close wrap. The WhatsApp piece worked well: right format, right delivery, on time. The briefing that landed one evening looked clean at a glance.

BACO digital-twin NBFC day-close briefing on the Lokta WhatsApp group, dated 18 July 2026. It reports MTD collection efficiency of 105.9 percent while showing zero recovered from overdue and no delinquency-bucket movement, the impossible combination that exposed a data-fetch bug.
One of BACO’s automated briefings, the day-close, exactly as it landed on the leadership group. It reads clean until you know the book: 105.9% collection efficiency, yet nothing recovered from overdue and not one account moving a bucket, all at once.

Then it did not survive a second look. Collected month-to-date came in at ₹8.27 Cr against a reported demand of ₹7.81 Cr, so collection efficiency printed 105.9%. On its own, over 100% can be real: you can recover old overdues on top of the current month’s dues. Not here. The same briefing showed 105.9% efficiency alongside zero recovered from overdue and not one account moving a delinquency bucket, on a book we knew was not that quiet. The numbers did not tie out, because with the data source briefly unreachable the feature had fetched dummy data instead. We caught it in seconds, not because we ran a special test, but because we knew what BACO’s numbers should have said. On a generic sample data set, those figures would have looked as plausible as anything else, and the bug would have shipped to real executives on a real morning.

The feature worked. The data behind it did not.
  • A wrong number, dressed as a plausible one, on its way to every executive’s phone with the day’s numbers.
  • Caught in seconds, because we knew what BACO’s numbers should have said. A wrong number has nowhere to hide on a book you know by heart.
Collection efficiency
105.9%
A figure that cannot hold on a clean book, and the tell that the repayment data was being fetched wrong.

There is a second thing worth naming, and it is not the bug. The team reacted to BACO’s numbers as if they were real money.

A Lokta team WhatsApp thread reacting to the BACO briefing: how did we collect more than demand, will check whether it fetched actual or dummy data, will work on data sanity, then we should take BACO seriously, AUM rupees 127.55 crore is our money, marked with a hundred-points reaction. The root cause follows: the server was not reachable, so without testing it sent dummy data for testing.
The reaction in the room: the team chasing the number, diagnosing the dummy-data fetch, and guarding BACO’s AUM like real money. When a test book earns that, you have a twin, not a fixture.

Nobody rallies around a folder of sample rows. They rally around a book that behaves like theirs, and that instinct is exactly what catches the wrong number on a real morning.

That is the return on treating your test book as a living system. Not that your features break less, though they do. It is that when they break, they break in front of you, on data you understand, instead of in front of a lender on data you do not.

Why does production-shaped data matter even more now?

This used to be good hygiene. It is becoming the whole game.

Three things are changing at once. Agents are starting to work the book, taking real actions in servicing and collections, not just rendering screens. Systems are going headless: the interface a human used to eyeball is thinning out, replaced by APIs and agents talking to each other, so there is no dashboard where a wrong number catches your eye. And AI compliance is becoming a mandatory, regulated requirement, not a nice-to-have, which means you have to be able to show what a system did and why, before it ever touches a real borrower.

Put those together and the data you build and evaluate against stops being a convenience. It becomes the thing that decides whether a feature survives contact with production. You cannot eyeball a headless system. You cannot let an agent act on the book unless you have watched it act, on realistic data, first. And you cannot prove an AI system is safe on data that could never occur.

There is a subtler point under this, and it is the one I would underline. The success of an AI feature in production is largely decided by the context it carried through its development. What did it see when it was designed, built, and evaluated? If the answer is toy data at every step, the feature learns a toy world and then meets the real one. Holding a single, realistic context across the whole agent development lifecycle, from version 0.1 to production, is what closes that gap.

That is why BACO is not just a testing database. You will find it across the lifecycle: in our demos, in our internal requirements, which are mostly markdown specifications, and in our evaluation artifacts. Same lender, same borrowers, same canon, from the first spec to the last eval. The context does not change shape as the feature moves toward production, so the feature does not get a nasty surprise when it arrives.

So why don’t more engineering teams do this?

If this is such a good idea, why is it rare? I do not think it is laziness. The obstacles are real, and most teams hit at least one of them.

  1. The developer does not have the full business context. You cannot model a lending book you do not understand. Most engineers were never handed the domain, so they build the data they can imagine, which is a thin version of the real thing.
  2. Siloed teams see only their slice. When a team owns one service and no more, nobody holds the whole picture of the feature or the system architecture. A twin needs someone who can see the book end to end, and silos are built to prevent exactly that.
  3. Production data is off limits, for good reason. Real borrower data is wrapped in privacy rules you should not want to break. So teams either test on a masked snapshot they still cannot spread around freely, or on invented data that bears no resemblance to the real thing.
  4. There is no cheap tool for this. You can buy plenty of tools that generate rows. There is nothing off the shelf that stands up a living, regulated, believable digital twin of a business at a prosumer price. We built ours by hand. Honestly, this looks like a real opening for the agentic-testing tools: give teams a twin, not just a data generator.

The takeaway

Here is where I have landed, for now. Most engineering teams treat test data as an afterthought, and then pay for it in lost afternoons, shipped bugs, and features that work in the demo and fall over in production. The data was never the boring part. It was the part that decided everything.

Our answer is a digital twin we treat like a living NBFC. BACO is fictional. Its problems are not. And because we meet those problems first, on a book we know by heart, our lenders will not have to. My 2 cents, from two decades in this: if you want software that survives contact with a real book, start by testing it on something that behaves like one.

Frequently asked questions

What is a digital twin of an NBFC, and why test on one?

A digital twin is a fictional lender built to behave exactly like a real one. Ours is BACO: a South India retail NBFC with six loan products, named officers, a co-lent book, and borrowers who repay, miss, foreclose, and complain on realistic schedules. None of it is real customer data, so there is no privacy risk. All of it is realistic, so a feature that works on BACO works on a real book. We test on it because a sample data set of a few tidy rows never shows you how software behaves against a living, messy loan book.

Why is bad test data so often the real cause of a bug?

Because most teams test on data that would never survive contact with a real book: sample rows, stale snapshots, dummy records copied between environments. That data hides real bugs and invents fake ones. An engineer picks up a ticket, spends hours chasing a feature that looks broken, and finds the feature was fine. The data was wrong. In lending this is worse than most domains, because a loan is a long chain of dated events, and toy data almost never gets the chain right. Fix the data and a surprising share of bugs simply disappear.

How do you keep synthetic test data realistic over time?

A static data set goes stale the day you make it. So we keep BACO alive with a small fleet of agents that run its loan lifecycle every day. One opens new borrowers and loans. One posts repayments on schedule, and skips some, the way real borrowers do. One raises servicing questions by product and borrower type. One runs foreclosures, prepayments, and payoffs. The book moves while we sleep, so when we test a feature in the morning, it meets data that aged like a real book overnight, not a frozen snapshot from last quarter.

Is synthetic test data as good as real production data?

For building and testing, a living twin is often better. Production data is a snapshot you cannot freely touch, wrapped in privacy rules for good reason. A twin has no real borrower in it, so any engineer can use all of it, in any environment, without a compliance conversation. The trick is realism: the twin has to model the messiness that matters, the delinquency tail, the co-lending splits, the one borrower who is late in every report. Get that right and you catch in development what most teams only find in production. That is the whole point.


Read next:


Sources:


Chandramouli is co-founder and CEO of Lokta, the AI-native lending stack for post-approval servicing. He has spent two decades building AI for decisions that change people’s lives, and has served as an independent director on an NBFC board. He is on LinkedIn, where BACO gets the occasional mention.

Chandramouli

Co-founder and CEO of Lokta. 23 years in technology, go-to-market, and consulting, with 4+ years building machine learning models and GenAI features, prior leadership in enterprise AI, and experience as an independent director.

Connect with me on LinkedIn →
Talk to the team

Adopt the agent-native lending stack.

Lokta is built for enterprise deployment — VPC or single-tenant cloud, with an audit trail in every state change. We work with a select group of institutions through a founder-led model: deep adoption, deliberate scope, a delivery window the team commits to in writing.