
Answer-first summary for fast verification
Answer: Both control creativity and can be tuned together for optimal output diversity
## Explanation **Correct Answer: A** - Both control creativity and can be tuned together for optimal output diversity **Why this is correct:** In Amazon Bedrock (and generally in language models), temperature and top-p (nucleus sampling) are both parameters that control the randomness and creativity of model outputs: 1. **Temperature**: Controls the randomness of predictions by scaling the logits before applying softmax. Higher temperature (e.g., 0.8-1.0) makes the output more diverse and creative, while lower temperature (e.g., 0.1-0.3) makes it more deterministic and focused. 2. **Top-p (Nucleus Sampling)**: Controls the cumulative probability threshold for token selection. The model considers only the smallest set of tokens whose cumulative probability exceeds the top-p value (e.g., 0.9 means considering tokens until their cumulative probability reaches 90%). **How they work together:** - These parameters can be tuned together to achieve optimal balance between creativity and coherence - Temperature affects the entire probability distribution, while top-p focuses on the high-probability tokens - Using them together allows fine-grained control over output diversity **Why other options are incorrect:** - **B**: Incorrect - Top-p does not affect latency only; it affects token selection and output diversity - **C**: Incorrect - Temperature doesn't control grammar, and top-p doesn't control sentence length - **D**: Incorrect - These parameters don't reduce vocabulary size; they control how tokens are selected from the existing vocabulary **Best Practice:** When using Amazon Bedrock models, experiment with different combinations of temperature and top-p values to achieve the desired balance between creativity and coherence for your specific use case.
Author: Ritesh Yadav
Ultimate access to all questions.
Which of the following statements correctly describes how temperature and top-p can be used together in Amazon Bedrock?
A
Both control creativity and can be tuned together for optimal output diversity
B
They control unrelated aspects — top-p affects latency only
C
Temperature controls grammar while top-p controls sentence length
D
Both reduce the model's vocabulary size
No comments yet.