Prompting & context

Grounding

Tying a model's answer to specific source material, such as documents, data or search results, so that its claims can be traced and checked.

Questionfrom the userRetrievedocuments, search, dataAnswer from themuse only these sourcesCiteverifiableUngroundedwhat the model recalls from trainingGroundedyour current, verifiable data

swipe to see the whole diagram →

MEmehmeterkek.com/glossary/grounding

In plain terms

An ungrounded model answers from memory, like a confident colleague speaking off the cuff. A grounded model is handed the file first and told to answer from it and to point to the page. The second is slower to set up and far easier to trust, because every claim comes with a place to check it.

Why it matters

Grounding is the main defence against hallucination and the precondition for using AI where accuracy matters. It also solves the knowledge problem: the model does not need to have been trained on your policies, prices or last week's figures if they are supplied when the question is asked. For most enterprise uses, “is it grounded in our data?” is the first question to ask.

Example

An HR assistant is asked how many days of parental leave an employee is entitled to. Ungrounded, it gives a figure typical of large companies in general. Grounded in the company's own handbook, it quotes the relevant paragraph, gives the correct number for the employee's country, and links to the section.

Most often confused with

Grounding vs. RAG

GroundingThe goal: answers anchored in sources
RAGOne method: retrieve documents, then generate

Grounding is the property you want: claims tied to evidence. RAG is the most common way to achieve it, by fetching relevant passages and placing them in the context. Grounding can also come from a web search tool, a database query or a document pasted into the prompt.

Under the hood

Ingredients: a source of truth, a retrieval step that finds the relevant part, a prompt instructing the model to use only the supplied material and to say when the answer is not there, and citations that link each claim to a passage. Quality is measured as groundedness or faithfulness: the share of statements supported by the sources, often checked by a second model. Failure modes: retrieval returns the wrong passage and the model answers from it faithfully; the model blends source content with its own recall; a citation is attached to a sentence it does not support. Asking the model to extract supporting quotes first, then answer from those quotes, reduces the last two.

Written by Mehmet Erkek · Last updated: