Exploring how AI reshapes the way humans think, learn, and create.

Thinking With AI

Sampling, Not Computing: How to Verify Generative AI Output Without Checking Every Row

Generative AI samples answers rather than computing them, so quiet errors can pass manual spot checks. This guide shows how to verify AI output with structural constraints, invariant validation, stratified sampling, and confidence routing — and when human review remains mandatory.

Intelligenr Research Team·
generative AI output verificationdeterministic vs probabilistic AIAI accuracy and context lengthinvariant validation for LLMs

Editorial Note: This piece grew out of a two-week argument inside our own newsroom: can AI actually take over the job of checking data? We changed our minds several times along the way, and we have left the uncertain parts in the text. The job scenarios described here are composites based on common industry workflows; they do not represent specific companies. Research findings, illustrative calculations, and operational examples are distinguished throughout the article.

Sampling, Not Computing: How to Verify Generative AI Output Without Checking Every Row

A field guide to verifying AI output without checking every row.


Why Generative AI Misfires on Precise Data Work

Have you ever handed a batch of contracts, invoices, medical records, or loan files to a model and asked it to extract the key fields? The output was hard to fault. Every field present, every format correct, every sentence stated with confidence. You spot-checked twenty rows. All twenty were right. Two weeks later, someone noticed that a limitation-of-liability clause had lost half of its qualifying condition — and that the missing half had been sitting in the source document the whole time, in plain text.

Failures like this share one property: the error was quiet. When traditional software fails, it usually makes noise — an exception, a crash, a null field, a reconciliation that does not balance. When a generative model fails, the output stays fluent, complete, and self-assured. The error does not announce itself.

We want to put three claims on the table before going anywhere.

First, these incidents rarely happen because the model lacks capability. They happen because the model was assigned the wrong job. It was asked for a single determinate answer, while its underlying mechanism is probabilistic sampling. A program computes the answer. A model samples an answer.

Second, because the mechanisms differ, the acceptance criteria cannot be shared. Validating model output with the playbook written for deterministic software does not work, and no amount of rigor in that playbook will fix it.

Third, a practical verification path does exist. It just doesn't look like "check more carefully." It looks like this: constrain the structure so a whole class of errors becomes impossible, validate invariants across every row with code, and reserve human review for stratified sampling.

Here is a question to hold onto. If checking every row by hand is the only workable approach, then the technology has already failed at scale. Do you agree?

To answer it, we need to look at what actually happens in each case.

Deterministic vs Probabilistic AI Output: What's the Actual Difference?

Traditional automation often performs a deterministic mapping. Given the same input, rules, software version, and execution environment, a deterministic program is designed to produce the same output. That does not make it automatically correct. A defect in the rules can produce ten thousand identical wrong results. But once the defect is identified, the correction can be applied systematically, and the same test cases can be rerun to verify the change. This reproducibility is fundamental to financial ledgers, risk engines, and reconciliation systems.

A generative model works differently. During training, it learns statistical patterns in data. During inference, it generates tokens according to a model-defined probability distribution and a decoding strategy. Sampling-based decoding introduces randomness, while greedy decoding and low-temperature configurations can make outputs more repeatable.

The distinction is important, but it needs one qualification.

Setting temperature to 0 does not guarantee bit-identical output across every environment. Floating-point addition is not associative, and GPU execution order, numerical precision, software versions, and hardware differences can affect numerical results. In some model-serving architectures, batching and routing decisions can introduce additional sources of variation. These effects matter particularly when competing token probabilities are close.

The practical conclusion is not that every repeated request must produce a different answer. It is that repeatability within a controlled environment is not the same as guaranteed reproducibility across environments.

For production systems, the relevant question is therefore not simply whether an output can be reproduced. It is whether the system can detect, contain, and recover from an incorrect output.

The practical consequence of the mechanism gap is a difference in the nature of errors. We find it useful to sort them into two kinds.

  • Loud errors. Exceptions, missing fields, failed validations, unbalanced accounts. Monitoring catches them. Downstream systems reject them.
  • Quiet errors. Perfect format, coherent prose, plausible citations, wrong content. They pass every schema check and get ingested without complaint.

Scale turns quiet errors from isolated slips into systemic incidents. This is also why "we spot-checked twenty rows" carries no guarantee. A spot check measures average behavior. What matters in production is the worst row.

