Skip to content

LearnGenerate & answer

Grounding

Grounded generation

Constraining a model to answer from supplied evidence, such as retrieved passages, rather than from what it memorized in training.

In DocSlurpGlossary entry

On this page

Grounding means making a model answer from evidence you supply instead of from memory. In a RAG system the evidence is the retrieved passages, and the instruction is some version of “answer using only these excerpts; if they don’t contain the answer, say so.”

Without grounding, ask a model “How fast can my assistant get the Learjet to London?” and it will describe how private jet charters usually work in general. With grounding, it reads travel-desk-guide.pdf p. 3 and answers with your company’s actual turnaround, citing it.

Grounding has three parts that are easy to blur:

  • Supplying evidence: retrieval puts the right passages in the context window.
  • Instructing: the system prompt tells the model to stay inside them and to abstain when they fall short.
  • Verifying: something checks that each claim in the answer is supported by a cited passage.

Most systems do the first two and assume the third.

The gotcha

A grounding instruction is a request. Models still blend in training knowledge, especially when a passage is close but not quite on point, or when the general answer is common online. “Grounded” describes the setup, not the output. To know whether an answer is grounded, check it claim by claim: that is what faithfulness measures and what citations make possible.

In DocSlurp

In DocSlurp

Every chat system message starts with fixed grounding rules: "Answer the user using only the provided project excerpts" and "If the excerpts are insufficient, say so plainly" (groundingRules in core/server/src/services/chat-instructions.ts). Project instructions cannot override them.

Sources

Jump to