PassDrill Free practice questions with explanations that actually teach.

AI-ENGINEERING · prompting · Q004 · easy

In LLM inference APIs such as Anthropic's Messages API and OpenAI's Chat Completions API, what effect does lowering the `temperature` sampling parameter toward 0 have on generated text?

  1. It sharpens the probability distribution over next tokens so the model more consistently picks the highest-probability token, producing more deterministic, less varied output
  2. It reduces the model's context window, so fewer previous tokens are considered when generating each new token
  3. It increases the number of tokens the model is allowed to generate in a single response
  4. It disables sampling entirely and forces the model to retrieve an exact quote from its training data