Context and Sources
Long-context Prompting
Organize long inputs, state the task clearly, and anchor the response to the supplied material.
In this lesson
Why this matters
Long context does not mean more is always better. Organize and label documents, scope the question, and test retrieval across positions. Instruction placement can have model-specific guidance.
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: هذه 20 وثيقة؛ أخبرني المهم.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: قارن D3 وD8 وD14 فقط في سياسة الاسترجاع، وأعد جدولًا يذكر معرف المصدر لكل اختلاف.Short practice
Apply the lesson concept to this task: أنشئ 3 مصادر قصيرة واكتب سؤال مقارنة يلزم بذكر معرف المصدر.
Check your understanding
Check: هل نافذة سياق كبيرة تعني إدخال كل شيء؟
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.

