Prompt Engineering Essentials · v0.5

Give useful context, sources, examples, and media

Module 3 of Prompt Engineering Essentials: give useful context, sources, examples, and media.

Course contents and progress

Course progress

0 of 10 course sections complete

Eight modules, final knowledge check, and capstone.

This course remembers completed sections and your last course page in this browser on this device. RayAI does not receive this progress or anything you write. Unfinished answers and written responses are not saved, so an interrupted activity restarts when you return.

MODULE 3 | 35 minutes | FAST TRACK CORE + GO DEEPER

Give useful context, sources, examples, and media

Core idea: context should change the answer

Useful context includes facts, definitions, source material, prior decisions, constraints, and examples that a capable person would need. Noise makes a prompt longer without improving the task. More context is not automatically better context.

  • Tell the model whether it may use general knowledge, must use only supplied sources, or should search current authoritative sources if the tool supports it.

  • Label instructions and source material clearly so they are not confused.

  • State what to do when the answer is absent, ambiguous, or contradictory.

  • Start a fresh conversation or restate the current brief when old context has become stale or conflicting.

  • Check whether the tool is using saved memory, prior chats, connected files, or retrieved content that could influence the answer beyond the text you just entered.

SOURCE-GROUNDED TEMPLATE

Zero-shot and few-shot prompting

Zero-shot means giving instructions without an example. Try it first when the task is straightforward. Few-shot means adding one or more input-output examples. Use examples when you need a specific pattern, tone, classification rule, or edge-case behavior.

  • Choose examples that match the real task and include meaningful variation.

  • Show missing-value behavior explicitly, such as null or Needs confirmation.

  • Remove private, copyrighted, or restricted material you are not permitted to provide.

  • If examples conflict with instructions, the output may become inconsistent. Reconcile them before testing.

Multimodal prompting

A prompt may include an image, screenshot, diagram, audio clip, video, or document. State what the model should inspect, what it should ignore, and how the answer will be used. Visual recognition and OCR can be wrong, so verify names, numbers, labels, and small text.

SCREENSHOT TEMPLATE

See it: grounding the event plan

PLANNING NOTES

GROUNDED TASK

Spot it

Write one label beside each line below: Instruction (what the AI should do), Source (a fact to use), Example (a model to copy), or Noise (words that do not help).

  1. Return a three-column table.

  2. The budget ceiling is $600.

  3. A sample confirmed row should read: Budget | $600 maximum | Planning note 2.

  4. You are brilliant and always exceed expectations.

Try it: practice the skill

What to do

  1. Choose the task suggested for this module, or use another simple, low-risk task.
  2. Open ChatGPT or another AI assistant in a separate tab or window.
  3. Enter your prompt and send it. Do not include private or sensitive information.
  4. Read the AI answer.
  5. For this module, add the facts or source material the AI needs. Tell it clearly what to do when information is missing.
  6. Return to this course and complete the short notes below.
    If you cannot use an AI assistant now, read the worked example and write what you would try later.
Path Your task
Everyday life Provide only the facts that could change your comparison and require missing facts to be labeled.
Learning Attach or paste a short authorized source and ask for claims linked to specific passages.
Work Use fictional notes as the only source and show one example of the desired action-item format.

Module 3 test - check before you continue

Answer Questions 1–3 by choosing A, B, or C. For Question 4, write a short response. After you finish all four, use the answer key at the end of the course to check your work.

Your response stays in this page and is not saved or sent to RayAI.

1. A supplied source does not contain the requested answer. What should the model do?
Review after attempting

Best answer: B. A source-grounded task should say when the answer is absent. Filling the gap from memory would violate the evidence boundary.

2. When are examples most useful?
Review after attempting

Best answer: A. Examples are especially valuable when the desired pattern, tone, classification, format, or edge-case behavior is easier to show than explain.

3. What is the best instruction for a screenshot task?
Review after attempting

Best answer: B. The task names observable evidence, limits inference, and specifies the output. 'Look at this' leaves the purpose undefined.

4. Add a source rule to your starting prompt: name what information the AI may use and what it should say when that information does not contain the answer.

Review after attempting

Your answer should your prompt identifies the permitted source and tells the model to mark the answer as not established or ask for missing information instead of guessing.

Finish this module

Mark this module complete when you have attempted every activity you intend to complete and reviewed your work against the v0.5 guidance.