How to get single completion with prompt

Let’s say I have a prompt that looks like this

Prompt: “some example input 1”
Output: “some example output 1”
Prompt: “some example input 2”
Output: “some example output 2”
Prompt: “some example input 3”
Output:

What i’m hoping GPT-3 will do is just complete the third output, but instead, it goes on to start writing the next Prompt.

Is there a clean way of getting it to just write the output or I have get creative with how I’m parsing the outputs to detect just the first output and ignore everything thereafter?

1 Like

Sure, just use \n (new line) as a stop! Should be all you need

I’m sorry, i’m new to this. Can you show me how you would do that newline piece? My problem is it’s doing this.

Prompt: “some example input 1”
Output: “some example output 1”
Prompt: “some example input 2”
Output: “some example output 2”
Prompt: “some example input 3”
Output: “gpt-generated output 3”
Prompt: “gpt-generated prompt 4” <========= my problem is this entire line is being written by GPT-3 and I don’t want it.

How would you modify the prompt in the initial post to make it not put out this extra line?

1 Like