Skip to main content
If specificity is the bedrock of good prompting, context is the scaffolding that supports it. Providing context means giving the LLM the background information it needs to understand the world of your request. Without context, the model is working in a vacuum; with it, the model can tailor its response to your specific situation, audience, and goals.

Why Context is King

An LLM doesn’t know who you are, what you’re working on, or why you’re asking a question. It only knows what you put in the prompt. Failing to provide context forces the model to make broad assumptions, which are often wrong. Consider the prompt: “Summarize this.” The model has to guess:
  • Audience: Who is the summary for? A CEO? A 5th-grade student? A fellow researcher? The level of detail and language will be completely different for each.
  • Purpose: Why are you summarizing it? To get the key financial data? To understand the main argument? To create a social media post?
  • Key Elements: What parts of the text are most important to you? Should the summary focus on the methods, the results, or the conclusions?

From No Context to Rich Context: A Case Study

Let’s see how adding layers of context can dramatically improve the quality of an output. Prompt without Context:
Explain how a blockchain works.
This will produce a generic, technical definition. Prompt with Audience Context:
Explain how a blockchain works to a group of investors who have no technical background.
Better. The model will now simplify the language and focus on the business implications. Prompt with Audience and Purpose Context:
Explain how a blockchain works to a group of investors who have no technical background. The goal is to help them understand the security and transparency benefits of the technology for supply chain management.
Even better. The model will now tailor the explanation to a specific use case. Prompt with Rich Context (Audience, Purpose, and Format):
You are a technology consultant giving a presentation. Explain how a blockchain works to a group of investors with no technical background. Use a simple analogy to make it easy to understand. The goal is to highlight the security and transparency benefits of the technology for supply chain management. Please structure the explanation in three short paragraphs.
This is an excellent prompt. It provides a persona, a target audience, a clear goal, a specific analogy requirement, and a formatting constraint. The resulting output will be highly targeted and useful.

The Golden Trio: Key Types of Context to Provide

While any background information can be helpful, there are three types of context that are almost always essential for high-quality responses.
  1. Audience Context: Who is this for? The most important piece of context you can provide. Always define your audience.
    • “Explain this to a team of senior software engineers.”
    • “Write this for a general audience with no prior knowledge of the topic.”
    • “This is for a potential customer who is skeptical about our product.”
  2. Purpose Context: Why are you making this request? What is the end goal?
    • “The goal is to create a marketing email that drives clicks.”
    • “I need to understand the main arguments of this paper for a literature review.”
    • “This will be part of a technical documentation site for new users.”
  3. Source Material Context: If your prompt relates to a specific piece of information (an article, an email, a block of code), you must include it directly in the prompt. Don’t assume the model has seen it before.
    • “Based on the following article, what are the three main takeaways? [Paste article here]”
    • “Review the following code for bugs: [Paste code here]”
Providing rich context is a skill that separates novice prompters from experts. By consistently thinking about your audience, purpose, and source material, you will elevate the quality of your AI interactions.