From the blog

Checking Vendor Identity and Invoice Counts in Gmail

Consider a payment-run review. Someone in accounts payable, the team that pays supplier bills, has two routine questions for an inbox agent: what is the latest invoice from Northgate Logistics, and how many invoices are due in May? Short answers can be pasted straight into the review, but the supporting records still need checking.

In a simulated accounts-payable Gmail inbox that LayerLens built for testing, answers to those exact questions failed conditions that a superficial check could miss:

  • Asked for the latest invoice from "Northgate Logistics," agents returned $13,150 without mentioning a second vendor in 8 of 20 reported answers. The inbox contains 2 different vendors with that name.
  • Asked how many invoices were due in May 2025, a saved run answered 5. The known answer was 6.

What follows covers what each test found, what a check of the figure alone could miss, and how a finance team could use the same checks before an agent works in a real inbox.

Why invoice questions in email matter now

Google reported more than 13 million Google Workspace customers in its April Next 2026 recap. That counts Workspace customers overall, not people using agents in Gmail, and does not measure Gmail usage or business-email volume. Google has also described a Workspace Studio flow that detects an invoice in email, extracts its data and logs it in a Sheet for analysis.

Once invoice data moves from email into the records a team reviews, the figure needs to remain connected to the vendor and invoice it concerns. An amount from the wrong vendor, or a monthly total that leaves one bill out, can pass straight into a payment decision without anyone noticing.

How the test was set up

The simulated inbox holds 40 fictional invoice threads across 8 vendors. It was tested with 5 agents, each built on a different foundation model. Model names are not reported, and the results are not a ranking. This is an independent simulation, not an evaluation of Google's Gemini in Gmail or the Workspace Studio flow.

The two questions were graded in different ways. The vendor question used a written rule for handling an ambiguous name. The May question used a known numeric answer.

Checking the Vendor Behind an Invoice

The question was:

What is the most recent invoice amount from Northgate Logistics, in USD?

Northgate Logistics Group and Northgate Logistics Laboratories are 2 distinct vendors in the inbox. Their latest invoices are $13,150 and $6,500. Because the question gives only the shortened name, it is ambiguous, and the task rubric gives full credit when an answer names both vendors and labels each one's latest amount, or asks which vendor was meant.

One failed answer said:

The most recent invoice from Northgate Logistics is for $13,150 USD.

The amount exists in the fictional inbox: $13,150 is the latest invoice from Northgate Logistics Group. The failure is that the answer settles a question the user never settled, and gives no sign that a second Northgate exists.

The 5 agents made 4 attempts each, across 3 question wordings with one repeated. In 8 of the 20 reported answers, the agent gave $13,150 without resolving which Northgate was meant. That tally comes from the test's source sheet and has not been independently rebuilt for this article. It describes one small simulated test, not a general failure rate.

Checking the figure alone. Confirming that $13,150 appears on a Northgate invoice would establish that the amount exists. It would leave unresolved which Northgate the user meant. No observed reviewer behavior is established by this test.

In a real payables process, that gap could mean approving one company's amount against the other company's account, or leaving the other vendor's invoice out of the run. The test does not show what any real user intended or that a payment went wrong. It shows that the ambiguity was hidden from the reader.

How a team could use it. Pull the vendor list and mark every pair of names that overlap: parent companies and divisions, similar trading names, suppliers known internally by a nickname. Ask the agent about each one using the short name staff actually use. When the request remains ambiguous, accept an answer that names both vendors with each latest amount labeled, or asks which vendor was meant.

A May count of 5 against a known 6

The second question was:

How many invoices in this mailbox are due in May 2025? Answer with the number only.

The test's known answer was 6. The agent answered 5. The result screen records 10 tool calls and marks the answer failed under "Exact value" grading. Its explanation says it "looked for '6' in the agent's final-answer line."

Checking completeness. The final reply was a number-only answer. It did not show the invoice set counted. Comparing 5 with the known total of 6 made the error visible; diagnosing it requires the underlying records.

The grade has limits of its own. It checks the final-answer line, not how the agent counted. A later review of the same saved trace identified INV-2025-0016, due 17 May 2025, as the sixth May invoice thread returned by search but not opened. This was not a new agent run. The trace shows five opens after that search; it does not establish why the agent stopped there.

How a team could use it. Before running the question, write down the expected set: each invoice that belongs in the month, with its invoice number and due date. Decide the counting unit in advance, since a thread can hold a reminder, a correction and a reply for a single invoice, and a message that mentions May is not necessarily an invoice due in May. When the agent's total differs from the list, compare the list with what the agent searched for and which records it opened. That comparison shows where the two diverge before anyone blames search, reading or counting.

Interpreting the results

Both cases produced answers that look complete and fail the condition the task depended on. Northgate needed the right entity. May needed the full set.

The Northgate rule checks whether an answer makes ambiguity visible; it cannot recover a user's unstated intention. The May check exposes a wrong total; it does not explain it. Neither case involves a real customer ledger, a payment, a financial loss or a comparison between models.

For a finance team, the transferable step is to write the acceptable answer down before the question is asked: which vendor counts, which message governs an amount, which invoices make up the month. With that written down, a fast answer can be checked against the task instead of against how convincing it sounds.