Back to Developer Roadmap

Frequency Penalty

src/data/roadmaps/prompt-engineering/content/[email protected]

4.0363 B
Original Source

Frequency Penalty

Frequency penalty reduces token probability based on how frequently they've appeared in the text, with higher penalties for more frequent tokens. This prevents excessive repetition and encourages varied language use. The penalty scales with usage frequency, making overused words less likely to be selected again, improving content diversity.