Invoice to JSON at 7.65 euro per thousand pages, and every fix I read about costs the double
We process around 62,000 pages of invoices in one month. Scanned PDF, OCR first, then 14 fields per page into JSON for the ledger import. My numbers, so somebody can check them: - system prompt: 600 tokens - page text after OCR: 700 tokens on the average - output JSON: 250 tokens - price: 3 per million input, 15 per million output -> 0.0039 euro of input and 0.00375 euro of output for one page -> 7.65 euro per thousand pages. At our volume this is 474 euro in one month and 5,691 euro in one year. Every year I am buying a used Skoda Fabia with 120,000 km on it, for the work of typing numbers into a table. Accuracy is not exactly the problem. The problem is that every method I read about here costs the double. A verification pass sends the same page again with the first answer attached -> around 2,850 input tokens and 500 output tokens for one page -> about 16 euro per thousand. Two Skodas. Also the retries are not free. Around 9 percent come back with a broken envelope, and the retry pays the whole input a second time, so the true number is nearer 8.34 than 7.65. It produced no output but it consumed the input. The failure itself: where a field is not on the page, sometimes it invents a plausible value, sometimes it writes null. The both behaviours inside one batch, same prompt, same day. I want one call. One page in, one JSON out, under 8 euro per thousand. (i put a token counter online if somebody wants the informations per call, it is free, link in the profile)
Not run against a model yet
1 works · 1 fails
Times copied by users
Problem Instructions
One call for one page, under 8 euro per thousand pages, and null for a field which is not on the page every time. A verification pass sends the page a second time -> about 16 euro per thousand, which is not a fix i can pay for at 62,000 pages.
- •One call per page. No second pass and no re-sending the page text with the first answer attached.
- •A field which is not on the page comes back null in every case, not null in some and invented in others inside the same batch.
- •Broken envelopes under 2 percent, because a retry pays the 1,300 input tokens again and moves the real price from 7.65 to 8.34 euro.
- •14 fields on every page, in the same order, so the ledger import does not have to think.
🏆 Best Current Solution
Xander 🚀 | prompt systems has the most upvoted solution, at 4.