Module 02 · 16 minutes
Examples and Constraints
Set the goal, context, examples, constraints, and output format so the instruction is easier to follow.
Written and edited by Cahyanto Arie Wibowo. Last reviewed · version 1.2.
How does the idea of “Examples and Constraints” change the decision we make?
This part of Prompting uses Examples and Constraints to separate what is known from what still needs to be tested. Examples and Constraints becomes easier to understand in a real situation. Notice what changes in the choice, the risk, and the way the result is reviewed. The result should be an explanation of Examples and Constraints that another person can follow, supported by a relevant example.
After this lesson
- This part of Prompting uses Examples and Constraints to separate what is known from what still needs to be tested.
- Use the idea of “Examples and Constraints” to interpret one realistic situation.
- Explain the limits of the concept and the information that still needs to be checked.
Start with the situation
Understand the situation first. The label can come later.
JSON can support integration, but you still need to define the data structure and error handling. This lesson uses the idea of “Examples and Constraints” to examine that situation without treating a single term as the answer to every problem.
This part of Prompting uses Examples and Constraints to separate what is known from what still needs to be tested. Set the goal, context, examples, constraints, and output format so the instruction is easier to follow. Connect the term to a decision someone genuinely needs to make.
See how the decision unfolds
Move from the situation to a choice others can review.
01
Situation
JSON can support integration, but you still need to define the data structure and error handling. This lesson uses the idea of “Examples and Constraints” to examine that situation without treating a single term as the answer to every problem.
02
Decision
JSON can support integration, but you still need to define the data structure and error handling. Identify the part of the situation most closely connected to the idea of “Examples and Constraints”. Use the case as a thinking tool, not as proof that one solution fits every context.
03
Review
A longer prompt is not automatically better. Relevant information matters more than word count. This mistake often appears when a label is used before the problem is understood. Write down your assumptions so another person can review them.
Visual model
Map the parts before choosing what to do.
Read the diagram as a map of Examples and Constraints: begin with the context, follow the connections, and inspect the highlighted point before making a decision.
Do not rush the choice
Two ways to look at Examples and Constraints
Useful when
- This part of Prompting uses Examples and Constraints to separate what is known from what still needs to be tested.
- Use the idea of “Examples and Constraints” to interpret one realistic situation.
- This part of Prompting uses Examples and Constraints to separate what is known from what still needs to be tested. Set the goal, context, examples, constraints, and output format so the instruction is easier to follow. Connect the term to a decision someone genuinely needs to make.
Pause and check
- A longer prompt is not automatically better. Relevant information matters more than word count. This mistake often appears when a label is used before the problem is understood. Write down your assumptions so another person can review them.
- Explain the limits of the concept and the information that still needs to be checked.
The stronger choice is the one whose evidence, owner, and limits can be explained, not simply the more sophisticated option.
Try it on your work
Try it with one small piece of real work.
- Choose one real situation related to Examples and Constraints.
- Separate what you can observe from what you are assuming.
- Write one decision, its owner, and the evidence needed to review it.
- Name the signal that would make you stop or change direction.
Choose a task you know. List what is known, what is still an assumption, and what must be tested before using the idea of “Examples and Constraints”. The larger module activity is: Rewrite three prompts as patterns that you can reuse. Keep the first version small enough for another person to review in a few minutes.
Pause for a moment
What evidence could change this decision?
Answer before opening the discussion. Name one fact and one assumption.
Open the discussion
This part of Prompting uses Examples and Constraints to separate what is known from what still needs to be tested. Examples and Constraints becomes easier to understand in a real situation. Notice what changes in the choice, the risk, and the way the result is reviewed. The result should be an explanation of Examples and Constraints that another person can follow, supported by a relevant example.
A tempting shortcut
A familiar term can still lead us to the wrong decision.
Why this can seem reasonable
A longer prompt is not automatically better. Relevant information matters more than word count. This mistake often appears when a label is used before the problem is understood. Write down your assumptions so another person can review them.
How to check it
Examples and Constraints becomes easier to understand in a real situation. Notice what changes in the choice, the risk, and the way the result is reviewed. Begin with what can be observed, then separate facts, assumptions, and open questions.
Quick practice
Choose a task you know. List what is known, what is still an assumption, and what must be tested before using the idea of “Examples and Constraints”. The larger module activity is: Rewrite three prompts as patterns that you can reuse.
Summary
- This part of Prompting uses Examples and Constraints to separate what is known from what still needs to be tested.
- Use examples and evidence to test your understanding.
- Record the limits, risks, and conditions that should trigger another review.
Continue from here
- Output Structure: Continue the idea from Anatomy of a Strong Prompt with a closely related example.
- Build, Buy, or Combine: Connect this lesson to Applied AI and test the idea in another context.
- Updating with Evidence: See how the same decision changes when viewed through Data Literacy.
Sources and further reading
- Prompt engineering: OpenAI · official-documentation. Primary reference for the definition, evidence, or limits discussed in “Examples and Constraints”.
- Evaluation best practices: OpenAI · official-documentation. Further evidence and context for checking the explanation in “Examples and Constraints”.
- Safety best practices: OpenAI · official-documentation. Further evidence and context for checking the explanation in “Examples and Constraints”.