Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 2.17 KB

best-temperature-settings-for-coding-tasks.md

File metadata and controls

28 lines (17 loc) · 2.17 KB

2024-03-20 - TIL - Best Temperature and Top_p Settings for Coding Tasks

Best Temperature and Top_p settings for coding tasks.

Temperature and Top_p Settings Cheatsheet

Use Case Temperature Top_p Description
Code Generation 0.2 0.1 Generates code that adheres to established patterns and conventions. Output is more deterministic and focused. Useful for generating syntactically correct code.
Creative Writing 0.7 0.8 Generates creative and diverse text for storytelling. Output is more exploratory and less constrained by patterns.
Chatbot Responses 0.5 0.5 Generates conversational responses that balance coherence and diversity. Output is more natural and engaging.
Code Comment Generation 0.3 0.2 Generates code comments that are more likely to be concise and relevant. Output is more deterministic and adheres to conventions.
Data Analysis Scripting 0.2 0.1 Generates data analysis scripts that are more likely to be correct and efficient. Output is more deterministic and focused.
Exploratory Code Writing 0.6 0.7 Generates code that explores alternative solutions and creative approaches. Output is less constrained by established patterns.

Use Cases

  • Quick reference/cheatsheet for the best Temperature and Top_p settings for coding or similar tasks

References