Skip to content
Lucerna Law

Getting started with legal AI

Why AI Gives Different Answers to the Same Question

By Published 9 min read

AI gives different answers to the same question mainly because a language model picks each word by sampling from probabilities, so two runs can take different paths. Answers also differ when anything sent with the question changes, such as earlier chat turns or the passages chosen from a file, and when the vendor moves to another model.

Why does AI give different answers to the same question?

A language model writes one small piece of text at a time, with a set of candidates with probabilities attached. Amazon's documentation says that "to generate each token in an output, the model samples from this distribution." Sampling is a draw, so a second run can draw differently, and every later word follows from the earlier draws.

The passage is from Amazon Bedrock's guide to inference parameters and randomness. It describes a model that, for any sequence, "determines a probability distribution of options for the next token," and calls the resulting variation "randomness and diversity."

A token is a word or a piece of one. The mechanics matter less than the consequence. If the first sentence of an answer begins "The lease was signed" in one run and "According to the lease" in another, the rest of each answer is built on a different start. Usually the two land in the same place. Sometimes they do not: one run mentions the amendment, the other does not, because the paths diverged early.

This is not the same thing as a hallucination, although the two can coincide. Variation describes two answers that differ. A hallucination is an answer that is false. Two answers can differ and both be true, and a model can give the same false answer every time. The post on AI hallucinations in legal work covers falsity.

Temperature, top K and top P: the dials that shape variation

Temperature, top K and top P are settings that control how adventurous the sampling is. A lower temperature makes a model favour its most probable next word, and a higher one makes less probable words likelier. Top K and top P cut the candidate list down before the draw. Most legal tools set these and hide them.

Amazon's page gives a worked example. For the prompt "I hear the hoof beats of", it imagines three candidates: "horses" at 0.7, "zebras" at 0.2 and "unicorns" at 0.1.

SettingWhat it does, per Amazon's pageIn the example
High temperatureFlattens the distribution, so probabilities become less different"Unicorns" becomes likelier and "horses" less likely
Top K of 2Considers only the two most likely candidatesOnly "horses" and "zebras" remain
Top P of 0.7Considers only the top 70% of the probability distributionOnly "horses" remains
Top P of 0.9Considers the top 90%"Horses" and "zebras" remain

Anthropic's glossary describes the same dial. It says lower temperatures "result in more conservative and deterministic outputs that stick to the most probable phrasing and answers." Then it adds the sentence that matters most for lawyers: "Even with temperature set to 0, the results will not be fully deterministic, and identical inputs might produce different outputs across API calls."

That is from the Anthropic glossary entry on temperature, which says it applies both to Anthropic's own service and to third-party cloud providers. Turning the dial to its lowest point narrows the variation. It does not promise the same answer twice.

The dial is also not always available. Anthropic's model deprecations page, read on November 5, 2026, lists temperature, top_p and top_k as removed in its API version of October 21, 2026, and recommends using prompting to guide model behaviour instead. A tool built on newer versions of that API cannot offer a temperature setting for those models even if its makers wanted to.

What changes between two runs besides chance?

Besides sampling, an answer changes when its inputs change, and in most tools the typed question is a small part of the input. The software also sends its own instructions, earlier turns of the conversation, and passages chosen from documents or a database. Change any of these and the same question becomes, for the model, a different request.

The common sources of change, in this post's summary:

What travels with a question, on this post's reading
  1. 01

    Tool instructions

    Written by the vendor, and revised by the vendor

  2. 02

    Earlier turns

    Whatever the chat already holds

  3. 03

    Selected passages

    Chosen afresh for each question when a file is too large to send whole

  4. 04

    The question

    Including small changes in wording

  5. 05

    The model

    Whichever model the vendor is using that day

Earlier turns of the chat

A question asked in a fresh chat and the same question asked after ten exchanges are different requests. The earlier exchanges are sent again with each new question, so a mistaken assumption early in a chat can colour every later answer. Starting a new chat is the simplest way to test whether an answer depends on what came before.

Passages chosen from the file

When a file is larger than the model can take in at once, software picks the passages it judges most relevant to the question. Rewording the question can change which passages are picked. The post on the AI context window explains that selection step. An answer that changes when you reword a question may be telling you that the first wording retrieved the wrong part of the file.

