Learn how to provide context in your prompts to get more relevant and accurate AI responses. Understand why background information is crucial for prompt engineering. Lecture 04
Why Context is Your Best Friend
We’ve learned to be clear and specific. Now, let’s add another powerful tool to our kit: context.
Context is the background information, the “big picture,” that you give the AI. It helps the AI understand not just what you want, but why you want it. Without context, the AI is working in the dark.
What Happens Without Context?
When you don’t provide context, the AI has to make assumptions. It uses its general knowledge, which might not be what you need.
Without Context
Summarize this: "The bill passed the house and then the senate before the president signed it."
AI might ask: Which bill? Which house or senate? Which president? Which country?
With Context
I'm writing a report on the US legislative process. Summarize the final steps for this specific bill: "The bill passed the house and then the senate before the president signed it."
AI understands: The context is the US government, so it knows which institutions you mean.
Types of Context You Can Provide
You can provide many kinds of context to guide the AI. Here are a few common ones:
- Audience: Who is this for? (e.g., “Explain this for a child,” “Write for an expert audience.”)
- Purpose: Why do you need this? (e.g., “I need a tweet to promote my new blog post,” “This is for a formal business proposal.”)
- Relationships: How do things relate? (e.g., “We are discussing the plot of the movie *Inception*.”)
- Constraints: Any rules or limits? (e.g., “Use simple words,” “Do not include any technical jargon.”)
Example: Using Context to Change the Output
Let’s use the same instruction but change the context.
Instruction:Explain what a black hole is.
Prompt 1 (Context for a Child):Explain what a black hole is in simple terms for a 6-year-old. Use an analogy of a bowling ball on a trampoline.
This will produce a very simple, story-like explanation.
Prompt 2 (Context for a Student):I am a high school physics student. Explain what a black hole is, mentioning the concepts of gravity and spacetime.
This will produce a more technical, but still accessible, explanation.
Prompt 3 (Context for a Social Media Post):Write a fascinating, one-paragraph social media post about black holes to get people excited about astronomy. Include a question at the end to encourage comments.
This will produce a short, punchy, and engaging piece of text.

Key Takeaways from Lecture 04
- Context is crucial: It gives the AI the “why” behind your “what.”
- Reduce guessing: Good context stops the AI from making bad assumptions.
- Control the output: By changing the context, you can dramatically change the AI’s response (tone, complexity, format).
- Think before you prompt: Ask yourself, “What background information does the AI need to know to do this task perfectly?”
End of Lecture 04. You’re doing great! We have now completed the absolute basics. In the next part of the course, we will dive into core prompting techniques, starting with Zero-Shot and Few-Shot prompting.