Optimizing Your ChatGPT Experience: Key Parameters to Maximize Results

Optimizing Your ChatGPT Experience: Key Parameters to Maximize Results

ChatGPT is a powerful tool for generating high-quality text, and its advanced language processing capabilities are what make it so valuable. However, to truly harness the full potential of ChatGPT, it's important to understand and optimize its key parameters. In this article, we explore some of the parameters used to get meaningful results from ChatGPT and how to implement them effectively.



1. Length / word count

Set the word count, it makes your responses much cleaner. Bear in mind that you can only return 2048 tokens, or about 300–400 words per response. Anything longer may result in a response being cut off. Don't worry, just prompt "continue" and it should keep going (you may need to copy and paste the last sentence or two).

2. Temperature

Temperature is a measure of how hot or cold something is (not really, but let’s move on). In context, it’s a parameter that tells the AI to be more or less creative. Think spicy or bland, hot and steamy or ice cold.?

Prompt "increase temperature" if you want varied and creative responses. My preference when I’m making reading passages.

Prompt "decrease temperature" if you want clinical, matter-of-fact responses. I use this to get information, or when I want to get really fundamental definitions or examples.

Prompt "for this chat set temperature to x" to set a specific temperature between 0 and 1.

3. Frequency penalty

AI are trained using a system of rewards and penalties. This is a specific penalty that applies to repeating words.

Prompt "increase frequency penalty" to reduce monotony, or "decrease frequency penalty" to allow words to be repeated more often.

Prompt "for this chat set frequency penalty to x" to set a specific penalty between 0 and infinity.

I generally keep the penalty high (3 to 6) unless I'm working on definitions or trying to simplify the language.

4. Top-k

When trying to decide on the next word in a response, GPTs create a list of possible next words to choose from, with associated probabilities, and then randomly select one of those options as the next word.

Let's say the response is: "The quick brown fox ..."

Now the AI is looking at the word "fox" as the last word and trying to determine the next word. (really it uses a number of previous words as context). Assume the possible next words are: [jumps, runs, eats, smells, dances], with probabilities of [0.5, 0.2, 0.15, 0.1, 0.05] respectively.

Top-k is a way to select from or filter the list of possible next words, by telling GPT to select the first k number of words in the list.

Prompting "set k = 3", tells GPT to select the top 3 responses, so the above example would have [jumps, runs, eats] as the list of possible next words.

5. Top-p

Top-p is essentially a selection method for that list of possible next words. We set a value, p, between 0 and 1, and compare that value to the cumulative probabilities as we go down our list of possible words. GPT will stop adding words to the list when the threshold p is less than the cumulative probability of the next word in the list.

If we look at the previous example, and add up the cumulative probability as we go down the list, we get [jumps, runs, eats, smells, dances], with cumulative probabilities of [0.5, 0.7, 0.85, 0.95, 1] respectively.

Prompt "set p = 0.8" to create a list of [jumps, runs, smells] since smells has a cumulative probability of 0.85, we stop there.

Usually I'll set top-p only if I want to restrict the responses and top-k if I want to increase variation.

Try using the parameters above when writing your next prompt into ChatGPT; see the examples below if you're unsure on how to form your prompts or what words to use.

While Top-p is generally more flexible than Top-k, both play crucial roles in the diversity of responses.

Experiment with these parameters in your next ChatGPT prompt and see how they can help you get more meaningful and diverse responses!


Examples

Prompt:

write a passage about fishing, 100 words, p = 1, temperature = 0.9 , frequency penalty = 1

Response:

No alt text provided for this image

Prompt:

make a table of verbs, their past simple, and past continuous forms with one example sentence of past continuous. give 5 verbs, short sentences 15 words or less. p = 0.8, medium temperature, frequency penalty = 4

Response:

No alt text provided for this image

Prompt:

Make a table of verbs, their past simple, and past continuous forms with one example sentence of past continuous. give 5 verbs, short sentences 15 words or less.

k=10000, high temperature, frequency penalty = 12

Response:

No alt text provided for this image

Prompt:

Redo above, with lower k, lower frequency penalty

Response:

No alt text provided for this image


Additional Readings:


要查看或添加评论,请登录

社区洞察

其他会员也浏览了