A developer uses Azure OpenAI to generate product descriptions. The outputs often repeat the same phrases multiple times within a single description. Which parameter should the developer increase to reduce this repetition?
Correct. Increasing the frequency penalty discourages the model from repeating the same tokens, reducing repetition.
Why this answer
The frequency penalty parameter reduces repetition by penalizing tokens that have already appeared in the generated text. Increasing this value discourages the model from reusing the same phrases, making the output more diverse and less repetitive.
Exam trap
The trap here is that candidates confuse frequency penalty with presence penalty, thinking both reduce repetition equally, but frequency penalty specifically targets how often a token appears, while presence penalty only cares if it has appeared at all.
How to eliminate wrong answers
Option A is wrong because temperature controls randomness in token selection, not repetition; higher temperature increases creativity but does not prevent phrase repetition. Option C is wrong because presence penalty penalizes tokens based on whether they have appeared at all, not how often, so it reduces topic repetition but not multiple occurrences of the same phrase. Option D is wrong because max tokens limits the total length of the output, not the repetition of phrases within it.