[ad_1]
ChatGPT, Generative AI
A focus on configuring the temperature, the Top P, the frequency penalty, and the presence penalty directly in your ChatGPT prompts
I’ve recently been reading a very interesting book by David Clinton, entitled The Complete Obsolete Guide to Generative AI, published by Manning Publications. In the second chapter, the author describes what the main parameters of an AI model are and how to configure them to adapt to their needs. The configuration parameters include temperature, Top P value, frequency penalty, and presence penalty.
Configuring these parameters could help ChatGPT understand the type of output you want to produce. For example, you could set some parameters if you want ChatGPT to generate a more deterministic output (strictly related to the input). Instead, if you want ChatGPT to be more creative while generating the output, you could set other parameters.
To understand how the output type works, David Clinton gives an example related to weather in his book. A more deterministic output could be: Today, it’s sunny, and the temperature is 30°C. A more creative output could be: Today, it’s sunny, and you may have a walk.
Driven by the descriptions I found in the book, I tried to implement some examples myself to see how to apply what was written in the book in a practical case. I hope you, too, can benefit from this article.
For those familiar with the OpenAI API, the configuration parameters can be passed directly as arguments in the API functions. Instead, using them in the ChatGPT web interface is not immediate. In this article, I’ll show you how to include these parameters directly in the ChatGPT prompt.
To do practical tests, we will use an imaginary scenario and the free version of ChatGPT, which you can find at this link. I remind you that before using ChatGPT, you must create an account and read the platform’s usage policies.
In this article, we’ll cover:
- Scenario Setup
- Temperature
- Top P value
[ad_2]
Source link