Why Does the Same Prompt Give Different Answers?
The interviewer asksA customer complains that asking the assistant the same question twice gives different answers. Why does that happen, and should we fix it?
Forward Deployed EngineerApplied AI PMFoundationsTechnical roundRepresentative5 min
On this page
The 30-second version
- The model picks each word from probabilities; sampling adds controlled randomness.
- Temperature sets how much: low is focused and repeatable, high is varied.
- Even at low temperature, outputs can differ slightly between runs.
- Whether to "fix" it depends on the task: facts and extraction need consistency; drafting benefits from variety.
- For consistency: low temperature, structured output, grounding in sources, and evals that re-run examples.
What it's really testing
- Understanding sampling
- Explaining it to a customer
- Matching settings to the task
How to structure your answer
- Explain why outputs vary.
- Ask what the customer is using it for.
- Recommend settings and design for that task.
- Say how you'd check it.
The interview, played out
- InterviewerA customer complains that asking the assistant the same question twice gives different answers. Why does that happen, and should we fix it?
- CandidateThe model writes one word at a time, choosing from a list of likely next words. A setting called temperature adds some randomness to that choice, so two runs can take slightly different paths.
- CandidateWhether that's a problem depends on the question. What were they asking?
- Revealed when askedQuestions about their contract terms. Two answers gave different notice periods.
- Strong moveAsks about the task before deciding it's a bug.
- CandidateThen it is a problem: facts should be the same every time. I'd lower the temperature and, more importantly, make the answer quote the contract clause it comes from, so it's grounded in the document rather than generated freely.
- InterviewerSo temperature 0 solves it?
- CandidateMostly, yes.
- Missed signalTemperature 0 reduces variation but doesn't guarantee identical outputs; grounding matters more.
- CandidateI'd also add an eval that asks each contract question several times and checks the answers agree with the clause.
The strong answer, distilled
- Why: words are sampled from probabilities; temperature controls how much randomness.
- Depends on the task: facts must be consistent; drafting can vary.
- For facts: low temperature, answers quoted from the source document, structured output.
- Honest caveat: low temperature reduces but doesn't remove variation; grounding is the real fix.
- Check: an eval that repeats each question and compares answers against the source.
This is one strong answer, not the only one.
How it's scored
| Dimension | Weak (2) | Passable (3) | Strong (5) |
|---|---|---|---|
| Mechanism | "It's random" | Temperature named | Sampling explained simply |
| Judgment | Always fix it | Fix it for facts | Matches consistency to the task |
| Fix | Temperature 0 | Temperature plus prompt | Grounding, low temperature and a repeat-run eval |
Round scorecard: Applied AI PM: technical round, filled in for the mock candidate
| Dimension | Weak | Passable | Strong | The mock candidate |
|---|---|---|---|---|
| Accuracy | Explains the mechanism wrongly. | Correct in outline. | Correct, and precise about what the model does and doesn't do. | Strong. Correct on sampling and temperature. |
| Clarity | Jargon, or no structure. | Clear to a technical listener. | Clear to anyone, with a concrete example. | Strong. Clear for a non-technical customer. |
| Depth | Surface only. | Answers follow-ups. | Goes a level deeper unprompted where it matters. | Passable. Forgot that even temperature 0 can vary. |
| Product judgment | Stops at the explanation. | Mentions fixes. | Turns the explanation into product and engineering choices. | Strong. Separated tasks needing consistency from those that benefit from variety. |
How the answer changes by role
| Role | What to emphasise |
|---|---|
| Forward Deployed EngineerForward Deployed Engineer. An engineer embedded with customers who scopes, builds and ships AI solutions into production. Read the full explanation | Explaining to the customer and grounding answers in their documents |
| Applied AI PMProduct Manager. Decides what a product should do, for whom, and why. Read the full explanation | Which product surfaces need consistency and how to measure it |
Common mistakes
- Promising identical outputs at temperature 0
- Treating all variation as a bug
- Fixing settings without grounding
More follow-ups to practise
- "The customer wants creative marketing copy to vary. Same settings?" Hint: no: higher temperature, and that's fine.
- "How would you test consistency?" Hint: re-run each question several times and compare.
Go deeper
- Module: How LLMs work
- Framework: Explain a Concept Framework
- Framework: Opening Any Interview Answer
- Lesson: Sampling and temperature
- Lesson: Next-token prediction, and why models make things up
- Also tests: Evals foundations
- Also tests: Prompting and context engineering
Sources
Representative question: written to match technical rounds for AI product roles, not a specific reported interview.