Site icon DataForSEO

What is the difference between creativity parameters in Content Generation API?

Determining the text’s creativity level is a crucial part of content generation. It allows you to customize the article depending on the purpose, making it easier or harder to read. In DataForSEO Content Generation API we use several parameters at once so that you can define the task as accurately as possible.

At first glance it is difficult to understand how they differ from each other, so let’s look at them in comparison.

1creativity_index – the randomness of the selection of equally probable subsequent tokens. Let’s imagine there are three words with the same probability of 33% becoming the next token. If creativity_index is set to 0, the model will choose the next token randomly. However, if it is set to 1 this will eliminate the randomness and the text will contain more unusual phrases.
2temperature – controls the randomness of the output. Sounds pretty similar to the previous one, but the difference is that here we are dealing with the selection of only one word. For example, there are 3 words with the probability of 5%, 10%, and 15% being the next token. The model will choose the highest probable word if the temperature is low.
3top_k – the number of initial tokens in each iteration that will be used for choosing a subsequent word. Setting the parameter to 40 will determine that every next token will be chosen from 40 possible values. The higher the number, the more high-probability tokens will be shortlisted for a generation.
4top_p – excludes initial tokens with a probability lower than one. If it is set to 1, the model will ignore low-probability tokens.

Note that:
1. You can use top_k, top_p and temperature simultaneously. creativity_index can only be set apart from other parameters.
2. If both top_k and top_p are used, top_k acts first.

Exit mobile version