Skip to content

Current path

Prompt Engineering
Level: Intermediate33 lessons
Progress0/33 · 0%

Context and Sources

Grounding and Source-based Answers

Request answers grounded in specified sources and distinguish supported claims from points requiring external verification.

In this lesson

Why this matters

Grounding anchors answers to checkable evidence. Require claims to be tied to available sources and distinguish source statements from inference or outside knowledge.

How to apply it

  1. Define the task and desired outcome.
  2. Add only context or rules that affect success.
  3. Specify an output form or checkable criterion when needed.
  4. Test on realistic input and revise when a failure pattern appears.

Practical example

Weak example:

text
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:

text
Improved version: استخرج سياسة الاسترداد من المصادر المرفقة فقط؛ اذكر المصدر لكل شرط واعرض أي تعارض دون حسم من عندك.

Short practice

Apply the lesson concept to this task: اكتب أمرًا يقارن مصدرين مع قاعدة للتعارض.

Check your understanding

Check: ما هدف Grounding؟
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.