A concrete misassignment illustrates the point. In commercial loan underwriting, fields like days past due, financial ratios, and credit-limit calculations routinely get handed to a model because that's where the team is already working. Every one of those fields has exactly one correct answer. Days past due is a date subtraction. A ratio is a numerator over a denominator. Asking a model to produce them means asking it to write a number as if it had computed one. Those fields belong to code, where a tested calculation can be applied consistently across records, provided its rules and inputs are correct. Handing them to a sampling mechanism means asking probabilistic generation to carry a deterministic responsibility.

With the mechanism clear, the next question is about scale.

Does AI Accuracy Drop as Context Gets Longer?

It can, although the relationship is more specific than simply saying that longer context always produces lower accuracy.

Liu et al. published "Lost in the Middle: How Language Models Use Long Contexts" in 2023, with the work subsequently appearing in TACL in 2024. Across multi-document question answering and key-value retrieval, the researchers found a U-shaped performance pattern based on where relevant information appeared in the context. Models generally performed better when the relevant information appeared near the beginning or end, while performance often declined when it appeared in the middle. In one reported GPT-3.5-Turbo experiment, performance with relevant information placed in the middle fell below the closed-book baseline.

This is an important qualification to long-context capability. A model's ability to accept a large input does not guarantee that it will use every part of that input equally well. Although long-context models have continued to improve, positional sensitivity remains a relevant evaluation concern.

The engineering corollary is not that error rates necessarily rise with the number of records processed. It is that larger contexts introduce more opportunities for relevant information to be overlooked, confused, or given insufficient weight. The risk depends on the task, the model, the context structure, and the position of the information.

For production workflows, "feed it ten thousand rows at once" is therefore a poor substitute for a designed processing pipeline. Chunking, validating each extraction, preserving document-level provenance, and keeping each request focused on the information it actually needs are more defensible approaches.

Health insurance claims review illustrates the problem. Feeding a full year of a patient's medical records into one summarization call can make it harder to locate a particular pre-existing condition than processing documents individually and validating each extraction. A better engineering design combines per-document extraction with a dedicated evaluation set for key-entity recall. A missed pre-existing condition is a high-severity error, so it should be measured separately rather than averaged into an overall accuracy score.

Which raises the obvious next question: what should actually go to the model?

What Data Should You Hand to Generative AI?

We use a deliberately simple test, and we'll call it the uniqueness test. Does this step require a determinate answer that can be calculated or verified against explicit rules, or does it require interpretation where several answers may be reasonable?

Determinate calculations and rule-based checks should generally go to code. Semantic interpretation and judgment should generally go to the model, with evaluation and review appropriate to the consequences of error.

This is a division of responsibility, not a claim that models cannot produce precise answers.

What generative models are genuinely useful for falls into a few families: understanding and transforming unstructured data (text, images, audio, scanned documents, and call recordings); semantic classification and extraction; summarization, rewriting, and translation; interpreting ambiguous or incomplete information; synthesizing conclusions across multiple documents; and expressing the same conclusion in different registers.

Their limitations become more consequential when a workflow requires exact arithmetic, exact aggregation, exhaustive counting, strict compliance with many simultaneous constraints, or identical results across repeated executions. A model may extract the numbers needed for a calculation, but the calculation itself should be performed and checked by code.

One common overcorrection deserves a correction of its own. The claim "AI can't handle precise structured data" is wrong. Discriminative models are strong on structured prediction tasks — credit scoring, demand forecasting, and industrial defect detection are built on them. The accurate distinction is that generative models should not be treated as substitutes for deterministic computation. Different model families and software components can carry different responsibilities within the same workflow.

A useful example sits in contact center quality assurance. The data is largely unstructured: call recordings and chat transcripts. The volume can exceed what human reviewers can reasonably listen to in full. The task combines semantic judgment — was there a prohibited commitment, was an upset customer handled appropriately — with rule-based checks, such as whether a required disclosure was mentioned.

Generative AI can help with this workflow, but the acceptable error rate depends on the specific review category. Missing a minor conversational preference is not equivalent to missing a legally required disclosure or identifying a prohibited commitment.