Lucerna Law's homepage describes this for its own tool: a question is sent with the text of the matter's files, all of it when it fits and otherwise a selection, together with up to the last 10 turns of the chat.

The wording of the question

"When was the lease signed?" and "What is the date of the lease?" look identical to a lawyer. To a model they are different strings, and the second may pull in the commencement date or the date on the first page. Small differences in wording produce differences in what the model attends to.

The serving system

Even with the same model, the system around it can change. Anthropic's page on model IDs and versioning says the weights for a given model ID are fixed, but that "the serving infrastructure around the model can change over time," including "the request router, safety classifiers, and sampling logic," and that such updates occasionally produce "minor differences in observable behavior."

Model updates and retirements: when the AI under a tool is replaced

A tool's answers can change because the vendor has moved to another model. Makers release and retire models on their own schedules. Anthropic's documentation says requests to retired models fail, and that it gives at least 60 days' notice before retiring a publicly released model. A legal tool built on a retired model has to move to another one.

The deprecations page defines the stages: an active model is "fully supported and recommended for use," a deprecated model is "still functional but no longer recommended," and a retired model "is no longer available for use." It recommends "thorough testing of your applications with the new models well before the retirement date," which is advice to the software builder. The lawyer using the software sees only the result.

The same maker's versioning page says that for its recent models a model ID "maps to a single, fixed model snapshot," and that "when an updated version is available, it ships under a new model ID." The model behind one ID does not drift. The tool can still switch IDs, and the tool's own name may stay the same throughout.

What changedCan the lawyer see it?Effect on answers
A new draw from the same modelNoDifferent wording, sometimes different content
The tool's own instructionsUsually notDifferent emphasis, format or caution
The underlying modelOnly if the vendor says soPossibly different reasoning and different errors
The serving system around the modelNoUsually minor differences

This is one reason a firm's test of a tool has a date on it. A tool that passed a firm's trial in the spring may run on a different model by autumn. California's guidance on generative AI, summarized in the post on the California Bar's guidance, treats periodic reassessment of a system as part of competence for this reason.

Lucerna Law's answers to common questions say the model behind each answer is recorded in its database, while the screen and the exported record show the assistant's name.

Is a different AI answer a sign that one of them is wrong?

A different answer is not by itself a sign that either is wrong, but it is a reason to look. If two runs differ only in wording, nothing is lost. If they differ in a fact, a date, a name or which document is cited, at least one is incomplete or mistaken, and the file has to settle it.

Sorting the differences helps:

  1. Different wording, same content. Normal. Use whichever is clearer.
  2. Different selection of points. One answer mentions three meetings and the other four. Check the file for all of them. The shorter answer may have missed one, or the longer may have counted a meeting twice.
  3. Different facts. One run says the notice was sent on March 3 and the other on March 5. Go to the cited passages. If one answer has no citation for its date, treat that date as unsupported.
  4. Different conclusions. One answer says the witness conceded the point and the other says he denied it. That is a sign the record is ambiguous or the question is, and it deserves a lawyer's reading, not a third run.

Asking the same question three times and taking the majority answer is not verification. All three draws come from the same model reading the same text, so they share its blind spots. A model that misreads a passage may misread it every time. The check that counts is the one against the source.

Lawyers cannot make a model deterministic, but they can make their own use of it repeatable. The aim is that someone reviewing the work later can see what was asked, when, what came back and what it was checked against. Most of this is record-keeping, and some tools do part of it automatically.

  • Save the exact question. Keep the wording that produced the answer you relied on, not a paraphrase of it.
  • Ask in a fresh chat for anything that matters. That removes earlier turns as a hidden input.
  • Keep the date of the answer. Models and tool instructions change, and the date tells a reader which version answered.
  • Rely on the citations, not the prose. A cited passage stays the same however many times the answer is regenerated.
  • Treat a changed answer as a prompt to read the file. Do not keep regenerating until an answer you like appears.
  • Ask the vendor how model changes are announced. And whether past answers record which model produced them.
  • Re-test after a model change. Run a few questions whose answers you already know from the file.

What a tool's own record of questions and answers should hold, and what Lucerna Law's matter export contains, is set out in the post on the AI audit trail. Tools that go further and take actions on their own, rather than answering one question at a time, add a further layer of variation, covered in the post on AI agents for lawyers.