Context and Sources
Missing Information and Hallucinations
Design instructions that allow the model to state when information is insufficient instead of guessing to fill gaps.
In this lesson
Why this matters
A hallucination is plausible-sounding but unsupported or incorrect information. No prompt eliminates it completely; reduce risk with source scope, explicit missing states, fact/inference separation, and verification.
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: هل يمكن منع الهلوسة نهائيًا بالـPrompt؟
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.

