LEAKPROOF AI
Detect the leak. Prove the cause. Act with approval. Verify the recovery.
Inspiration
Small businesses rarely fail from one big mistake. They fail from many small losses they never notice: a supplier invoices 500 units but delivers 470, a duplicate bill slips through, stock quietly disappears. Existing tools show that something looks off, but they stop at a dashboard. Nobody proves the cause, acts on it, or checks that the money came back. We wanted to build the system that finishes the job.
What it does
LEAKPROOF AI runs an autonomous Leak-to-Recovery Loop. It cross-checks stock, invoices and sales, builds an evidence trail for every discrepancy, quantifies the money at risk, recommends a recovery action, and executes it only after the owner approves. Then it verifies the recovery.
What we learned
- Trust beats cleverness. Owners will not act on an AI's guess, so every finding needs evidence they can show a supplier.
- Honest accounting matters. We track four separate ledgers: suspected, confirmed, approved and verified. Savings count only once verified.
- A narrow loop beats a broad platform. One use case done end to end is more convincing than ten half-built features.
How we built it
We designed the platform around a three-way match between what was invoiced, received and sold.
For a product with invoiced quantity $Q_{inv}$, received quantity $Q_{rec}$, quantity sold $Q_{sold}$ and closing stock $Q_{stock}$:
$$g_{supplier} = Q_{inv} - Q_{rec}, \qquad g_{shrink} = Q_{rec} - (Q_{sold} + Q_{stock})$$
With unit cost $c_i$, the exposure for item $i$ is
$$L_i = c_i \left( g_{supplier,i} + g_{shrink,i} \right)$$
and the quantity that actually counts is the verified recovery rate
$$R_v = \frac{\text{verified recovery}}{\text{confirmed loss}}$$
In our worked example, $500 - 470 = 30$ units are a supplier short-ship and $470 - (400 + 60) = 10$ units are unexplained loss.
The proposed architecture uses managed AWS services: S3 and Textract to ingest invoices, Lambda and Athena for detection, Bedrock with Step Functions for investigation, SNS/SES for owner approval, and a DynamoDB ledger that stores each case's Leak ID, evidence, approval and verification result.
Challenges we faced
- Messy data: invoices, stock counts and sales logs rarely use the same item names or formats.
- Avoiding false alarms: a flagged mismatch is not a confirmed loss, which is why we separate the two.
- Safe autonomy: deciding which actions the AI may recommend, and making human approval mandatory before anything runs.
- Proving value honestly: our charts use illustrative data, and we need pilot results to replace them.
What's next
Pilot with small retailers and wholesalers, add ERP and accounting connectors, and extend the same loop to returns, pricing and payment leaks.
Built With
- amazon
- amazon-web-services
- api
- bedrock
- javascript
- node.js
- raect.js
- typescript
Log in or sign up for Devpost to join the conversation.