Microsoft Certified: Azure AI Engineer AssociateImplement generative AI solutionsEasy
A developer is using Azure OpenAI Service for a creative writing application. They want the model to generate highly imaginative and unexpected narratives, even if it occasionally produces less coherent or factually grounded text. Which parameter adjustment would best achieve this goal?
- AIncrease the 'temperature' to 1.0 or higher.
- BDecrease the 'temperature' to 0.1.
- CSet 'top_p' to 0.05.
- DIncrease the 'presence_penalty' to 2.0.
Show answer & explanationAnswer & explanation
Correct answer: A. Increase the 'temperature' to 1.0 or higher.
Increasing the 'temperature' parameter makes the model's output more random and creative by increasing the probability of less likely tokens, leading to more imaginative and unexpected narratives.
Why the other options are wrong
- B. Decreasing temperature makes the output more deterministic and less creative.
- C. Setting top_p to a low value (0.05) makes the output more focused and less diverse, similar to a low temperature.
- D. Increasing presence_penalty reduces repetition, but doesn't necessarily increase overall creativity or unexpectedness.
Temperature (Azure OpenAI)
A parameter that controls the randomness of the output generated by the model. Higher values make the output more creative and diverse.
- Ranges from 0 to 2.
- Lower values (e.g., 0.2) make output more deterministic and focused.
- Higher values (e.g., 0.8-1.0+) make output more diverse, creative, and unpredictable.
Memory trick: Turn Up the Temp for Creative Sparks: Higher 'temperature' ignites 'creative' ideas.