we need to talk

Hints for prompt engineering

Jurijs Kovzels

--

Or how to talk to your language model

Those tips are based on “Symbolic Knowledge Distillation: from General Language Models to Commonsense Models” paper, and excellent explainer video by Yannic Kilcher. Check it out. Hints are applicable for GPT-3

  1. Number your examples. This makes GPT-3 pay more attention to your examples.
  2. Use if-then statement. State your examples so that outcome could be implied from the premise. Strange thing to say but GTP-3 should be able to follow the logic.
  3. Ask specific question. Clearly ask what you want.
  4. Do not use mathematical notions. Replace X and Y with generic names e.g. John or Mary.

Here is an example from the paper:

What needs to be true for this event to take place? . . . 1. John goes jogging 
Prerequisites: For this to happen, John needed to wear running shoes
2. Igor wants to lose weight
Prerequisites: For this to happen, Igor needed to stop drinking soft drinks
N. Mary looks at flowers
Prerequisites: For this to happen,

Some concepts

Temperature — measure of randomness or surprise of model’s answer or completion. Lower temperature — less random completion. Higher temperature — more ‘creativity’, BS and surprises.

Resources on the subject

Prompt engineering guide for and by co:here

Happy prompting!

--

--

Jurijs Kovzels

Software Engineer, Product designer and manager. I help others create digital services and businesses. Now in Berlin.