Building Effective Prompts
Specify the Output Format
Describe the desired response shape such as a table, bullets, JSON, or a defined structure without unnecessary constraints.
In this lesson
Why this matters
Output format defines the required structure: prose, table, fields, or JSON. For programmatic use, supported Structured Outputs/JSON Schema is stronger than merely asking for “JSON.”
How to apply it
- Define the task and desired outcome.
- Add only context or rules that affect success.
- Specify an output form or checkable criterion when needed.
- Test on realistic input and revise when a failure pattern appears.
Practical example
Weak example:
Weak version of the same task: استخرج بيانات المرشح.The weak version leaves an important part of the task or its boundaries to guesswork. The improved version adds information tied directly to success without treating length or complexity as a goal.
Improved example:
Improved version: استخرج الاسم والخبرة والمهارات والمدينة؛ استخدم null للمفقود ولا تستنتج معلومات غير موجودة.Short practice
Apply the lesson concept to this task: حوّل ملخص منتج إلى أربعة حقول ثابتة.
Check your understanding
Check: ما الفرق بين طلب JSON وStructured Outputs؟
Answer: الأول تعليمات نصية، والثاني تقييد تقني بالمخطط عند دعمه.
Summary
Keep this concept as one tool rather than a magic formula. Tie it to the goal and success criteria, then build on it in the next lesson.

