Using OpenAI's Model Playground
Code Playground is only enabled on larger screen sizes.
Navigate to the model details page and click the Try in Playground button.
This is where we can test the model before integrating it into our app.
Configs for GPT-5
Let's start with GPT-5 series models, here are some of the parameters you can configure for these LLMs.
Text format controls the format of the model output. You can choose between plain text, JSON, or JSON schema, which is JSON outout that follows a specific schema. This provides a consistent API for your app.
Reasoning effort determines how much "thinking" is involved when the model is giving a response. Lowering the reasoning effort will give a faster response, and reduce the token cost.
Verbosity controls how detailed you want the response to be. Lowering the verbosity will shorten the response length.
Configs for GPT-4 and older models
For GPT-4 and older models, OpenAI offers a more technical set of control parameters.
Temperature can be set between 0 and 2, which controls the randomness of the model response.
Low temperature, 0.1 to 0.3, produces minimal variation, and responses will follow the same structure and same logic. This is most suited for technical writing and code generation.
Medium temperature, 0.4 to 0.7, produces more diverse results. This is more suited for marketing content and teaching materials.
High temperature, 0.8 to 1, gives the most creative content, most suited for fictional novels, poetry, and other creative content.
It is not recommended to set temperature to higher than 1, or the model will produce unpredictable results like this:
Top P controls word diversity. When generating a sentence, instead of directly outputting the next word, it goes though a selection process.
The model will will give a set of possible next word, with different probability.
For example, when the model is trying to generate the sentence The cat is sitting on the ___, it will have a few options for the final word, and each option will have a different probability:
| Word | Probability |
|---|---|
| mat | 0.25 |
| floor | 0.20 |
| sofa | 0.15 |
| table | 0.10 |
| chair | 0.08 |
These possible words will then be sorted from the most probable to the least probable, and then added up one by one, until it reaches a probability threshold.
For example, if you set the threshold to 0.7, the model will consider only mat, floor, sofa, and table, and then stop there.
mat(0.25) + floor(0.20) + sofa(0.15) + table(0.1) = 0.7And the model will randomly choose between these four options, weighted by their probabilities.
This means that higher top P will give more diverse options, and sometimes it will give rare outputs with lower probabilities.
Lower top P, on the other hand, makes sure the model only considers words with relatively higher probabilities, and give less variants.
As you can see, top P is not the same as temperature in terms of technical details, however, as end users, they feel very similar.
This is why, in practice, most developers only set either temperature or top p, and leave the other as default.
Max tokens is the maximum number of tokens of the user prompt and the model response combined.
Store logs determine if the logs will be stored on the OpenAI Platform, which are available for later retrieval.
import "./styles.css"; document.getElementById("app").innerHTML = ` <h1>Hello world</h1> `;




