Grounding supplies an LLM with evidence to support or constrain its response. A grounded factual claim is supported by material placed in the context window, so it can be traced to a source rather than resting on parametric memory. Grounding does not guarantee truth or establish that the source itself is reliable. section 3.1
External knowledge can come from documents, incident logs, structured repositories, or curated collections. The system must select appropriate information and insert it into the working context when needed. In retrieval-augmented generation (RAG), it retrieves relevant passages at query time; agentic RAG can add query reformulation, tool selection, and iteration over results. section 3.1 section 3.2
Figure 3.1 RAG architecture: the indexing pipeline converts data into vector embeddings, while the generation pipeline matches the query against those embeddings and passes the corresponding text chunks to the LLM
The architecture separates offline indexing from query-time retrieval and generation: external data is indexed ahead of time, while matching text chunks enter the LLM context for a request. section 3.2
Grounding code review comments
A code review system can assess whether generated comments are supported by the actual diffs. HalluJudge illustrates this approach with reference-free detection. section 12.2.2
Evidence can fail to reach or govern the answer: retrieval may miss a source, reranking may select the wrong chunk, or the generator may ignore evidence. Source freshness and authority, permission filters, and prompt assembly also affect reliability. Grounding is one defense against hallucination, not a complete solution; faithfulness metrics and traces help check whether answers are supported by the supplied context. section 12.2.2 section 1.3.1 section 3.2












