Definition
LLM grounding via search API is the pattern of running a search query before an LLM completion, then formatting the search results as numbered sources in the LLM's prompt with explicit citation instructions, so the LLM's answer is bound to the retrieved sources rather than its training data.
In Depth
Grounding addresses three LLM failure modes: hallucination (made-up facts), staleness (training-cutoff drift), and unverifiability (no source to check). Local LLMs (Qwen 9B-35B, Llama-3, DeepSeek) are more sensitive to source quality than cloud LLMs because their context windows are tighter — wasted tokens on HTML noise compress signal. Typed JSON from a search API (Scavio's organic_results, Tavily's results) reduces context waste vs raw HTML by ~10x. The grounding prompt typically: (1) lists numbered sources [1] [2] [3]...; (2) instructs answer with [N] markers per claim; (3) tells the LLM to abstain ('I don't know based on these sources') if unsupported. An r/LocalLLaMA post in April 2026 documented Qwen hallucination fixes via this pattern.
Example Usage
A local LLM agent using raw scraped HTML for grounding hallucinated 18% of factual claims on a 100-question benchmark. Switching to Scavio typed JSON sources + an explicit citation prompt dropped hallucination to <3% on the same benchmark.
Platforms
LLM Grounding via Search API is relevant across the following platforms, all accessible through Scavio's unified API:
Related Terms
Typed JSON Search API
A typed JSON search API is a search endpoint that returns results as a typed JSON document — fields named, types consist...
Structured Search Output
Structured search output is the typed JSON returned by a search API — title, snippet, link, position, timestamp — that f...
AI Overview Citation
An AI Overview citation is a link in the citation list Google's AI Overview surfaces alongside its generated answer; bra...