AIF-C01 Question 108
Single answerYou are deploying a natural language processing (NLP) model on Amazon SageMaker to generate creative story prompts for writers. During testing, you notice that the generated prompts are either repetitive or lack creativity. Which inference parameter should you adjust to encourage more diverse and creative outputs?
- A
Increase the temperature value
- B
Decrease the temperature value
- C
Reduce the maximum input length
- D
Set the output length to a fixed value
Show answer and explanation
Correct answer: A
Explanation
Temperature is a key inference parameter in text generation models. It controls the randomness of the output by scaling the probability distribution of possible next words. A higher temperature encourages the model to explore less likely words, resulting in more creative and diverse outputs. In this scenario, increasing the temperature value is the best approach to address the observed lack of creativity.
- A. Correct.
Increasing the temperature value makes the model's output more random and diverse, which can encourage creativity. A higher temperature allows the model to explore less probable outputs.
- B. Incorrect.
Decreasing the temperature value makes the outputs more deterministic and focused on the most probable results, which is not ideal for encouraging creativity or diversity.
- C. Incorrect.
Reducing the maximum input length might truncate important context for the model, but it does not directly relate to the diversity or creativity of the output.
- D. Incorrect.
Setting the output length to a fixed value can control the length of the response but does not influence the diversity or creativity of the generated text.