Best Temperature and Top_p settings for coding tasks.
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. |
- Quick reference/cheatsheet for the best Temperature and Top_p settings for coding or similar tasks
- Cheat Sheet: Mastering Temperature and Top_p in ChatGPT API - API - OpenAI Developer Forum
- Best Temperature for Gpt-4 api to get quality coding advice and samples? : r/ChatGPTCoding
- Reddit - https://preview.redd.it/best-temperature-for-gpt-4-api-to-get-quality-coding-advice-v0-nilygh8v480c1.png?width=886&format=png&auto=webp&s=955c96cc8089bbc0b1e30cb16d0f7ce0f480f406