← Back to Guide
In Context

In Context prompting supplies relevant background information directly within the input, allowing the AI to produce responses that are informed and nuanced by the provided details, particularly beneficial for domain-specific queries or when prior knowledge is essential for accuracy, and the analogy is like giving a storyteller the setting and characters before asking for the plot, ensuring the tale fits seamlessly into the established world.

Examples

User Prompt: In the context of World War II, who was Winston Churchill? AI Response: British Prime Minister who led the UK to victory.

User Prompt: In the context of programming, what is a loop? AI Response: A structure that repeats a block of code until a condition is met.

User Prompt: In the context of cooking, how to boil an egg? AI Response: Place in boiling water for 10 minutes, then cool.

Advantages

  • Improves relevance by incorporating specific context, enhancing prompt efficiency for domain-focused queries.
  • Reduces ambiguity in responses, leading to more accurate outputs without additional clarification.
  • Boosts adaptability for tasks requiring background knowledge, making prompts versatile for specialized topics.