Contextual prompting: Tailoring responses with relevant background information
Reading time: approx. 6 min
What you will learn
In this lesson, you will learn about contextual prompting, a technique that focuses on providing the AI model with immediate, task-specific information relevant to the current conversation. Unlike system prompting, which sets an overarching framework, contextual prompting is about giving AI the specific details it needs right now.
The basics
Contextual prompting is about providing relevant background information directly in the prompt to guide AI responses. This is crucial because AI bases its responses on the information it "sees" in its context window. By including all necessary information for a specific task, you ensure that AI does not need to guess or "hallucinate" information.
According to Lee Boonstra from Google, through contextual prompts you can ensure that your AI interactions are as seamless and effective as possible.
Important aspects of contextual prompting:
- Focus on current task: The information is specific to what you are asking AI to do right now
- Prevents misunderstandings: By providing clear context, you reduce the risk that AI misunderstands your intent
- Improves relevance: AI can provide more accurate and useful responses because it has all necessary background information
Practical examples
Example 1: Blog post about 80s arcade video games with specific context
You want AI to suggest topics for a blog post about arcade video games from the 80s.
Prompt (Contextual prompt):
Context: You are writing for a blog about 80s arcade video games.
Suggest 3 topics to write an article about with a few lines of description of what this article should contain.
Output (Example):
The evolution of arcade cabinets: This article would explore the development of arcade cabinet design, from the early wooden and metal cabinets of the 1970s to the sleek, neon-lit designs of the 1980s.
Blast From The Past: Iconic arcade games from the 80s: This article would provide insight into the history, impact, and legacy of some of the most iconic arcade games from the 1980s.
The rise of pixel art: This article would delve into the development of pixel art as a defining visual style for early arcade games.
Benefits: AI generates topics that are strictly relevant to 80s arcade video games thanks to the clear context.
Example 2: Translation with cultural adaptation
You want to translate a text from Swedish to English, but with a specific cultural adaptation for a British audience.
Prompt (Contextual prompt):
Context: This text is intended for a British audience. Use British English and cultural references where appropriate.
Translate the following sentence to English: "Jag ska fika med mina kollegor."
Benefits: AI will suggest a translation that is more natural for a British English context, such as "I'm going to have a tea break with my colleagues", rather than a direct translation.
Implementation in the classroom
Subject-specific explanations: When students need help understanding a concept, ask them to include relevant context to get a tailored explanation.
Source criticism with context: Give students a text to analyze. Then ask AI to answer questions about the text, but include context such as: "This text is from a political blog with a clear agenda." This trains students to think critically about sources.
Problem deepening: When students get stuck on a problem, they can give AI the specific task plus context about what they have already tried, to get more targeted help.
Next steps
Contextual prompting is excellent for giving AI immediate information. In the next lesson, we will explore how you can get AI to "step back" and reason about a more general question before answering your specific task.

