Sandra Kublik Profile picture
DevRel @Cohere I youtube and occasionally write about things I'm trying to grasp. The latest baby is my podcast. She/her. Views are mine!

Feb 27, 2023, 10 tweets

1/10 Working with LLMs is exciting & powerful, but there are few things I wish I had known getting started with prompt engineering.

Here are 8 tips for getting the most out of @Cohere's Generate, #ChatGPT, #GPT3, and other text generation models🧵👇🏻

🎬

2/10
I am using @CohereAI 's Generate to illustrate my points.

1. Start small!

Don’t try to do too much at once. Give the model simple, straightforward tasks and gradually build up to more complex ones.

A great example of a simple instruction can start with: "Write a ....".

3/10

2. Experiment and iterate.

Make a rule of experimenting with different versions of your prompt to see what works best for your model. Even small tweaks can do wonders for the quality of your output. 🧪👩‍🔬

4/10

3. Keep generating outputs. A lot!

Generate 10 different outputs for your prompt and choose the best one, rather than settling for 2nd or 3rd output that kinda works. Strive for excellence, and you shall be rewarded.🎯

5/10

4. Provide examples to the model.

If its a few-shot model, examples of what you are trying to achieve will significantly improve its outputs. Zero-shot will also work great with additional examples. They can work great without them, too tho 😊 Here is a simple example:

6/10

5. Be mindful of the context.

Make sure your model got enough context about your task and any specific information needed to generate the output that you want. An example context may include the following info:

7/10

6. Cut out fluff and mistakes.

Models thrive at simple, step by step, straightforward instructions. Try to remove unnecessary words and sentence structures. Similarly, make sure your prompt has no grammar and spelling errors. I use @Grammarly to keep my prompts clean.

8/10

7. Break it down.

Break down your task into smaller steps and split them into multiple tasks for your model. For each task, generate a bunch of outputs and see how it changes your process. E.g.I start by asking the model for video title ideas instead of full video script:

9/10

8. Push the limits. Of the model and of yourself.

Sit down with your model and push yourself to find 10, 20, 30 different tasks it can do for you and test it. We are still learning how LLMs work. The list of tasks they can perform keeps getting longer every day.

10/10

If you come up with something new and cool, share it with the world! We wanna see it! 😍

#ai #promptengineering #chatgpt #gpt3 #languagemodels #textgeneration #transformers

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling