Hints for prompt engineering
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
- Number your examples. This makes GPT-3 pay more attention to your examples.
- 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.
- Ask specific question. Clearly ask what you want.
- 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 drinksN. Mary looks at flowers
Prerequisites: For this to happen,
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