Made-Up Numbers in Agent Financial and Data Calculations

Agent numbers can look right and pass every check while being invented.

· 8 min read · Updated
Cover illustration for “Made-Up Numbers in Agent Financial and Data Calculations”
Agent Hallucination · October 17, 2026 · 8 min read · 1,901 words

Traditional error monitoring fails for AI agents because a request can succeed even when the agent returns the wrong number. In financial and data calculations, a model can generate a plausible value without retrieving or computing it, then pass every format and execution check. Catching made-up numbers therefore requires tracing outputs back to their inputs and instructions.

Why agents producing numbers is different from agents retrieving numbers

An engineer may read a returned revenue figure as evidence that the agent looked it up. But when a model produces that figure through generation, it has predicted a plausible digit sequence. A database query retrieves values, while model generation selects statistically likely tokens. A digit is another token in that process, so the mechanism that produces a narrative sentence can also produce a revenue figure, a row count, or a compliance percentage. The distinction is not how the number looks, but where it came from.

Agents can invoke tools that retrieve or calculate values, but that does not make every number they emit a tool result. The model has no internal error signal that reliably distinguishes a fabricated number from a retrieved one. Both can appear with the same confidence and formatting, leaving the reader with no visible reason to distrust either.

This distinction becomes more consequential when the answer is an input to another step. A fabricated intermediate figure can enter the next stage as if it were retrieved data. That stage then builds further calculations on an unsupported premise, even if its own arithmetic is correct.

The specific ways fabricated numbers surface in financial and data agent tasks

Numeric fabrications tend to follow recognizable patterns because the model generates values that fit their context. Hallucinated aggregates are one such pattern. A financial reporting agent asked to sum or average a dataset may return a figure that fits the report without deriving it from the underlying records. The format and magnitude can both look right while the calculation itself is absent. The diagnostic distinction is between a plausible total and a total supported by the data.

Confabulated identifiers create a different failure in data pipeline tasks. A transaction ID, account number, or record key may look like a valid identifier without pointing to a real record. Unlike an invented aggregate, the immediate problem is not the amount but the reference. If downstream steps use that identifier for a lookup or join, they depend on a record the generated value does not establish.

Stale-value substitution happens when the agent fills in a missing value despite its uncertainty. If a live source is unavailable or ambiguous, a financial reporting agent may substitute a prior quarter's revenue, a commonly cited benchmark, or a round number from its context or training distribution. Plausible-range anchoring differs because the substitute need not come from an earlier value. A compliance audit agent may generate a percentage within an expected range without deriving it from the relevant records. Both can survive a sanity check, but one replaces missing evidence with an available value while the other anchors on an expected magnitude.

Cascading precision starts with an invented input and builds calculations on it that look sound. In a financial workflow, an unsupported figure can propagate through subtotals, tax calculations, and variance analyses. The resulting precision makes the answer look more thoroughly calculated, although every derived figure still depends on the fabrication.

Why traditional error monitoring fails for AI agents returning numbers

A made-up number can pass every technical check that conventional monitoring can see. The agent returns HTTP 200, the tool call completes, and the output contains well-formed JSON with a number in the expected field. Those signals establish that the request was processed and the response has the required shape. They do not establish that the value came from the required source.

Structured output enforcement does not bridge that gap. A JSON schema or typed response can confirm that a field contains a number, but it says nothing about that number's provenance.

Latency and token-count metrics show how the system runs, but they cannot show whether its answers are correct. Neither gives a way to tell whether a returned revenue figure is grounded. A log can record the value faithfully and still offer no reason to flag it, because recording an answer is not the same as knowing the correct answer. In a multi-step workflow, the output of each step can pass these checks while the error grows from step to step.

The monitoring gap is structural. Traditional error monitoring establishes whether the system completed operations, while numeric correctness depends on whether those operations fulfilled the task. An additional success metric cannot supply the missing relationship between the instruction, the evidence, and the output. Detecting this failure requires understanding what the agent was supposed to do.

What makes numeric fabrications particularly hard to catch in multi-step agent traces

A multi-step trace distributes the evidence needed to judge a number across the workflow. The original instruction may specify a source near the beginning, while the unsupported value appears much later. Long context separates the requirement from the deviation, and the agent's own context does not necessarily flag the inconsistency. Debugging thus means linking events that can each look right on their own.

Once a fabricated value becomes a tool input, it carries no marker distinguishing it from real data. A later step can process that input correctly and still contribute to a wrong final answer. This creates a tracing problem because the place where the error becomes visible need not be the place where it began. Inspecting the last calculation may explain how the final number was produced without explaining why its inputs were accepted.

Tool calls introduce another layer of opacity. A trace can show that an agent invoked a calculator, database query, or spreadsheet operation without establishing that the agent used the returned value faithfully. In its subsequent reasoning, the model may echo, paraphrase, or silently modify that result. The presence of a relevant tool call is therefore weaker evidence than a traceable connection between its result and the reported number.

