Should you change temperature and top-p at the same time?
Usually adjust one and leave the other at its default. Both reshape the randomness of the choice, so changing both makes it hard to tell which caused a difference and can overshoot, giving output that is either too rigid or too erratic.
Explain it simply
Think of a car with both an accelerator and a second pedal that also adds speed. If you press both and the car feels too fast, you will not know which one to ease off.
Temperature stretches or squeezes the whole probability curve. Top-p cuts off the tail. They overlap in effect: both control how adventurous the choice is. Changing both at once makes experiments muddy.
A tidy method is to fix top-p at its default, vary temperature across a few values, and evaluate outputs on a fixed set of test prompts. If you need to remove rare nonsense tokens at a high temperature, add a moderate top-p afterwards. Some provider guides explicitly recommend altering only one of them, so read the documentation of the one you use.
Example
Experiment plan
Round 1: top-p fixed, temperature = 0.2, 0.7, 1.0 -> compare on 20 prompts
Round 2: pick best temperature, then try top-p = 0.8, 0.95What to say in the interview
"Both parameters control randomness in overlapping ways, so I change one at a time against a fixed evaluation set. Typically temperature first, then top-p only if I see tail errors."