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.)

1 / 1
Select all that apply
CorrectA, D

Explanation

A question about choosing TWO inference parameters that directly affect the randomness of output.

  • 1adjust the randomness (diversity) of a generative AI's outputThe target is parameters that change how candidates are selected = the handling of probability
  • 2directly affect the randomnessTemperature and Top-P (and Top-K) apply. Length, capacity, and stop are separate
ACorrect

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.

BIncorrect

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.

CIncorrect

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.

DCorrect

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.

EIncorrect

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.

Key Takeaway

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.