Um momento
0x00Lesson 1 of 6

Write a clear prompt

Specify the task, useful context, constraints, and response format.

12 min 5-question quiz
By the end of this lesson you can
  • Build a prompt that makes the task and success criteria clear.

A prompt is the input that guides a model at run time. A useful prompt states the task, includes relevant context, gives necessary constraints, and describes the expected output. Be specific enough to make success checkable, but avoid piling on instructions that do not help. Prompts influence model behavior; they do not guarantee correctness.

A small example

Illustrative Python
1task = "Summarize the announcement"
2context = "The park opens at 7 am on Saturday."
3format_rule = "Use one sentence and include the opening time."
4prompt = f"Task: {task}\nContext: {context}\nOutput: {format_rule}"
5print(prompt)
Output
Task: Summarize the announcement
Context: The park opens at 7 am on Saturday.
Output: Use one sentence and include the opening time.

State the audience, tone, or length only when they affect the result. Replace vague requests such as “make this better” with observable requirements. If important information is missing, tell the model to ask a question or state what it cannot determine.

Key takeaways

  • Build a prompt that makes the task and success criteria clear.

  • Test prompts on realistic inputs and validate important outputs in software.

Lesson quiz

5 questions · pass with 4 correct · up to 50 XP

Passing this quiz completes the lesson and keeps your streak going. Questions you miss come back in review sessions later.

Questions about this lesson

Stuck? Ask. Figured something out? Share it. Explaining is one of the best ways to learn.

Loading posts…

Gostou da aula? 😆👍
Apoie nosso trabalho com uma doação: