Parameters: The Secret Power To Have More Control of ChatGPT

Roberto Morais
5 min readJun 7, 2023

ChatGPT parameters are easily one of its most overlooked features. People have no idea what they are missing out.

By incorporating parameters into your interactions, you can shape and control the AI’s output, accessing a new level of customization. From adjusting response length to fine-tuning creativity or defining a user persona, parameters tailor ChatGPT to suit your unique requirements.

We will go through the 5 most impactful parameters and also teach you how to create your own.

The Secret Power of ChatGPT

What are Parameters?

Parameters are programmable variables. It lets you change standard characteristics and behaviors that tell ChatGPT (and other models) how their output should be generated.

It was designed for the API and wasn't supposed to be compatible with ChatGPT. But thanks to how ChatGPT works and its knowledge of them, these parameters have extended their utility directly to the chat interface. Even if they are less exact than using the API, they are very powerful.

You can use it by simply telling it to:

use a temperature parameter of 0.9.

Or simulating coding variables:

temperature: 0.9

The 5 Must-Known Parameters

Let’s discuss the heavy hitters — the five parameters that will change your ChatGPT control and experience for the better.

Max Tokens

It is your content’s length control. Depending on how you set it, it can give you a one-liner or a whole novel.

You pass the maximum length of the text to be generated. It accepts any number up to the maximum number of Tokens, currently 4096. The default value is 2048. To simplify, you can think of tokens as words.

As an experiment, try asking ChatGPT to summarize a movie plot twice, with high and low ‘Max Tokens’ values, respectively. Notice the variance.

Summarizing a movie with different max tokens values.

Temperature

Controls the randomness and creativity of the generated text. When the values are low, the outputs are more orthodox, while when the values are high, the text is more varied and creative, sometimes even eccentric.

It defaults to 0.7 and accepts values between 0 and 1.

As a simple experiment, try asking it for a list of names with different temperatures:

Completely different results.

Frequency Penalty

The Frequency Penalty parameter penalizes repetition; higher numbers make the output diverse, promoting rarer words, while negative values get a more common, sometimes repetitive, language.

It ranges between -2.0 and 2.0, defaulting at 0.

For the experiment, ask ChatGPT to write any repeated text like, “I like to eat apples.” a few times. With a higher frequency penalty, the model will seek more varied ways to express the same thought.

So good. I don't know why, but I couldn't stop laughing at the results.

Presence Penalty

Has chatGPT ever gotten too attached to an example or inspiration in your prompt that it completely skewed the results?

This happens to me more often than not, I once used it to help me with the outline of an article, and on my prompt, I had a quote that mentioned a butterfly. What did ChatGPT do? An outline all about butterflies. Useless.

The Presence penalty param solves this problem.

It gives a penalty to tokens that have been used in the input. This affects how often the AI repeats words and phrases from your input. It also ranges from -2 to 2, defaulting to 0. Positive values discourage repetition, while negative values may result in echoing input text.

To test it, I asked chatGPT to correct my grammar and passed a simple phrase. You can see how it avoids repeating my input with a higher value of presence penalty.

An experiment with presence penalty.

User Attributes

User attributes allow you to provide additional information (using a list of key-value pairs) about the current user, making ChatGPT tailor the generated text to the profile set.

It has diverse applications. You can set the user language, and ChatGPT will answer using it doesn't matter the language you prompt, or you can define complete personas, and it will completely customize its response to them.

Very powerful.

In the example below, I ask ChatGPT about the sun, set the user attribute to different ages, and even pass a profession. See how impactful it is:

A use case of the user attributes params

Custom Parameters: Creative Freedom

Until now, we have been using the parameters defined in OpenAI API, which is great. But as I mentioned, the params are not enforced via chat; they work because ChatGPT understands them.

What does it mean?

It means we can create our own parameters. You can use both numeric and text parameters. If it's clear enough or you explain it, ChatGPT will acknowledge them and change its behavior.

Let's see a few examples.

Genre Parameter: This would guide the AI’s style of writing. For instance, Genre: "Pirates" instruct the AI to generate content in a Piracy setting.

Sarcasm: 1 will push the AI to give you a sarcastic response. This can be used with different characteristics like humor, technical accuracy, formality, etc.

Vivid: 1 (and 0.2): It drastically changes the details of descriptions and is a powerful tool for writers using ChatGPT.

You can be as creative as you want and even add several custom parameters when it makes sense.

Parameters aren’t just another technical feature of ChatGPT.

They’re a magical controller, fine-tuning your interactions with ChatGPT from good to mind-blowingly useful. The key is to experiment, learn, and have fun along the way.

Don’t just take my word for it. Go ahead, experiment with it. Try different parameters, mix and match, and create your own.

Want more free content like this? Subscribe to my Newsletter.

--

--

Roberto Morais

CTO, writer, creator, and entrepreneur. Writing on how to leverage AI for faster businesses. 👨🏽‍💻 Exclusive content for free on: http://thesidepreneur.com/