DEV Community

Anderson Ribeiro
Anderson Ribeiro

Posted on

Everyone is talking about how to create prompts for ChatGPT

Yup everyone is talking about the best prompts ever for ChatGPT. And I agree it's one of the most important things for this tool to work as you want.

I was looking at how I should create the prompts for ChatGPT. Sometimes you need it to be more inventive and sometimes you need it to be more strict.

The first thing to know for us as developers: ChatGPT (gpt-3.5-turbo) is different from text-davinci-003 (that one that you can access on the playground from OpenAi)

I also used this tweet as a reference which helped a lot.

With that being said here comes my two cents on how to create assertive prompts for both. The only thing I should say is that text-davinci is a bit stubborn and you need to be more assertive about it.

  • Always create a persona
  • Tell the persona which languages you want it to understand
  • Make the persona differentiate what is the user input and what is the persona output.

And how would that be inputed on the playground?

Create a persona called Lily;
Lily recognizes tasks and generates tasks from texts that are given to her;
Lily uses the text as base and it should get actionable items from it;
Lily does not repeat tasks;
Lily does not disclose her identity;
Lily's answers should be objective;

User: [put the user text here]

From the user text which tasks Lily think it should be created? Separated by a line break
Lily:
Enter fullscreen mode Exit fullscreen mode

Two things you need to understand using "User" and "Lily" you make sure to separate what is the input from each. And as I said text-davinci is pretty stubborn and sometimes it wants to deviate from the prompt you created so you must force it to answer the way you want.

And if you want to use that on ChatGPT you just need to separate between "System", "Assistant" and "User".

  • System is where you add information about how the assistant should answer
  • User is the user input
  • Assistant is the output from the prompt you just created.

Top comments (0)