Grounding (LLM)
Grounding provides an LLM with authoritative context — retrieved documents, structured data, real-time API responses — and instructs it to base its response on that context rather than its pre-trained knowledge. Grounding dramatically reduces hallucination on factual questions and gives the model access to information beyond its training cutoff.
Grounding is the umbrella technique behind RAG and most enterprise LLM applications. The implementation has two halves: retrieving the right context (vector search, structured queries, web fetches) and instructing the model to use it (system prompts that emphasise citation, structured outputs requiring source attribution, validation that the response stays within the provided context). The trap of grounding is over-trust: providing context doesn't guarantee the model uses it correctly. Healthy grounded systems include citation enforcement (model output must quote source IDs) and verification (sampling responses to check whether cited claims match the source).
Related terms
- Retrieval-augmented generation (RAG)
Retrieval-augmented generation is the pattern where an LLM is given relevant context retrieved from an external source — typically via semantic search over a vector database — before generating its response.
- Hallucination
Hallucination is the LLM failure mode in which the model generates content that is plausible-sounding but factually wrong — invented citations, fabricated quotes, non-existent functions, misremembered statistics.
- Structured output
Structured output is the LLM feature that guarantees the response matches a provided schema (JSON Schema, Zod, Pydantic) — eliminating the parsing failures and format drift that plagued early LLM applications.