Writing Good Prompts

Live

Initech wants customer feedback sorted by theme and sentiment automatically. Your call: what has to be in the prompt before the results are good enough to act on?

Key idea: A prompt is a set of ingredients, and you can measure each one. Spelling out the format, defining your categories, and covering edge cases usually matter far more than telling the model who it is.

Prompt ingredients

Prompt preview · 82 characters, exactly what the model gets
Task
Tag this customer feedback with a theme, a sentiment, and whether it's actionable.

Finish a run to see what a PM takes away from this lesson.

Things to try

  1. Run with every ingredient off. How many answers are even valid JSON?
  2. Turn on Output format only and run again. Every answer is now usable; how many are right?
  3. Add Category definitions. Watch the theme column.
  4. Turn on Role. Does "You are a senior product manager…" change the score?
  5. Try 1 example, then 3. Which tricky item do the examples fix?
  6. Add Edge-case rules. Which item could only the rules fix?
  7. With everything on, switch to Smart, then turn off one ingredient at a time, putting each back before the next. Does the bigger model still need them?
RoleoffCategoriesoffOutput formatoffFeedback10 labeled itemsPrompttask + ingredientsModeltags each itemChecksformat + labelsScorecarditems tagged rightExamplesoffEdge-case rulesoff
Press Run to watch it run

Results

Run the prompt to see how each item was tagged.

Behind the scenes

Run the prompt and every item, check by check, will show up here.