Kamali · AI
Commitments, not totals
A funder's page used to add up everything they'd given. The total was never certain. What the team needs is what each side has promised, for under half a dollar.
Every funder's page in Kamali had a donation total and an AI paragraph summing up the relationship. Both looked great. For one funder the total came to a lot more than the agreement said, before duplicates were removed. After, it was closer, but I couldn't say it was right. There might be earlier gifts from before the files start, or transfers that never got a letter.
A number you can't trust is worse than no number. So the totals and the summary are gone.
What the team actually needs
What matters when you write to a funder is what's been promised, in both directions, and whether it's happened. A report due in June. The second instalment after the interim report. A visit next spring. A logo on the new building. So that's what the funder page shows now: commitments.
Two passes
- First, one cheap call per document finds the sentences that promise something and quotes them word for word.
- Then one call per funder reads all of that funder's promises together and turns them into a list: who owes what, by when, and what proves it was done.
A dry run on five funders takes 468 calls, 1.35 million tokens, and costs about 42 cents.
Review rounds
Reading the first results with the team turned up the real rules:
- Pledges paid in tranches are one commitment with instalments, not five commitments.
- A recurring commitment exists once per relationship.
- A receipt closes a payment.
- Standing conditions, like "use the funds only for the programme", are never "overdue". They get their own section.
- If nothing proves a commitment was met after 18 months, it says "No proof found" instead of guessing.
I'd also have used the payments module to tick off commitments automatically. That misses bank transfers, so people mark them fulfilled instead, and the proof is attached.
Never pay twice
Then the obvious question: does re-running this cost money every time? It did. Nothing kept the answers. Now every paid model call is stored under a hash of the model and its exact prompt. Change the code that arranges the results and a re-run costs nothing. Change one document and only that document is read again. Re-runs cost one to three cents.