Is it normal for ChatGPT to give different answers to the same question?

I've been using ChatGPT for a few months now, mostly for work stuff. Today I asked it the exact same coding question I asked it last week, and got a totally different answer. Both seemed reasonable but they contradicted each other. Am I doing something wrong with my prompts, or does the AI just change its responses randomly?

3 answers

★ Best answer

When I've run the same prompt twice, I've definitely noticed it pulls different phrasings and sometimes takes different approaches, so you're not messing anything up. One thing those answers don't really drill into: if you're asking about code specifically, ChatGPT might legitimately prefer different algorithmic approaches depending on the context it's "thinking through" that session, not just randomness - so you could get a recursive solution one time and an iterative one the next, both totally valid for the same problem.

That's totally normal - ChatGPT has a temperature setting that introduces randomness into responses, plus the model itself can generate different valid solutions to the same problem, so you're not doing anything wrong. If you need consistency for critical work stuff, you can lower the temperature setting or ask it to explain its reasoning step-by-step, which tends to produce more stable answers.

The variation you're seeing is real, and it's partly because ChatGPT uses temperature settings (which control how "creative" vs. "safe" responses are) and partly because many problems have multiple valid solutions. But here's something worth knowing: if you're getting contradictory answers for something that should have one right answer - like a specific syntax rule or how to use a particular library - that's a sign you should verify the output against official documentation rather than trusting it as gospel, especially for work code. The model can sound confident while being wrong.

Your answer

Log into answer.