
Answer-first summary for fast verification
Answer: Enable repetition penalty with frequency = 1.5
## Explanation **Correct Answer: B - Enable repetition penalty with frequency = 1.5** **Why this is correct:** - **Repetition penalty** is specifically designed to reduce repetitive phrasing in LLM outputs - Setting frequency = 1.5 applies a penalty to tokens that have already appeared, making them less likely to be repeated - This directly addresses the problem of "repeating phrases too frequently" while maintaining the overall tone and creativity **Why other options are incorrect:** **A. Reduce temperature to 0.1** - Lowering temperature makes outputs more deterministic and less creative, which could actually increase repetition as the model becomes more predictable. This doesn't specifically target repetition reduction. **C. Lower top-k to 20** - Reducing top-k limits the vocabulary diversity by only considering the top 20 most likely tokens. While this might reduce some randomness, it doesn't specifically address repetition and could limit creativity. **D. Disable top-p entirely** - Top-p (nucleus sampling) helps with diverse outputs by sampling from tokens whose cumulative probability exceeds p. Disabling it would make outputs more deterministic and could actually increase repetition. **Key Concepts:** - **Repetition penalty**: A parameter that penalizes tokens that have already appeared in the generated text - **Frequency penalty**: A specific type of repetition penalty that penalizes tokens based on how frequently they've appeared - **Creativity vs. Repetition**: The challenge is to reduce repetition while maintaining creative tone - repetition penalty specifically targets this balance
Author: Ritesh Yadav
Ultimate access to all questions.
An LLM that writes product descriptions is repeating phrases too frequently. The company wants to keep the tone and creativity but reduce repetitive wording. Which adjustment is most appropriate?
A
Reduce temperature to 0.1
B
Enable repetition penalty with frequency = 1.5
C
Lower top-k to 20
D
Disable top-p entirely
No comments yet.