
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
A creative writing assistant generates responses that are too repetitive and lack variation. Which adjustment helps improve diversity without causing loss of coherence?
A
Increase temperature from 0.7 → 1.0
B
Lower top-k to 20
C
Reduce temperature to 0.2
D
Enable repetition penalty (frequency_penalty = 1.0)
Explanation:
Correct Answer: A - Increase temperature from 0.7 → 1.0
Why this is correct:
Temperature parameter controls the randomness of the model's output:
Lower temperature (e.g., 0.2) makes the model more deterministic and focused on the most likely tokens
Higher temperature (e.g., 1.0) increases randomness and diversity in the output
Increasing temperature from 0.7 to 1.0 introduces more variation in the generated text while maintaining reasonable coherence. This is the most direct way to address repetitive outputs.
Why other options are incorrect:
B. Lower top-k to 20 - This would actually make the output MORE repetitive, not less. Top-k sampling limits the model to consider only the top k most likely tokens. Lowering top-k reduces the pool of possible tokens, making the output more predictable and less diverse.
C. Reduce temperature to 0.2 - This would make the output even MORE repetitive. Lower temperature values make the model more deterministic, always choosing the most likely next token, which leads to highly repetitive outputs.
D. Enable repetition penalty (frequency_penalty = 1.0) - While repetition penalty can help reduce exact repetition of phrases, it's not the primary solution for improving overall diversity. Frequency penalty discourages repeated tokens but doesn't necessarily increase creative variation in the same way that temperature adjustment does.
Key Concept:
Temperature is the primary parameter for balancing coherence and creativity in language models. Higher values (closer to 1.0) increase diversity, while lower values (closer to 0) increase predictability and coherence. For creative writing tasks, a temperature around 0.7-1.0 is typically optimal.