Temperature
Correct. Temperature changes the sharpness of the probability distribution and directly adjusts the randomness (diversity) of the output. Lowering it makes output more consistent, and raising it makes output more diverse.
An AI practitioner wants to adjust the randomness (diversity) of a generative AI's output to fit the use case. Among the inference parameters, which two directly affect the randomness of the output? (Choose TWO.)
A question about choosing TWO inference parameters that directly affect the randomness of output.
Temperature
Correct. Temperature changes the sharpness of the probability distribution and directly adjusts the randomness (diversity) of the output. Lowering it makes output more consistent, and raising it makes output more diverse.
Maximum tokens
Maximum tokens is a parameter that sets the upper limit on output length.
It only limits length and does not change the randomness (diversity) of the output, so this is incorrect.
Context window
The context window is a factor related to the upper limit on the amount of input that can be passed at once.
It is a matter of input capacity and does not change the randomness of the output, so this is incorrect.
Top-P
Correct. Top-P is a parameter that narrows the candidates to those whose cumulative probability reaches a specified ratio before selecting from them. Changing how it narrows directly affects the randomness (diversity) of the output.
Stop sequences
A stop sequence is a setting that cuts off generation when a specified string appears.
It only decides where to stop and does not change the randomness of the output, so this is incorrect.
What directly moves the randomness of output is the parameters that act on "how candidates are selected".
- Temperature: changes the sharpness of the probability distribution (↓ consistent / ↑ diverse).
- Top-P / Top-K: narrow the candidates by cumulative probability or count.
In contrast, maximum tokens (length), the context window (input capacity), and stop sequences (cutoff) only control the amount or range of output and do not change randomness.