Continue Writing Prompt

I’m curious, how are all the AI writers doing their ‘continue writing’ feature with GPT-3?

For example, if I write a sentence: “The dog is playing with his bone” and then I hit an AI writing button, it continues writing taking the sentence into consideration.

In terms of creating a prompt for the API, do we take the last sentence before the cursor, and then ask it to write more?

Example:
“The dog is playing with his bone” Write an expand on this idea.

or maybe,

“The dog is playing with his bone” Continue writing.

Is that how it’s done or is there an easier, more effective way to get the AI to continue writing in an editor? Do we serve the last sentence (or is there another way to give the API some context?)

2 Likes

I need an answer for this too

It turns out that just supplying the last few words/sentences turned out to work reasonably well. I think I was over-complicating some of it.

Figured I’d share in case someone else was looking for this.

2 Likes

can you give me an example (maybe some code snippet and the results). Of course with the use case you have

“continue writing: your text” has already solved most of the problems. The plugin I developed uses a prompt of no more than 50 tokens (search clap | chat like a pro), but there are still some issues. For example, when the last sentence of the text is a question, the AI is likely to interpret it as a request to answer the question rather than continue writing. You can try inputting “continue writing: How are you today?” to see this issue. That’s why I came to this forum to find answers.