Own Weights

AI invoice processing and accounts payable

AI invoice processing for accounts payable: extract invoice fields with a model trained on your own invoices, then run it in your own environment.

Updated

Part of: AI for accounting and bookkeeping firms

AI invoice processing reads supplier invoices and returns structured fields, such as vendor, invoice number, dates, line items, tax and total, so accounts payable can match and approve them without retyping. The work is repetitive and high volume, which makes it a good fit for a model trained on that one task rather than a general model prompted from scratch on every call.

The fields that move money

Not every field carries the same risk. The total, the currency, the tax and the vendor’s bank details move money, so a wrong digit there costs far more than a wrong date. The invoice number matters for a different reason: it is how your system catches duplicates, and it is unique only within one vendor, so the same number from two suppliers is not automatically a duplicate. Line items matter when you code spend to accounts or cost centers. Dates decide payment terms and whether an early-payment discount window is still open.

Documents that trip up extraction

The trouble is usually in the document. Layouts change by vendor, many arrive as scans, and some run to several pages. Four cases need a rule of their own before you trust any output:

  • A freight invoice that prices a fuel surcharge as a percentage of the base charge. The surcharge line only makes sense next to the base line, so extract both or the check fails silently.
  • A utility bill with a current-charges section and a prior-balance section. The amount due is not the same as this period’s charges, and the wrong one ends up in the total.
  • A multi-page invoice where the grand total sits on the last page and the continuation page has no vendor name or invoice number at the top.
  • A credit note that looks like an invoice. It carries negative amounts and a reference to the original. Booked as a new bill, it adds spend that never happened.

Three mistakes repeat. The model returns the subtotal as the total because that figure appears first on the page. OCR confuses an 8 with a 3 in an amount, and the output still validates against the schema. A vendor changes its bank details partway through a quarter, so the new value extracts correctly and nobody notices the change. That last case should trigger a verification step, not a silent update. Valid JSON proves the structure, not the value, so check the numbers against the source image. The extraction accuracy guide covers how to score this.

How to test on your own invoices

Start with your own invoices, not a public benchmark. Pull a sample across your vendors, label the fields by hand, and split the set by vendor so no vendor appears in both training and test data. A model that has seen a vendor’s layout will look better than it is on the next vendor you add. Score your current process first, whether that is a frontier API, an OCR tool or manual entry, then score the candidate on the same held-out set. The evaluation guide covers the mechanics.

Our public results come from a different document type. The exam uses 510 commercial contracts with clause answers marked by lawyers, scored with 5-fold cross-validation, so every contract was judged by a model that never trained on it. They say nothing about invoices, so read the full results as a method, not an invoice score.

Where the model runs and who controls the data

Invoices carry bank details, tax IDs and payment history, so where the model runs matters as much as how accurate it is. Own Weights fine-tunes an open-weight model on your invoices and serves it in your cloud account or in your building. The customer owns the weights.

Running inside your own environment keeps invoice data under your access controls, retention rules and logging. Before you rely on that, ask who can read the extracted fields, how long scanned images are kept, and whether the logs contain bank details. Your reviewers and auditors still decide whether the setup meets your obligations. For the broader question, see private LLMs.

Keeping a person in the approval loop

The model assists people who review its output, and it should not approve payments on its own. A workable setup looks like this:

  1. Show reviewers every field that moves money: total, tax, currency, bank details and invoice number.
  2. Sample a fixed share of the remaining fields each week and check the sample against the source image.
  3. Route invoices with a line-item sum that does not match the header, an unclear date or a changed bank account to a separate queue.
  4. Log every field a reviewer changes, with the vendor and the reason.

Those corrections are your best source of new test cases. Add them as a new version of the test set rather than editing the old one, so earlier results stay comparable. Throughput is the other trade-off. A higher-accuracy tier costs more per document and runs slower, while a faster tier clears a month-end queue sooner. Pick by how fast the queue must clear and how often a wrong field gets caught before payment, not by habit. Measure cost per document from arrival to approval, not cost per token.

How to start with a free audit

The process has four steps. First, a free audit maps your AI spend by task from your code and your invoices. Second, we evaluate: we build a test from your real invoices and score your current model first. Third, we train, and the trained model has to beat the current one on that test before anything is deployed. Fourth, we serve it in your cloud or building, tuned for throughput.

You can also run the open-source AI cost audit yourself. It is MIT licensed, reads your code as text on your machine, makes no network calls while it reads, and saves a PDF of your AI calls, models and estimated cost at https://github.com/ayaangazali/ownweights-audit.

If your accounts payable team sends invoices to a frontier API today, book a free audit. We will look at which calls you make, how often they run, and what a fair test on your own invoices would take.

Questions

How accurate is AI invoice processing?

Accuracy depends on your own invoices, so there is no single number to trust. Build a test from a sample of your vendors and score every option on the same held-out set. Our public figures come from contracts and should not be read as invoice results.

Can AI invoice processing run without sending invoices to a third party?

Yes, if the model runs in your cloud account or your building. Because the customer owns the weights, the model can stay inside your environment under your controls. Your own reviewers still decide whether that meets your obligations.

What does AI invoice processing cost per invoice?

It depends on your volume, the model, and how much review each invoice needs, so measure cost per document end to end. Check your provider's current pricing page for their rates. Batch pricing can lower the bill for work that does not need an immediate answer.