Branching and retry logic make that connection harder to reconstruct. An agent may fabricate a value during a retry rather than propagate the earlier failure, leaving a successful second attempt in the trace. Because the fabrication occurs within generation rather than as a logged function error, there is no stack trace pointing directly to it. The debugging task is semantic, requiring a reading of what the steps mean together.

Why predefining every numeric failure mode is an insufficient detection strategy

The natural engineering response is to add range validators, format rules, and known-value assertions. These checks can catch the failures they describe, but their coverage is bounded by what was anticipated. A range validator rejects an implausible amount while accepting an invented amount within its limits. That limitation matters here because plausibility is precisely what the generation process tends to produce.

Known-value assertions offer a stronger comparison only when the correct value is available. To use them for every possible numeric output, teams must keep ground truth up to date for a large set of financial and data tasks that keeps changing. That reference may be unavailable at monitoring time. The obstacle is therefore not a lack of diligence, but the difficulty of defining the correct answer for every output before the agent produces it.

Each new task, prompt revision, or data source also changes the ways the agent can fail. Static checks cannot foresee every way those changes might lead to an answer that looks right but has no basis in the data. A fabrication that passes an existing check remains undetected unless the check gains a relevant basis for rejecting it. The absence of an alert then risks being interpreted as evidence of correctness when it only establishes that no configured condition was triggered.

Predefined assertions test only what they cover, so they cannot fully show whether the agent did what it was asked to do. Numeric intent includes the source to use, the calculation to perform, and the acceptable range of the answer. Detection needs that intent as a reference. Otherwise, it judges whether a number could be right without establishing whether the agent had grounds to return it.

How instruction-grounded auditing catches what output-level checks miss

Instruction-grounded auditing uses the system prompt and task specification as a contract for how the agent should act. Instead of comparing an answer only with a catalog of unacceptable outputs, it compares the trace with the work the agent was instructed to perform. For numeric tasks, the central question is whether the output can be traced to a grounded tool call or retrieved value. This changes the basis of detection from appearance to provenance.

Consider an agent instructed to retrieve revenue from a database. If the trace instead shows a number appearing in a generation step without a corresponding retrieval, the gap is detectable without knowing the correct revenue in advance. The requirement was retrieval, but the recorded behavior was generation. That mismatch is evidence of a deviation even when the returned figure looks entirely reasonable.

The same reasoning extends to calculations built from retrieved inputs. A relevant tool call somewhere in the trace is not enough if the reported number cannot be connected to its result. The audit must check whether the agent went from source to output as instructed. Using the instructed behavior as the reference removes the need to enumerate every possible fabricated figure.

Across traces, recurring deviations can reveal a systematic fabrication pattern. Alerting on those deviations makes a silently wrong figure actionable even when downstream systems report success. Lemma implements this approach by auditing every trace against the agent's own instructions, surfacing recurring numeric deviation patterns, and alerting teams in Slack.

What engineering teams should verify before trusting numeric outputs from production agents

Teams should first verify trace grounding for every numeric output. The trace should show the tool call that retrieved or computed the value and its connection to the returned number. A figure that appears in generation without a corresponding retrieval or calculation is a signal worth investigating.

That investigation depends on instructions that specify provenance clearly. An instruction such as “compute from the database query result” identifies the required input, while “compute revenue” leaves the source unspecified. Teams should state where inputs must come from as well as what calculation to perform. Doing so makes a departure from the intended retrieval visible as a deviation from an explicit requirement.

Multi-step workflows also need intermediate numeric outputs surfaced at each step. Those checkpoints make it possible to locate where an unsupported value entered the calculation before it reaches a report or downstream system. Monitoring should then aggregate deviations across traces to distinguish an isolated event from a recurring failure on the same task. Lemma's recurring-pattern monitoring fits this need to check whether the agent can be trusted across more than one response.

Finally, teams should check again that numeric outputs remain grounded after prompt changes, model updates, and new data sources. Each changes how the agent retrieves, generates, or carries values between steps. Trace-level production monitoring is the baseline for seeing whether those conditions produce deviations. Shipping a financial or data agent without it is not a calculated risk but an invisible risk, because fabricated numbers can reach users and reports without ever appearing as errors in an error log.

Sources

  1. AgentHallu: Benchmarking Automated Hallucination Attribution of LLM-based Agents
  2. Measuring Agents in Production
  3. AI Hallucinations: A Misnomer Worth Clarifying
  4. When Passing Tests Hides Vulnerabilities: An Empirical Study of Silent Failures in Agentic Systems
  5. Confidently Wrong: Detecting Hallucinations in Financial Question Answering from LLM Internal States
  6. Silent Failure in LLM Agent Systems: The Entropy Principle and the Inevitable Disorder of Autonomous Agents
  7. A Longitudinal Taxonomy of Silent Failures in a Production ...
  8. When Financial Fine-tuning Fails: A Three-Level Detectability Analysis of Numerical Hallucination in Domain-Adapted Language Models

More in Agent Hallucination