Live data from Hacker News

Reconciliation is a knapsack problem

moderntreasury.com

41–50 of 57 posts

Re: Reconciliation is a knapsack problem

#41
Maybe I'm misunderstanding the problem but you don't match payments to transactions. You would have a ledger that debits transaction and credits payment resulting in a current balance.

The reconciliation system that I work on tries to match data from different system to make sure they agree. Like match the Visa transaction file against what our system has internally recorded in its ledger. There is an unique key to match both records so no math involved.

Re: Reconciliation is a knapsack problem

#42

Can someone help me understand the premise of this article? I think the goal here is to map the internal books of a business to their bank account, but I have never seen the kind of "grouping" the article seems to assume as given. In which scenarios do these groupings happen? If there are several customers, there will be different invoices and therefore separate payments. Why would the bank just throw them together,…

A mundane example is iTunes purchases.

If you buy something for $0.99 today, they won't bill you immediately. If you buy another $0.99 item tomorrow, you'll get a consolidated charge for $1.98. You would need to do something like this to link the $1.98 to your app/song purchases.

The reason for this is that credit card processing often costs a flat service charge + a percentage of the bill: Stripe is 30 cents + 2.9% right now. The flat portion dominates for small charges, so you'd want to combine them if at all possible. (Apple certainly gets a better rate...but also has a scale where small savings add up).

Re: Reconciliation is a knapsack problem

#43
post #16

Earlier quoted context omitted.

Whether something is better than nothing depends on its error rate and the consequences of an error.

Fair, but also humans working manually don't have a 0% error rate

I thought the whole point of double entry bookkeeping is to make sure that the error rate is, in fact, precisely 0% and verifiably so.

Re: Reconciliation is a knapsack problem

#44
I've written code for some reconciliation systems and it's nice to have confirmation they are indeed hard nuts to crack. The language matching isn't really the hard part IMO. What's tricky is that you're often matching batches "up to N", and the matching is not always just on a equal values or dates. For example, 300 credit card swipes at point of sale might match 3 deposits in the bank account a few days later with a 3% fee deducted. They never clear on the _same_ day, but need to match nearest day first. To brute-force, you need test all batches of up to 300 point of sale transactions and all batches of up to 3 deposits.

Re: Reconciliation is a knapsack problem

#45

lol at ai for solving deterministic knapsacks. Just get yourself a solver. And if you wanna solve billion item sized problems hire an OR scientist to write a decomposed algo. Literally after 2 minutes of search: https://arxiv.org/pdf/2002.00352.pdf

You searching arxiv.org stood out to me. I wish I had better skills at searching academic papers for problems I'm trying to solve or that I'm just thinking about. I think just as there are some people that google better than others, I imagine a similar skill applies to academic papers. Anyone encounter this? How do I get better at it? I thought at first it was an accessibility problem, and perhaps it still is. In tha…

just use google scholar to start (which pulls from almost all journals + arxiv), and consider searching through citations as well. you can search for survey papers and look at their bibliographies too.

do NOT subscribe to any academic journals. not worth it for an individual. find a way to get access for free, such as through a local library or institution, or by other means. also note that often google scholar gives a link to a PDF over on the right, or in alternate versions of the article.

there are services like perplexity.ai that can search arxiv, pull articles, and feed them through an LLM for you -- it's pretty much what you want. some of the LLM chat interfaces let you upload PDFs too. none of this actually works that well yet but sometimes useful.

Re: Reconciliation is a knapsack problem

#46
post #7

As somebody who worked as an accountant, I saw several times where automated reconciliation solutions devastated books with repeat mistakes and lacking audit logs. I saw interns do the same, too. An automated solution to reconcile statements based on LLM matches removes transparency on how your books are prepared and might create a false sense of trust in the preparation of your books. In case of an audit, people wil…

Sean here, author and EM of the recon team at Modern Treasury. I completely agree, we us AI to surface suggestions to users during manual review so there's full transparency and human confirmation at every step. Our automatic recon doesn't use LLMs for the reasons you outlined.

If the AI is right 99% of the time, what are the odds a human detects the remaining 1% rather than just being complacent?

Re: Reconciliation is a knapsack problem

#47
post #25
post #15

I'm head of processing development at PayProp[^1] where we've been automatically reconciling rental payments for two decades using the techniques described in the article - we just don't call it an AI or a LLM. Our tech saves letting agents huge amounts of time. We look at the data we have and if it's sufficient we can "automatically" reconcile it - i.e. suggest a match with 100% certainty that the user(s) can then c…

I'm confuses, reconcialiation is also used in Bayesian statistics. Is it the same context?

Reconciliation in finance is taking your records of sales and matching them to your bank records. This identifies sales that didn't result in bank deposits, bank deposits that didn't come from sales, situations where you were paid too much, and situations where you were paid too little. These all happen, disturbingly frequently, so reconciliation is a necessary admin burden in businesses. It's not a critical differentiator for retailers so it's ripe for automation.

Similarly, matching invoices to purchase orders and authorising payments. This catches fraud and avoids paying for goods you didn't receive ... but it's another necessary evil rather than a value-adding differentiator for the business. So companies exist to take your PDF invoices and your ERP's "we recorded that we got x, y, z" and match them up and authorise payment for unexceptional invoices (we wanted 5, you said you sent 5, we said we got 5, let's pay you for 5).

Re: Reconciliation is a knapsack problem

#48

Can anyone recommend a reconciliation application they've had a good experience with? My current work place rolled their own recon service. Is this the norm?

Xero is a small business accounting SaaS app that has pretty nice recon. (Disclaimer I used to work there 10 years ago).

Re: Reconciliation is a knapsack problem

#49
post #46
post #7

Earlier quoted context omitted.

Sean here, author and EM of the recon team at Modern Treasury. I completely agree, we us AI to surface suggestions to users during manual review so there's full transparency and human confirmation at every step. Our automatic recon doesn't use LLMs for the reasons you outlined.

If the AI is right 99% of the time, what are the odds a human detects the remaining 1% rather than just being complacent?

From a human-computer interaction standpoint you do raise a fair point.

Even if in reality the AI misses _considerably more_ than that, there's a good argument to be made that such hints may steer the human from their initial, correct assumptions, or even reasoning.

Re: Reconciliation is a knapsack problem

#50
post #43

Earlier quoted context omitted.

Fair, but also humans working manually don't have a 0% error rate

I thought the whole point of double entry bookkeeping is to make sure that the error rate is, in fact, precisely 0% and verifiably so.

You can still reconcile the wrong things and have the books balance. e.g. you sell a subscription for $1. User A paid on the 1st, user B paid on the 3rd. You mistakenly reconcile user A's payment to user B's bill and vice versa. Your books still balance, but you better hope you didn't charge user A any late fees.
Post reply on HN