💼 How can you trust an AI to do your accounting?

Explainable and auditable AI in accounting

LLMs are inherently probabilistic, so how can you trust them with deterministic accounting workflows? In today’s post, we cover self-reflection, explainability and audibility in AI — and why it’s important for accounting.

[Read time: 5 minutes]

🤔 A probabilistic system

In the simplest terms, LLMs (Large Language Models; which form the foundation of most modern AI systems) work by predicting the next token in a sequence based on the set of preceding tokens.

A token is a known item to AI vocabulary, analogous to a word in natural language vocabulary. In fact, a single word is often equal to a single token (long words are sometimes split into multiple tokens).

The reality is much more complex (I’d recommend 3Blue1Brown’s YT series on neural networks if you want to get into the details), but the key concept to understand is that LLMs produce a probability distribution of what happens next and choose the most likely token from this distribution, as opposed to calculating a single right answer.

This means that you can ask AI the same question five times, and get five different results — especially with open-ended ‘zero-shot’ questions like “write me an essay on explainable AI in accounting”.

Today, we mostly use LLMs in zero-shot mode, prompting a model to generate final output token by token without revising its work. This is akin to asking someone to compose an essay from start to finish, typing straight through with no backspacing allowed, and expecting a high-quality result. Despite the difficulty, LLMs do amazingly well at this task! 

Zero-shot prompting is the most common way to use AI today, but it creates an obvious problem when applied to deterministic tasks. Most accounting workflows are deterministic because, given sufficient context, there is a correct and incorrect answer. You don’t want the AI to randomly stumble upon the wrong one.

🕵️ Reaching a deterministic outcome

Prompt engineering — specifically, not asking simple open-ended questions and being explicit on the type of response required — can go a long way to improving the reliability of AI responses. For example, in accounting, you might ask an AI to categorise a transaction and provide a list of 100 suitable ledger codes, specifying that the response must be one of the codes from the list. This narrows down the possible outputs from near infinite to one in 100. But how do you ensure the AI picked the right one?

There are many different strategies to deploy, but the one we are going to focus on today is called reflection.

Reflection is a process where AI models critique their own outputs to improve accuracy. Instead of providing a final answer right away, the AI revisits its initial response and refines it first. If you use ChatGPT regularly, you likely do this yourself whenever you ask the AI to change its response or improve it in some way. Using AI agents, you can automate this process.

In accounting, where precision is crucial, reflection ensures that AI doesn’t just provide an answer but verifies its correctness. This is akin to an accountant double-checking their ledger entries. When an AI categorises a transaction, reflection prompts it to re-evaluate the choice, ensuring it adheres to accounting standards and the provided list of ledger codes, thereby minimising errors and increasing the reliability of the AI’s decisions.

Reflection also enhances the transparency and auditability of AI in accounting. By documenting its review process, the AI creates a clear trail of how it reached its decisions. This means auditors can easily follow the AI’s steps, making it simpler to understand and trust the results.

An example of AI self-reflection in our app

When accountants use our app for the first time, the “wow” moment typically comes from seeing the reasoning behind the AI’s decision-making, like in the example above. This is only possible with self-reflection, which has the benefits of improved accuracy, explainability and auditability.

Interested in seeing how self-reflection works in our AI-powered accounting app? Get in touch (by replying to this newsletter or reaching out on LinkedIn).

Until next time 🫡

Reuben