The surrounding design matters as much as the model's initial suitability. Whatever part of the scoring rubric can be expressed as a rule should be implemented as a rule. The model handles the subjective dimensions, while human reviewers independently assess a sample to evaluate model performance. Where possible, QA output should initially support coaching and process improvement rather than directly determine employee discipline. Tying an unverified model judgment to an employee's income creates consequences that extend well beyond the accuracy problem.

So far so good. But what happens when a workflow already has to use a model on data that matters?

How to Verify AI Output Without Manual Review

Start by challenging the obvious intuition: "have a person look at everything" is not automatically a scalable or reliable verification strategy.

METR ran a randomized controlled trial in 2025 with 16 experienced open-source developers and 246 real tasks. Developers allowed to use AI completed work about 19% slower on average, despite predicting beforehand that AI would make them 24% faster and still estimating afterward that it had made them about 20% faster. The researchers explicitly limited their findings to the developers, projects, and tools studied. These were early-2025 frontier-model results, not a universal estimate of AI productivity.

The study does not measure the accuracy of human quality assurance. It does, however, illustrate a relevant problem: people can misjudge the actual effects of AI assistance even when they have direct experience using it.

That matters for verification design. A human reviewer who is under time pressure and sees fluent, plausible output may overlook errors, particularly when reviewing repetitive material at scale. Manual review remains essential in many workflows, but it should be supported by independent checks rather than treated as a guarantee of correctness.

A workable structure has three layers.

Layer one: structural constraints

Don't let the model return unrestricted prose when the downstream system expects structured data. Use JSON Schema or constrained decoding to define the output contract: fixed field names, fixed types, required fields, and values drawn from an explicit set.

For example:

{
  "type": "object",
  "properties": {
    "clause_type": {
      "type": "string",
      "enum": [
        "indemnity",
        "limitation",
        "termination",
        "confidentiality"
      ]
    },
    "effective_date": {
      "type": "string",
      "format": "date"
    },
    "source_span": {
      "type": "string",
      "minLength": 20
    },
    "confidence": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    }
  },
  "required": [
    "clause_type",
    "effective_date",
    "source_span",
    "confidence"
  ],
  "additionalProperties": false
}

This layer can prevent malformed output, missing required fields, unsupported enum values, and certain type or range violations, provided the implementation enforces the schema and supports the specified constraints.

But structural validity is not factual validity. A correctly formatted date can still be the wrong date. A source span can exist without supporting the conclusion. And a confidence value within the permitted range is not necessarily calibrated.

The schema controls what the model is allowed to return, not whether the returned information is true.

Layer two: invariant validation across every row

This is the layer that replaces full manual review, and the shift in thinking is simple: stop checking whether the content is right, and start checking whether the relationships hold. These checks can be written as code, they cost almost nothing, and they run on 100% of rows.

The useful families:

  • Conservation checks. Do line items sum to the total? Do debits equal credits? Does a ratio fall within its permitted range?
  • Provenance checks. Does every extracted claim point to a specific source document and location? Does the referenced span exist, and can the supporting passage be retrieved for further review?
  • Consistency checks. Is the same entity described in contradictory ways across fields or documents?
  • Recomputation checks. Can a reported number be independently recalculated from the original inputs and compared with the model's result?
  • Reference checks. Do clause numbers, statute numbers, and reference IDs resolve against an authoritative registry or source?

These checks can run across 100% of processed rows, catching violations of explicitly defined relationships without requiring a person to inspect every record.

Their limits matter just as much. A total can reconcile even when one line item was extracted incorrectly. Two fields can agree because they share the same upstream error. A citation can exist without supporting the interpretation attached to it.

Full validation coverage means every row is tested against the defined rules. It does not mean every factual claim has been independently verified.

That distinction is why invariant validation reduces the verification burden rather than eliminating the need for human review.

Accounts payable three-way matching is a useful illustration. A rules engine can handle the deterministic parts of the workflow: aligning purchase orders, goods receipts, and invoice fields; checking quantities and prices; and identifying discrepancies. The model is then used for the parts that genuinely require comprehension: explaining why a match failed, interpreting payment terms in a contract, or understanding what a vendor's email is requesting.

