#GPT-3 Keeps Returning Empty Strings
21 messages · Page 1 of 1 (latest)
Are you using a stop setting. Maybe your completion is starting with a newline and you have that as a stop setting. Otherwise share your prompt and we might have some suggestions
I don’t have any stop setting. Should I have one?
It happens to every prompt between 200-500 tokens. Every one of them. I will share my settings in a bit
model: 'text-davinci-003',
prompt: prom.trim(),
temperature: 0.4,
max_tokens: 1900,
frequency_penalty: 0.1,
This is one of the results I got from the API. Note that it did take the prompt in and but spit out empty string.
model: 'text-davinci-003',
choices: [ { text: '', index: 0, logprobs: null, finish_reason: 'stop' } ],
usage: { prompt_tokens: 405, total_tokens: 405 }
^^ Yeah, we need to see the prompt as well to see what might be going wrong 🙂
I've been having the same issues, I can't sort it out either.
Can you share the request you're making? What is the prompt you're using?
prompt = "///Without modifying any of the words, or their order, add line breaks to this text to separate key ideas///\n" + """ + str(draft2) + """
This is one of the dozen that I use. All of them eventually get blank replies.
Here's another one:
///rewrite the following text///
"textextextextextextextextextextextex"
I've run these prompts hundreds of times without any issues before though.
Have you considered putting \n\n at the end of the prompt. It may help a lot
^ Yup! Did you try this out? Also, in your first prompt example, What would the contents of draft2 usually be?
I don't know why but this works for me. It even works with one \n.
And just like Xuuxij, it has been working normally for me before the day I posted this. I'm sorry I couldn't provide the exact example, and I couldn't reproduce it consistently, but it usually happens with prompts like this (before I added the \n)
Continue this story, but add a new hardship.
"Paragraph 1...
Paragraph 2...
Paragraph 3...
Paragraph 4..."
Thanks you both for the solutions! 
If you end the prompt with a full stop (and nothing else), the AI sometimes thinks you have finished and it doesn't need to continue. If you add a question mark, it knows it needs to reply. But if you add a newline, it thinks you want a new sentence or paragraph and so it will also continue whatever you started. I hope that makes sense
Ah it makes sense. Thanks. So which prompt here do you think would be better in term of not getting empty strings?
“{The story here}”
Continue this story.
or
Continue this story.
“{The story here}”
The second one