esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • AI papersPages
  • Interview KitPages
  • Book a callContact
  • Download ResumeContact
Let’s talk

I’ll build the agent for it.

What Is Grounding?

What grounding is, how it cuts hallucinations, how a grounding check works and where it still fails, explained simply for your AI interview.

In short

Grounding means tying an AI model's answer to real source text you supply, such as a policy or search results, so each claim can be checked. It cuts down hallucinations. It does not remove them.

9 min readBeginnerVery common · estimateFacts checked 26 November 2026

Say it out loud

Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.

Grounding means connecting the model's answer to real source text, like a policy document or search results, so every claim can be checked against that source. It cuts down hallucinations, where the model writes something that is not factual. It does not remove them. A grounded answer can still misread the source or use an old one. So I ground answers, make the model cite its sources, and run a check that holds any claim with no match.

What is grounding, in plain words?

Grounding means the answer is tied to a source you can point at. The model answers from text you hand it.

Think of a bank teller who reads the policy card before quoting a fee. The card is the source, and the customer can see it too. The AI case is a support bot that reads the current fee schedule before it answers a question about early withdrawals.

Key words

Grounding
Tying an answer to source text that you can check.
Hallucination
Content the model generates that is not factual, and often has no source behind it.
Source
The document, web page or database row the answer must come from.
Retrieval
Fetching the right source text for a question, before the model answers.
Citation
A pointer to the exact passage that supports a claim.

How does grounding work, step by step?

Three steps: fetch the source, make the model use it and show its working, then check each claim against the source before anyone sees the reply.

How a grounded answer is made

Customer question

asks about an early withdrawal fee

Fee schedule, 2026

the bank's own document, fetched

Model

drafts the reply from the source

Checks

Each claim has a quote

no quote, no claim

Grounding score

compares the reply to the source

Outcome

Reply sent

every claim has a source

Held back

a claim has no source

  1. 1The customer's question goes to the model.
  2. 2The fee schedule goes in too, so the model has the source.
  3. 3The draft reply goes on to the checks.
  4. 4Every claim matches the source, so the reply goes out.
  5. 5A claim with no match is held back for a person.
The customer's question and the bank's own fee schedule both go to the model. Checks compare each claim with the source. Replies that match go out, and the rest are held back.
  1. 1

    Fetch the source

    The app finds the current fee schedule for this question and passes it in. RAG, short for retrieval-augmented generation, is the common pattern for this: it fetches the text, then the model answers from it.

  2. 2

    Make it quote

    Ask the model to cite a source for each claim, and to quote the source word for word first. Anthropic recommends quotes first for long documents, and says this grounds its responses in the actual text.

  3. 3

    Check the claims

    Code or a grounding service compares the claims with the source. AWS's check gives each model response a score, and you can block any response below your threshold.

  • Without grounding

    Answers from memory

    The model writes a fee from what it learnt. It sounds sure, and nothing backs it.

  • With grounding

    Answers from the source

    The reply quotes the fee line, and any claim with no match is held back.

What does grounding look like at a real bank?

A mid-size bank runs a support assistant for its fixed deposits. A customer types: "What's the fee for an early withdrawal?" The app fetches the 2026 fee schedule first. It says 0.5% of the amount withdrawn, for the first 12 months only. Without grounding, the model may repeat an older fee it saw in training, such as "1% of the balance", and sound sure about it. With grounding, the reply has to quote the schedule line. The check finds "1% of the balance" nowhere in the source, so that reply is held back for an agent. The numbers are made up.

Real checks use a model or a scoring service. The rule is the same as this simplified version: no match in the source, no answer. This demo matches exact words, so it would also hold a correct paraphrase, which is why real checks score meaning.

Python
# A simplified grounding check for a bank's fee assistant. The numbers are made up.
SOURCE = "Early withdrawal fee on fixed deposits: 0.5% of the amount withdrawn. The fee applies in the first 12 months only."

def check(claims):
    for claim in claims:
        if claim in SOURCE:
            print("GROUNDED:", claim)
        else:
            print("NOT IN SOURCE, HOLD:", claim)

check([
    "0.5% of the amount withdrawn",
    "The fee applies in the first 12 months only.",
    "1% of the balance",
])

Output

GROUNDED: 0.5% of the amount withdrawn
GROUNDED: The fee applies in the first 12 months only.
NOT IN SOURCE, HOLD: 1% of the balance

Does grounding stop hallucinations completely?

No. A grounded answer is only as good as its source and the reading of it. The source can be old or wrong, the model can misread a line, and a true quote can still answer the wrong question. AWS's check is strict in one setting: in its classic tier, any information not stated in the source lowers the grounding score, even reasonable inferences.

  • “In generative AI, grounding is the ability to connect model output to verifiable sources of information.”

    Google Cloud

  • “Remember, although these techniques significantly reduce hallucinations, they don't eliminate them entirely.”

    Anthropic

Tip

Asked how you would prove an answer is grounded? Point to the exact line it came from, then say that a check flags any claim without one.

How would you ground an answer about an insurance claim?

A claims assistant at an insurer tells a customer whether a repair is covered. Grounding means it quotes the policy clause behind every yes or no. A clause from a different product, or one that changed last year, would make the answer grounded in the wrong text.

Tip

Say that grounding ties the answer to the source, so the source must be the right and current policy. Then say you would log the clause each answer used.

What does the interviewer want to hear?

A strong answer covers

  • A plain definition: the answer is tied to a source you can check.
  • How it differs from a hallucination, and what it cuts down.
  • The three parts: fetch the source, make it cite, check the claims.
  • A realistic case, such as a bank's fee answer.
  • Honest limits: a grounded answer can still be wrong or out of date.
  • Testing with real questions and keeping the source for each reply.

Common traps

  • Trap"Grounding means the model never makes mistakes."

    BetterIt cuts down wrong answers. It does not stop them, so test and check the claims.

  • Trap"Just add the documents to the prompt and we are done."

    BetterPassing text in is only the first step. Citations and a claim check matter too.

  • Trap"Grounding and RAG are the same thing."

    BetterRAG is one way to fetch sources. Grounding is the goal, and citations and checks serve it too.

Can you spot the grounded reply?

Spot the grounded reply

Your fixed-deposit bot may answer only from the 2026 fee schedule. Which reply is grounded in that schedule?

Quick check

A grounded bot still gave a wrong fee, because retrieval fetched last year's schedule. Which fix works?

Can you answer these from memory?

Flash cards · tap a card to flip it

1 / 6

What will they ask next?

  1. Q023What is a hallucination, and why does it happen?11 min
  2. Q219How do you detect hallucinations?12 min
  3. Q111What is RAG, and why use it?13 min
  4. Q134How do you reduce hallucinations in RAG?13 min
  5. Q135How do you add citations?11 min
  6. Q204What are guardrails?11 min

Learn it in depth

Last updated on 26 November 2026

Building a support bot that must answer from your documents?

Venkat designs and builds AI products and agents, including the UI and the system behind it. Book a short call and say what you need.