The invariants here are largely expressible as code: line items sum to the total, tax is recalculated using the applicable rule, and clause references resolve against the relevant contract or clause library. The division of labor is clear, although the actual verification cost and automation coverage depend on the quality of the source data and the complexity of the matching rules.

Statutory citation in contract review is another useful application of provenance checking. The model should cite only passages returned by retrieval and emit the corresponding passage ID. Code can verify that the ID exists, that the passage belongs to the retrieved source, and that the source has not changed unexpectedly.

However, the existence of a passage does not establish that it supports the legal conclusion. That relationship still requires semantic assessment, and potentially legal review. A retrieval system can reduce unsupported citations, but it cannot make every interpretation correct. Retrieval failures and unsupported conclusions should be tracked as separate failure categories.

Layer three: stratified sampling and confidence routing

Sampling monitors. It does not guarantee. That boundary needs to be stated plainly.

Doing the arithmetic from the binomial distribution (our own calculation, not a cited result): if the true error rate is 1%, a sample of 100 rows has roughly a 63% chance of surfacing at least one error. If the true error rate is 5%, a sample of 60 rows has roughly a 95% chance.

The conclusion is direct: sampling tells you whether the system is probably broken. It does not tell you whether this particular row is correct.

So sampling must be stratified by risk. High-stakes fields — amounts, eligibility decisions, legal interpretations — require a high sampling rate, independent verification, or full human review. Low-stakes fields — phrasing, formatting, and non-critical categorization — can use a lower rate.

Add confidence routing, but treat confidence as a routing signal rather than proof of correctness. Model self-assessment, agreement across repeated samples, and task-specific confidence scores can help identify outputs that deserve additional attention. These signals should be evaluated against labeled data to determine whether they actually predict errors.

Low-confidence or inconsistent outputs should be routed to humans or independent verification. High-confidence outputs can receive lighter review only when their risk level, validation results, and measured error rates justify that decision. For high-stakes decisions, model confidence alone should never authorize an output to bypass mandatory review.

This approach can reduce routine human inspection while concentrating review effort where errors are more likely or more costly. The actual reduction in review volume must be established through evaluation rather than assumed in advance.

One more tool is worth naming. For certain reasoning tasks, sample the same input several times and measure agreement — a technique related to self-consistency, described by Wang et al. (ICLR 2023). Their research demonstrated improvements on several reasoning benchmarks by selecting answers supported by multiple sampled reasoning paths.

The limitation is important: agreement is not independent confirmation. Repeated samples can reproduce the same systematic error. Rows with substantial disagreement are a useful high-risk signal, but agreement should be treated as supporting evidence, not a substitute for verification.

With three layers in place, one concern remains, and it is the one teams ask about first.

Can You Make LLM Output Consistent? Temperature, Seeds, and Limits

Engineering can substantially improve repeatability and control the sources of variation: low temperature or greedy decoding, fixed seeds where supported, constrained decoding, post-processing normalization (unit harmonization, deduplication, format coercion, and retries on validation failure), result caching, prompt and model version pinning, regression testing, and shadow-mode rollouts that run old and new versions in parallel before deployment.

These measures can make outputs highly repeatable within a controlled environment. They do not guarantee bit-identical results across different hardware, software versions, model-serving configurations, or execution environments. Some numerical and infrastructure-level sources of variation remain outside the application's direct control.

The honest engineering objective is therefore not to promise perfect reproducibility everywhere. It is to make changes traceable, outputs testable, and residual uncertainty manageable. Repeatability can be engineered; correctness still has to be verified.

So the goal has to be restated. For high-stakes workflows, the objective is not "make the model perfectly consistent." It is three things: bounded error, detectable errors, and reversible outcomes.

In engineering governance terms, commercial loan underwriting offers a reasonable reference pattern. Model and prompt versions are pinned, and any version change must pass a fixed evaluation set with no metric regression. Shadow mode runs in parallel for a period before anything takes effect. Everything is logged and reversible. Approval authority stays with a human, and model output is attached as a working paper rather than treated as a decision.

Regulation points in the same direction. The EU AI Act imposes obligations on high-risk AI systems, including human oversight, risk management, and post-market monitoring.

