Does setting temperature to 0 stop an agent from hallucinating?
No. Temperature controls how the model samples among likely next tokens, not whether the token it’s most likely to produce is actually true. At temperature zero the model always takes its single highest-probability path through the answer, which removes most of the run-to-run variation that comes from sampling (a serving stack can still introduce a little more, see why the same prompt gives different answers), not the chance that path was wrong to begin with. If the model’s prior fills a gap in its sources with a fabricated fact, temperature zero just means it fabricates the same fact every time, confidently and reproducibly.
Determinism and groundedness are different properties: one is about whether repeated runs agree with each other, the other is about whether the answer agrees with the source it should have come from. A hallucination survives temperature zero because greedy decoding never checks the output against what the model was actually given. Catching it still means grading the answer against its sources, not making the model more predictable.