AI & prompting

Why Does ChatGPT Give Different Answers to the Same Question?

ChatGPT and other AI chatbots give different answers to the same question because they choose each word by weighted chance from a list of likely candidates, rather than looking up a stored answer. On top of that, the input is rarely truly identical (your earlier messages, hidden instructions and the model version all change), and even with randomness turned down, the servers running the model can introduce small differences that grow into different text.

None of this means something is broken. It does mean a single answer is one sample, and that difference is useful once you know how to read it.

Reason 1: the model samples each word

A language model generates text one token (a word or word fragment) at a time. At each step it scores every possible next token, turns the scores into probabilities, and picks one. If "Paris" has a 97% chance and everything else shares 3%, you'll almost always get "Paris". But for open questions, such as "suggest a name for my bakery" or "explain recursion", many continuations are about equally likely, and each pick changes everything that follows.

The setting that controls how adventurous these picks are is temperature. Google's Gemini docs describe it as controlling "the degree of randomness in token selection". Chat apps don't let you change it, and the defaults are not zero. Anthropic's API documentation, for example, says requests sample with a default temperature of 1.0, and as of October 2026 its newest API version rejects requests that try to change it at all. Temperature and top-p explained works through the arithmetic with real numbers.

A small worked example of why this compounds: suppose that at each of five points where the wording could branch, the model picks its top choice 90% of the time. The chance that one answer takes the top choice at all five points is 0.95 ≈ 59%, and the chance that two answers in a row both do is 0.592 ≈ 35%. Over a long answer with dozens of branch points, getting the identical text twice becomes unlikely, even when every individual choice is fairly predictable.

Reason 2: your input is not actually the same

When you ask a question in a chat, the model doesn't see just that question. It sees:

  • Everything earlier in the conversation. Asking the same thing as your tenth message is a different prompt from asking it as your first. If you repeat a question in the same chat, the earlier answer is now part of the input, and the repetition itself suggests you weren't satisfied. See what a context window is for how this history is carried along.
  • A system prompt you don't see. Apps add their own instructions at the start of every conversation. Anthropic publishes the one used on claude.ai and says it provides "up-to-date information, such as the current date" and is "periodically updated". So the same question on a different day can come with slightly different hidden instructions, if only because the date changed. System prompt vs user prompt explains how the two interact.
  • Personal settings. If your chat app has memory, custom instructions or personalization switched on, saved details about you are added to the input too, so your answer can differ from a friend's for the same question.
  • Search results. When a chatbot searches the web before answering, the results it reads depend on the day and on the search. Whether it searches at all can vary too: Anthropic's web search documentation says Claude "determines when to search based on the prompt".

Reason 3: the model itself changes

The name in the app ("ChatGPT", "Claude", "Gemini") is a product, not one fixed model. Providers release new versions and switch the app over, and a newer model can answer the same question differently in style and sometimes in substance. Developers using an API can avoid this by naming a fixed version: Anthropic's models overview says every Claude model ID "is a pinned snapshot". The chat apps don't give you that guarantee.

Reason 4: even temperature 0 isn't fully deterministic

Temperature 0 means "always take the most likely token", so in theory the output should be identical every time. Google's docs state that "a temperature of 0 is deterministic". In practice, hosted models often still vary, and in September 2025 researchers at Thinking Machines Lab published a detailed explanation of why.

Their finding: the common explanation (floating-point rounding plus parallel GPU threads finishing in random order) is incomplete. The main cause is that the numerical result for your request depends slightly on how many other requests the server is processing alongside it, the batch size, and "the load (and thus batch-size) nondeterministically varies". A tiny rounding difference can flip which token is "most likely" when two are nearly tied, and after one different token, the rest of the answer diverges.

Their measurements make it concrete. They sent the prompt "Tell me about Richard Feynman" to Qwen3-235B-A22B-Instruct-2507 1,000 times at temperature 0, each 1,000 tokens long:

SetupUnique completions out of 1,000Notes
Standard inference server80All identical for the first 102 tokens; at token 103, 992 said "Queens, New York" and 8 said "New York City".
Batch-invariant kernels1Every completion identical, at a speed cost (26 s for their benchmark became 42 s with their optimised version).

So determinism is possible, but it costs speed, and you can't assume a hosted chat service runs that way.

When different answers are a warning sign

For creative tasks, variation is the point. For factual questions, it is a signal. The SelfCheckGPT paper (Manakul, Liusie and Gales, 2023) builds a hallucination detector on this idea: "if an LLM has knowledge of a given concept, sampled responses are likely to be similar and contain consistent facts". When the model is guessing, separate samples tend to contradict each other.

You can use the same trick by hand. Regenerate the answer two or three times, or ask in a fresh chat. If the date, number or name stays the same, that's mild reassurance. If it changes, treat it as unknown and check a primary source. Why AI hallucinates covers what to do next. Consistency is not proof, though: a model can repeat the same wrong fact confidently if it learned it wrong, or if it simply doesn't know about recent events (see what a knowledge cutoff is).

How to get more consistent answers

In a chat app

  • Start a new chat for each independent question, so earlier messages don't steer the answer.
  • Constrain the output. "Answer in one sentence", "give a table with columns X, Y, Z" or "reply only yes or no, then one reason" leaves fewer places for wording to branch.
  • Provide the facts. Paste the document, numbers or rules you want used. A model working from text you supplied varies far less than one recalling from memory.
  • Keep a prompt that works. Reuse the exact wording rather than retyping it from memory.

Through an API

  • Pin the model version instead of using a moving alias, so an upgrade doesn't change behaviour silently.
  • Use structured output (a JSON schema) when the result feeds into code; the shape stays fixed even if the wording varies.
  • Lower temperature where it is still accepted. Many hosted models now ignore or reject it, so check the current API reference.
  • Run a local model with a fixed seed if you need repeatable text. Ollama documents a seed parameter and says setting it "will make the model generate the same text for the same prompt".

Frequently asked questions

Does regenerating an answer give a better one?
Not necessarily better, just another sample from the same probabilities. Regenerating is useful for creative work, where you want options, and as a quick check on factual answers: if several regenerations disagree on a fact, treat that fact as unreliable and verify it elsewhere.
Is the AI learning from me when its answers change?
Not in the moment. The model's weights do not change between your messages. Answers shift because the input changed (your earlier messages, any memory or personalization features the app offers, a new system prompt) or because the provider switched to a newer model version.
Can I make ChatGPT give the same answer every time?
Not fully in the chat app. You can make answers more consistent by starting a new chat, giving the exact format you want, and including the facts it should use. Through an API you can pin a model version and, where the API still accepts it, lower the temperature. Byte-identical output generally needs a local model with a fixed seed.
Why did the AI give a different answer to the same question in the same chat?
The second time, the earlier question and answer are part of the input, so the model is answering a different prompt. Repeating a question can also read as a signal that the first answer was wrong, which pushes the model toward changing it.

Sources