Instructing GPT3 to generate short answers for chatbot


I have the following prompt for a chatbot:

This is a long, detailed, and entertaining conversation between person alpha and a Human about the weather. The answers of Human and person alpha are short. The conversation stops after 10 completions which is Human and person alpha talking. Continue from 1) all the way to 10

1 ) Human: Hello, how are you?
2 ) person alpha:

My problem is that the answers are often not that short. The instruction “The answers of Human and person alpha are short.” does not seem to have an effect.

Is there a better to way to instruct the chatbot not to generate that long answers?

Does it need to have a natural ending? Like, “So long”/“Goodbye”? Bc otherwise, you can just use “11)” as a stop token

I think there is a misunderstanding. The number of turns is not the problem. It stops after 10 turns, that is fine. The problem is that each turn is sometimes too long, i.e., it contains too many words / chars. So “2) person alpha: …” can get too long (too many words), “3) Human: …” can get too long and so on.

Ah, in that case, your best bet might be a one-shot or few-shot prompt, giving examples of sufficiently succinct sentences

I see. Is it not possible as part of the prompt without example? Perhaps the phrasing in my prompt was not perfect.

You could try being more specific than “short”, for instance, “one to two sentences”

1 Like

Have you tried limiting the max_tokens?





Defaults to 16

The maximum number of tokens to generate in the completion.

The token count of your prompt plus max_tokens cannot exceed the model’s context length. Most models have a context length of 2048 tokens (except for the newest models, which support 4096).