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: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.- 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.”
- 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.”
- 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]”