The direct answer
A language model answers from patterns it learned during training — which means it can confidently state things that aren't true. Grounding is the fix: before (or while) answering, the AI looks something up. It searches the web, checks your documents, or queries a database, and builds its answer from what it found.
The result is an answer with receipts. Instead of "trust me," you get specific claims you can click through and verify for yourself. Google's Gemini API describes grounding exactly this way: responses based on real-world information, with citations linking each claim to its source.
How it works
The most common form is search grounding. You ask a question with grounding turned on, and the model first decides whether a search would help. If yes, it writes its own search queries, runs them, reads the results, and writes an answer with inline citations pointing at specific sources. The whole loop is automatic — you ask once, and the model handles the searching, reading, and citing.
A second form is document grounding: you hand the model specific documents — a contract, a manual, a research paper — and it answers only from those. Anthropic's Citations feature works this way: the document is split into sentences, and the model's answer points to the exact sentences and pages it used. Same idea, different source: the web for freshness, your documents for precision.
A simple example
Imagine you ask an AI, "What was the closing price of Tesla stock yesterday?" Without grounding, it can only answer from its training data — which may be months old — so it either declines or guesses. With grounding, it runs a web search, finds yesterday's market data, and answers with the number plus a link to the source.
If the answer is wrong, you can see exactly where the wrong number came from. That checkability — not perfection — is the whole point of grounding.
Why it matters
Grounding is the main practical answer to hallucinations. A model answering from memory invents details when it's unsure; a grounded model can check instead. It also fixes the freshness problem: a model's training has a cutoff date, but a live search doesn't.
For anything where accuracy matters — customer support, financial summaries, legal research — grounded answers change the workflow from "verify everything yourself" to "click the citations that matter." It doesn't remove your responsibility, but it gives you something to check instead of a wall of confident, sourceless text. And when the answer conflicts with what you expected, the citations tell you whether the model found something you missed or read something wrong.
The common misunderstanding
The dangerous one: a grounded answer is not automatically a true answer.
Grounding makes claims checkable — it doesn't make them correct. The sources can be wrong, outdated, or irrelevant, and the model can still misread them. A citation next to a sentence proves the model looked something up, not that it looked up the right thing. Treat grounded answers as a head start on verification, not a replacement for it.
What changed recently
Grounding used to be something developers built by hand, with careful prompt engineering. It has since become a built-in feature: Google's Gemini API offers grounding with Google Search as a standard tool that returns inline citations automatically, and Anthropic's API offers citations that link answers to exact sentences in the documents you provide.
The trend is clear — checking sources is moving from a power-user technique into the default behavior of AI products. Expect more assistants to show you their sources as a matter of course, and judge them by the quality of those sources, not just the polish of the answers.
Try it on PlainLogic
The AI Lab on PlainLogic shows how assistants pull in outside information — and Hallucination Hunt is a game built around exactly this problem: spotting when an AI's claims don't have real sources behind them.