Definition
The process of dynamically inserting retrieved external data or state information into an LLM's prompt to ground its response in specific, real-time facts. While it significantly reduces hallucinations, architectural trade-offs include increased inference latency and higher token costs as the prompt size grows.
Distinguish from 'Prompt Injection' (a security vulnerability); Context Injection is a deliberate design pattern for data grounding.
"A lawyer being handed a specific case file right before a trial to ensure their arguments are based on current evidence rather than general legal knowledge."
Conceptual Overview
The process of dynamically inserting retrieved external data or state information into an LLM's prompt to ground its response in specific, real-time facts. While it significantly reduces hallucinations, architectural trade-offs include increased inference latency and higher token costs as the prompt size grows.
Disambiguation
Distinguish from 'Prompt Injection' (a security vulnerability); Context Injection is a deliberate design pattern for data grounding.
Visual Analog
A lawyer being handed a specific case file right before a trial to ensure their arguments are based on current evidence rather than general legal knowledge.