Should I use Jev for invoice totals and arithmetic?
Verdict for the sample idea
Run it on
plain code
The rule can be written down. A function is cheaper and more reliable than any model.
Sample idea
Check every incoming supplier invoice: add up the line items, apply the tax rate, compare the result with the stated total, and flag invoices where the numbers do not match. About 1,500 invoices a month.
Explanation
This is the clearest "no" on this list. Adding line items, applying a rate and comparing two numbers is arithmetic. Plain code does it exactly, at no cost, in microseconds, and it never has a bad day. Jev reads numbers as text. TypeSafe's own page on the model's weak points names counting and numeric work. A model that is right 99 times in 100 is a bad calculator.
The mental model helps here. Jev is a smart if statement. You use it when you cannot write the condition by hand. Here you can write the condition by hand: abs(sum(lines) * (1 + rate) - total) < 0.01. So write it.
The useful question is what sits next to the arithmetic, because invoice work does contain judgment. Does this free-text line, "consulting services March", belong to purchase order line 3, "advisory hours Q1"? Is this supplier name the same company as the one in our records, written differently? Is this document an invoice at all, or a reminder, a credit note or a quote? Those are Choice and Noul questions, and Jev fits them well.
So the shape is a pipeline. A parser or an extraction step produces the fields. Code does every sum and every comparison. Jev answers only the matching and classification questions. Code makes the final decision from both.
The common trap is convenience. The invoice text is already in the Jev call, so it is tempting to add "does the total match the line items?" as one more Noul. It will return a confident probability. It will be right most of the time. You will find the exceptions in an audit.
Related tasks
Verdict produced by Jev on 2026-09-19, rubric version 2. Text written by a person. How the tool works: the report.