Run the same prompt twice, and you may get two different answers. Does that mean one of them is a hallucination? Not necessarily. Two answers can say the same thing in different words. And a model can give the same wrong answer twice.

So what makes the answers vary?

One prompt, several plausible continuations

Try this prompt: “Give me a title for a beginner’s guide to C#.” 
One answer might be “Getting Started with C#.” 
Another might be “Your First Steps in C#.” Both do the job.

A language model generates text one token at a time. At each step, it assigns probabilities to possible next tokens. When the model samples from that distribution, it can take a different path from the same starting point. An early choice changes the context for everything that follows.

What temperature and top_p actually do

- temperature changes how strongly the model favors likely tokens. A lower temperature concentrates the distribution on the most likely choices. A higher temperature makes less likely choices more competitive.

- top_p sets a cutoff based on cumulative probability. Imagine four candidate tokens with probabilities of 55%, 30%, 10%, and 5%. With top_p set to 0.80, the first two are enough: together they account for 85%. At 0.90, the third token joins the set because the first two no longer reach the cutoff. This is an illustration, not a measurement from the C# prompt.

If you’re experimenting with a model that supports both settings, try changing one at a time so you can see what each one does. Support depends on the model and its settings. For example, OpenAI still lists both fields in the Responses API reference, but its GPT‑6.2 migration guide says to omit them when using GPT‑6.2 Astra or Sol.

What about hallucinations?

Now try a different prompt: “What’s the deadline for submitting this expense claim?” If you haven’t given the model the policy or a way to look it up, it might confidently give you a deadline anyway. Even if it repeats “30 days” every time, that doesn’t tell you whether the actual policy says 30 days.

So here’s my rule of thumb: 
For brainstorming, judge whether the AI gives you a useful range of ideas. 
For facts, numbers, or policies, give it a reliable source, ask it to point to the passage that supports the answer, and check that passage yourself. 
If the source doesn’t answer the question, have the model say so.