The updated implementation timeline is important. As of November 2026, the rules for high-risk AI systems covered by Annex III are scheduled to apply from December 2, 2027. High-risk AI systems embedded in products covered by Annex I are scheduled to follow from August 2, 2028. Most other provisions, including the applicable general-purpose AI and transparency obligations, have separate application dates and should not be treated as part of a single implementation deadline.

Law is not decoration in this discussion. For systems within its scope, it turns human oversight from an engineering preference into a regulatory obligation.

Four scenarios have been described so far. The last one is different in kind.

When AI Works Technically but Shouldn't Run Alone

Resume screening is technically straightforward. A model can extract, normalize, deduplicate, and rank. The risk sits nowhere near accuracy.

A model can learn discriminatory preferences from names, gender indicators, schools, and age, and a conventional evaluation set will not necessarily expose them — because the evaluation set measures extraction accuracy, not ranking fairness. The EU AI Act places recruitment and screening in its Annex III high-risk category.

The defensible configuration is narrow: the model extracts and deduplicates; ranking and elimination decisions stay with people; group fairness gets audited on a schedule.

This case makes a point that sits outside engineering. For some tasks, whether the answer is "right" depends on who bears the consequences, not only on the accuracy of the output.

A Two-Axis Matrix for AI Automation Decisions

Everything above can be organized into a practical decision matrix. Two dimensions matter: the cost of an incorrect output and the difficulty of independently verifying it.

Relatively easy to verify Difficult to verify
High cost of error Use deterministic rules or calculations wherever possible; independently validate inputs and outputs; require human approval for consequential decisions AI may assist with analysis or drafting, but provenance and human review are mandatory; pilot on a limited scale before deployment
Low cost of error Automate routine processing with validation rules and ongoing monitoring Use AI more flexibly, with representative sampling and periodic quality evaluation

The examples in this article illustrate different positions within the matrix, although their exact placement depends on the consequences of the specific task.

Computed underwriting fields are relatively easy to verify but carry high error costs. Claims summarization can be difficult to verify comprehensively and may also carry high consequences when important conditions are missed. Explanatory work in accounts payable can be lower risk when it merely helps staff investigate a discrepancy, but the underlying payment decision remains subject to deterministic checks. Contact center QA can also move between risk levels depending on whether the output supports coaching or determines compliance findings and employee consequences.

Resume screening deserves separate consideration. Its central issue is not simply whether an individual output can be verified. It is whether the criteria used to rank or exclude candidates are fair, appropriate, and accountable. That introduces questions of consequence ownership and discrimination that a two-axis verification matrix cannot fully capture.

Sequence matters more than the table. Decide first whether the task should be given to a probabilistic model. Then decide what measuring stick applies. Then decide who catches it when the measurement is inconclusive. Run that order backwards — deploy the model, then figure out verification — and a team ends up permanently stuck with results that don't reconcile and no explanation of why.

Operationalized into one sentence: determinate answers go to code, indeterminate answers go to the model; constrain the structure, validate invariants across every row in code, and keep human review stratified.

Which Answer Should You Never Sample For?

Lifting the view one level up, this article has been about a thinking skill: deciding when an answer deserves to be trusted.

Historically, errors often announced themselves through external signals. A program threw an exception. An account failed to balance. A colleague challenged a conclusion. Generative AI can make those signals less visible. Its output may arrive fluent, complete, and confident even when important information is missing or wrong.

That changes the nature of verification. Judging whether an answer is trustworthy is no longer a final inspection step. It has to shape the workflow before the model is used: which tasks belong to code, which require interpretation, what can be checked automatically, and where human judgment remains necessary.

Models will continue to improve in context handling, consistency, and structured output. But deciding what counts as a correct answer — and who is accountable when it is wrong — cannot be delegated to the model itself.

One question remains: In your own work, which step has exactly one correct answer? That step deserves a computation or an independent check, not merely a plausible-sounding response.


Read More of Intelligenr


References

  1. Liu et al. (2024). Lost in the Middle: How Language Models Use Long Contexts. TACL.

  2. Wang et al. (2023). Self-Consistency Improves Chain of Thought Reasoning in Language Models. ICLR.

  3. Becker et al. (2025). Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity. METR.

  4. PyTorch. Numerical Accuracy. Official documentation.

  5. European Commission. Navigating the AI Act. Official implementation guidance.

This article was published in Thinking With AI.

← Back to Thinking With AI