Giving the AI the clues it needs for relevant answers.
Welcome to Module 4! We've learned about prompt components and patterns. Now, we focus on **Context** – the essential background information that guides the AI.
We'll explore *why* context is vital, *how* to include it effectively, and how to strike the right balance.
How this Connects: This module deepens the "Context" component (Module 2) and applies it across patterns (Module 3). It prepares us for Module 5: Output Formatting.
Without context, the AI guesses, leading to generic or irrelevant responses. Context helps the AI:
Quick Thought:
Think of a recent time you asked someone for help. What background info did you give them first?
Common types of useful background information include:
Goal: Summarize a book.
Less Context: Summarize "Moby Dick".
More Context: Summarize the plot of Herman Melville's "Moby Dick" (Background) focusing on the theme of obsession (Clarity). The summary should be about 200 words (Constraint) and suitable for a high school literature class (Audience/Purpose).
Goal: Draft an email response.
Less Context: Write an email saying no.
More Context: Draft a polite but firm email (Instruction) responding to a client request for a discount (Background). Explain that we cannot offer a discount... (Context/Reason), but offer an alternative... (Instruction). The client's name is John Smith (Context).
Common Mistake: Context Balance
Avoid giving too little context (generic answers) or too much *irrelevant* context (confusing answers). Focus on what's necessary.
Let's enhance this basic prompt: Write a blog post about the benefits of exercise.
Expected Outcome:
Your rewritten prompt should be much more specific, guiding the AI effectively by including details like audience, purpose, length, or focus.
Evaluate the prompt you enhanced in the Hands-On Exercise.
1. Context Inclusion: Did you add at least two distinct types of context (e.g., Audience, Purpose, Constraints)?
2. Context Relevance: Was the added context directly relevant to the blog post goal?
3. Clarity Improvement (Rate 1-5): How much clearer is your prompt than the original?
Suggestion for Improvement:
Before prompting, ask: "What background info does the AI *need* to know to do this well for my specific situation?"
Excellent work! You've explored the power of providing context.
Next Steps: Now let's control the final output! In Module 5: Output Formatting, we'll learn how to specify presentation (lists, tables, length).