Skip to main content

A finance team asks you for an AI agent to process supplier invoices: read the PDF, extract the fields, match them to the purchase order, and post to the ledger. Would you build an agent?

Agents and tools · Intermediate 3

Short answer

Probably not. The steps are fixed and known, so I would build a workflow: code controls the order, and a model does only the extraction step with a strict schema. An agent adds cost, latency and unpredictable paths with no gain here. I would consider an agent only for the exceptions, where the next step depends on what is found.

Deeper answer

An agent is useful when you cannot write the steps down in advance, because the model must choose the next action from what it sees. Invoice processing is the opposite: the same four steps run every time. Letting a model choose the order only adds ways to fail, such as skipping the match or posting twice. It also makes testing harder, because each run can take a different path.

So the design is a pipeline. A model extracts fields into a schema. Code validates totals and the GST number, matches the purchase order with rules, and posts to the ledger. Mismatches go to a person, or to a small agent that can look up related documents. Interviewers listen for a candidate who can say no to an agent, and who names the real costs: money, latency, and behaviour that is hard to predict.

What a strong answer covers

Answer it out loud in the mock interview about 2 min

Follow-ups to expect

Common mistakes

Learn it

The agent loop

Practice Agents and tools questions

More on this topic

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.