Skip to content

AI Workers in accounting: describing and coding cost invoices

DYNAMINDS Labs team · · 7 min

AI Workers

In brief

An AI Worker in accounting reads a cost invoice from KSeF, email or a scan, matches it with the purchase order, goods receipt and contract, and then proposes a description, cost center, account and VAT treatment. It posts nothing on its own. The Polish Accounting Act requires the person responsible to confirm how a document is coded, so approval stays with the accountant. The AI Worker shortens the path to that approval and records where each proposal came from.

Description, coding and who is responsible for what

The description of a cost invoice says what the expense is for, who ordered it and which cost center or project it belongs to. Coding (in Polish accounting, "dekretacja") states in which month and on which accounts the document will be recorded in the books. Article 21(1)(6) of the Polish Accounting Act lists, among the minimum contents of an accounting document, confirmation that it was checked and classified for recording, that is the coding, signed by the person responsible. Article 21(1a) allows this information to be left off the document itself if it follows from the bookkeeping technique, for example an approval in the system.

This rule leads to a simple division of work:

StepWho does it todayWhat the AI Worker doesWho approves
receiving the invoiceaccountant or front officefetches the invoice from KSeF and the invoices@ mailboxnobody, the step is reversible
business descriptiondepartment managerproposes the cost center and project based on the orderdepartment manager
codingaccountantproposes accounts, period and VAT treatment with a justificationaccountant
postingaccountantnothing, it has no such permissionaccountant

The AI Worker does not replace the person responsible for the coding. It changes what that person sees: instead of an empty form, a ready proposal, the documents it is based on and a list of discrepancies.

Where the AI Worker gets its data

Invoices from KSeF (Poland's National e-Invoicing System) arrive as a structured XML file, so the tax ID, amounts, VAT rates and line items sit in fields rather than in an image. Reading a PDF or a scan remains necessary for invoices outside KSeF, for example from foreign suppliers, and for documents that are not invoices, such as debit notes or bills. How to prepare company systems for KSeF is covered in KSeF: how to prepare company systems, and reading emails and attachments in AI Workers and company email.

The invoice alone is not enough for good coding. The AI Worker also needs data from the ERP:

  • purchase orders and goods receipts, to check that the goods arrived and the price matches,
  • recurring contracts (rent, leasing, subscriptions), to know which period the cost covers,
  • the coding history for the same supplier, because it is the best hint as to how the company records similar expenses,
  • the chart of accounts, the cost center list and the accounting policy with its thresholds, for example the value above which a purchase becomes a fixed asset.

For a pilot, an export of this data from two or three months is enough. The ERP connection through a technical account and roles is set up later, following the rules in AI Workers and ERP: data, permissions and an audit trail.

Coding rules: the rules card and history

A coding proposal comes from two sources. The first is the set of rules written down with the accountant in the rules card. The second is history: how the company has coded invoices from this supplier and similar items so far. Rules take precedence, and history helps where the rules are silent.

Examples of rules worth writing down explicitly:

  1. Regular supplier, regular account. Invoices from the telecom operator go to telecom services and the cost center of the department that holds the contract.
  2. Vehicles. For expenses related to cars, a taxpayer generally deducts 50% of the VAT (Article 86a of the Polish VAT Act), unless the vehicle is used exclusively for business and meets the conditions in the act. The AI Worker flags such items and applies the rule from the rules card for the given vehicle.
  3. Accommodation and catering services. Article 88(1)(4) of the Polish VAT Act excludes the right to deduct VAT on their purchase, apart from narrow exceptions. A restaurant invoice gets a proposal without VAT deduction.
  4. Costs covering several months. An annual license or insurance policy goes to prepaid expenses, not entirely into the costs of one month.
  5. Fixed asset or expense. A purchase above the threshold in the accounting policy goes to the accountant for a decision, flagged as "possible fixed asset".

Each proposal has a justification the accountant can read in a few seconds. An illustrative example with made-up numbers:

FV/11/214     supplier: office cleaning services
description:  office cleaning, November 2026, contract UM/2025/07
cost center:  administration (from the contract)
posting:      external services; input VAT deductible
basis:        rule 1 from the rules card; 10 previous invoices from this supplier on the same account
notes:        none

Checks before approval

Part of the AI Worker's job is checks that a person does not run every time when invoice volumes are high:

  • duplicate: the same pair of invoice number and issuer tax ID is already in the register,
  • match with the order: price, quantity and VAT rate agree with the purchase order and goods receipt,
  • supplier account: whether the bank account on the invoice appears on the Polish register of VAT taxpayers (the "white list") and matches the master data,
  • period: whether the sale date falls in a month that accounting has already closed,
  • currency: whether an invoice in a foreign currency uses the exchange rate for the day of the transaction.

A discrepancy does not block the invoice forever. It goes to the accountant with a description of what does not match, and the AI Worker does not try to resolve it alone. A change of a supplier's bank account is always a matter for a human, because it is a common way to divert payments. The general rule for splitting "does on its own" from "waits for you" is described in Human in the loop.

How to measure the effect and where to start

Before the AI Worker gets its first real invoice, it is checked against a test set: invoices from previous months with coding the accountant has already approved. You measure what share of proposals the accountant would accept without changes, separately for each account and each cost type. An average across the whole set can hide an account where the AI Worker is wrong every other time. The method is described in How to measure the quality of an AI Worker's work.

After launch, three things matter: the time from receiving an invoice to approving its coding, the share of proposals the accountant corrects, and the number of discrepancies caught before payment. The course of such a deployment, from a single invoice queue to an export into the finance and accounting system, is shown in the case study of an AI Worker for describing and coding invoices. DYNAMINDS Labs starts such projects with a free diagnosis of a single process.

Questions and answers

Can an AI Worker post a cost invoice on its own?

Technically yes, but it should not. The Polish Accounting Act ties coding to the person responsible for it, and posting in a closed period is hard to reverse. The AI Worker has permission in the ERP to read data and create a draft document, while posting stays with the accountant, who approves the coding with one click.

Do KSeF invoices still need OCR?

No. A KSeF invoice is an XML file with a fixed structure, so the data sits in fields and can be read without image recognition. OCR, or a model that reads the document, is needed only for invoices outside KSeF, for example from foreign suppliers, and for other cost documents.

What happens to an invoice the AI Worker cannot describe?

It goes to the accountant with a note on what is missing: for example there is no purchase order, the supplier is new or the line item matches no rule. The AI Worker does not pick an account by guesswork. After the accountant decides, it is worth adding a rule to the rules card so that a similar invoice does not come back.

Can an accounting firm use an AI Worker?

Yes, with one caveat: each client of the firm has a different chart of accounts, different cost centers and a different accounting policy. The rules card and the test set are therefore built separately for each client or group of similar clients, and client data must be kept apart.

What it looks like in a project

Start with one task. Describe it, and DYNAMINDS Labs will prepare a free diagnosis.

Meet DYNAMINDS Labs

Read more: AI Workers