Writing a Clear Prompt

12 min read

A prompt is the instruction you give an AI model. A clear prompt gets a useful answer. A vague prompt gets a vague answer. In this lesson you learn four simple parts that make any prompt better.

New words

Prompt
The text you give the model to tell it what to do.
Role
Who the model should act as, such as a teacher or a coach.
Task
The exact job you want the model to do.
Context
The facts the model needs but cannot guess on its own.
Format
The shape of the answer, such as a list, a table or an email.
Constraint
A limit on the answer, such as its length, tone or language level.
Iterate
Read the answer, improve the prompt and try again.

What you will learn

  1. Give me something
  2. What is a prompt?
  3. The four parts of a good prompt
  4. Add limits, and say what you want
  5. Worked example: a leave application
  6. Read, improve, repeat
  7. Try it: improve a weak prompt
  8. Trade-offs
  9. In a real system
  10. Try it today, and key takeaways

10 quiz questions at the end.

Start this lesson

The full lesson, with interactive demos and the quiz, opens after you sign in with Google. It is free.

All lessons · Back to the roadmap