Skip to content
CrawlfolioSourced research on web data for AI
Menu

Explainer

Grounding vs RAG, and where web search fits in

Grounding vs RAG in plain terms: grounding is the goal, RAG and web search are routes to it. What each costs, how each fails, and which your app needs.

A metal stake driven into soil with a navy rope and a vermilion rope tied to it
AI-generated image · Made for this page

Grounding is the goal: connecting a model’s answer to sources you can check. RAG is one way to get there, using documents you index; web grounding is another, using a live search the model vendor runs for you.

So the real decision isn’t “grounding or RAG”. It’s which source of truth your questions need, and who runs the retrieval: you, your model vendor, or a search API you call yourself. Below is what each route is, what it costs per 1,000 questions, how it fails, and which one I’d pick for each kind of app.

Short on time?

Short on time? Here's my pick by question type

Answers live in your own documents
RAG, on Gemini File Search or OpenAI file search
Gemini File Search doesn't charge for storage or query embeddings. On OpenAI, file search is $2.50 per 1,000 calls.
Questions about today's web, with citations
The grounding tool of the model you already use
Gemini's Google Search grounding: 5,000 free a month, then $14 per 1,000 queries. OpenAI or Claude web search: $10 per 1,000 plus tokens.
Web results you need to keep or rerank
A search API you call yourself, feeding your RAG step
Brave at $5 per 1,000 for an independent index, or a SERP API such as apiserpent.com when you need Google's results.
A corpus under about 200,000 tokens
Skip RAG: put it in the prompt
That's Anthropic's guidance for knowledge bases of roughly 500 pages or less.
Regulated data
RAG inside your own boundary
Microsoft says Grounding with Bing Search data flows outside the Azure compliance and Geo boundary.

Prices verified . Sponsors cannot buy a verdict or a position.

This guide sits in my search API hub. It’s about which source of truth to ground on and who runs retrieval; whether one retrieval pass is enough or you need an agent that searches in a loop is a separate question, which I’ll cover in its own guide.

What’s the difference between grounding and RAG? #

Grounding names an outcome, and RAG names a method. Grounding means tying a model’s answer to sources you can check; RAG is one way to do it, retrieving passages from documents you index and adding them to the prompt. Web grounding is another way, where the model vendor runs a live search for you.

Google’s definition: “In generative AI, grounding is the ability to connect model output to verifiable sources of information.” (Google Cloud).

RAG is one way to do that. Microsoft calls it “a pattern that extends LLM capabilities by grounding responses in your proprietary content” (Microsoft). Notice the word “grounding” inside the definition of RAG: the two terms overlap by design.

Google makes the overlap explicit. Its list of grounding sources includes Google Search, Google Maps, Agent Search (which uses RAG), RAG Engine (“managed RAG service”), Elasticsearch, Web Grounding for Enterprise, Parallel web search, and “Your search API” (Google Cloud). Decagon, a vendor, puts it neatly: “All RAG implementations are forms of grounding, but grounding can be achieved through other means.” (Decagon).

Here’s how the terms line up, with who runs the retrieval in each case.

Term What it is Who runs retrieval Example
Grounding The goal: answers tied to checkable sources Anyone Any of the rows below
RAG Retrieve passages from a knowledge base, add them to the prompt, then generate You, or a hosted RAG tool Gemini File Search, OpenAI file search
Web grounding The model writes queries, the vendor runs a web search, the answer comes back with citations The model vendor Gemini’s Google Search grounding, OpenAI or Claude web search
Search API plus your own RAG You call a search API, fetch pages, and run the RAG step yourself You Brave or Perplexity Search feeding your pipeline
Document-grounded generation The whole document goes into the context window Nobody: there’s no retrieval Pasting a contract into the prompt

Sources: Google, Microsoft, Anthropic, J Pathol Clin Res.

That last row matters more than it looks. A 2025 letter in the Journal of Pathology: Clinical Research separates the two: document-grounded generation “is equivalent to inserting the entire document text into the context window”, while naive RAG passes only the “relevant parts” (Hewitt, Wiest, Kather).

Structured data is a fourth route the other pages raise. Alation’s guide focuses on grounding answers in governed, structured data such as SQL tables (Alation), and Google’s list includes Maps and Elasticsearch. If your question is “what’s this customer’s order status”, a direct lookup beats both RAG and web search.

How does RAG work, in plain terms? #

RAG gives the model a second memory it can look things up in. The 2020 paper that named it combined “the parametric memory”, a pre-trained model, with “the non-parametric memory”, which was “a dense vector index of Wikipedia, accessed with a pre-trained neural retriever” (Lewis et al.).

Anthropic’s plainer version: “RAG is a method that retrieves relevant information from a knowledge base and appends it to the user’s prompt” (Anthropic). You chunk your documents, embed them, search the index at question time, and paste the best chunks into the prompt.

Microsoft lists five hard parts, including understanding the query, keeping token counts down, and security. On that last one, its RAG overview is blunt: “Users and agents must only retrieve authorized content” (Microsoft). If different users may see different documents, your index has to enforce that.

You don’t have to build the index yourself. Two hosted tools do it for you:

  • Gemini File Search is the Gemini API’s managed RAG tool. It chunks (with configurable size and overlap), embeds and searches for you; storage and query-time embeddings are free, and indexing is billed at the Gemini Embedding rate of $0.15 per 1M tokens (Gemini Embedding 2 text is $0.20). Documents can be up to 100 MB, stores range from 1 GB (free tier) to 1 TB (tier 3), and Google suggests keeping a store under 20 GB for speed.

    Answers carry file_citation annotations, with page numbers for paginated files such as PDFs. Raw files are deleted after 48 hours; the embeddings have no expiry (File Search, pricing).

  • OpenAI file search retrieves “in a knowledge base of previously uploaded files through semantic and keyword search”, using vector stores, and returns file_citation annotations (OpenAI). It costs $2.50 per 1,000 calls, with storage at $0.10 per GB per day after the first free GB (OpenAI pricing). Its docs note that lowering max_num_results “can help reduce both token usage and latency, but may come at the cost of reduced answer quality”.

If your corpus is web pages you collect yourself, my guide to web scraping for RAG covers crawling and chunking.

What does web grounding do differently? #

The vendor runs the retrieval, over the live web, on the vendor’s terms. Microsoft’s Foundry docs describe the steps: the agent formulates a query, the tool runs the search on Bing, the agent synthesizes an answer, and it cites its sources with URLs (Microsoft Foundry).

It’s RAG-shaped (retrieve, then generate), but you don’t own the index, the ranking or the bill’s structure. Here’s how the four big tools compare.

Tool Whose search Citations you get back Domain control Price, verified 2026-11-16
Gemini: Grounding with Google Search Google url_citation annotations (URL, title, start and end index) plus search_suggestions HTML Not covered here 5,000 free a month on Gemini 3+, then $14 per 1,000 executed queries; 1,500 a day cap
OpenAI web_search Not stated on the page I read url_citation annotations, plus a sources list of every URL consulted Up to 100 allowed or blocked domains $10 per 1,000 calls plus search content tokens
Claude web search Not stated on the page I read Citations always on, with cited_text of up to 150 characters Allowed or blocked domains, not both $10 per 1,000 searches plus tokens
Microsoft Foundry: Web Search, Grounding with Bing Search, Bing Custom Search (preview) Bing Source attribution in the response Not covered here Grounding with Bing and Bing Custom Search: $14 per 1,000 transactions. Web Search: no per-query price on the pages I read

Sources: Gemini docs, Gemini pricing, OpenAI, OpenAI pricing, Claude, Microsoft Foundry, Bing pricing.

A few details change how these behave in practice:

  • The model decides whether to search. Gemini’s model decides whether to search and writes its own queries (Gemini). OpenAI’s tool_choice: "auto" makes search optional too (OpenAI).
  • Queries multiply on Gemini. On Gemini 3+ your project “is billed for each search query that the model decides to execute”, so two searches for one prompt count as “two billable uses of the tool for that request” (Gemini). Gemini 2.5 is still billed per grounded prompt, at $35 per 1,000 after 1,500 free a day (pricing).
  • OpenAI has a cache-only mode. Setting external_web_access: false limits search to cached content, and search context is capped at 128K (OpenAI).
  • Claude can filter results in code. On tool versions from 20260209, dynamic filtering runs code over the results before they reach the context (Claude). Results also count as input tokens in later turns, and failed searches aren’t billed.
  • Microsoft recommends Web Search over Grounding with Bing Search; both are generally available, and Bing Custom Search is in preview (Microsoft Foundry). Bing’s pricing page lists 150 transactions a second and 1 million a day (Bing).

Microsoft’s recommended tool is the one without a public price on the pages I read, so if you’re on Foundry, ask before you budget. For Gemini’s version in depth, including its display terms, see my Google Search grounding guide.

A long, weathered rubble-stone wall patched with old lime mortar and yellow lichen, dry vine stems hanging from the slate roof edge above and low green plants at its base
A wall someone else built and maintains: with web grounding the vendor owns the index and the ranking, and you work with how it was put together. Photo: T / Unsplash · Unsplash License

Where does a search API fit? #

It’s the third route: you call a search API yourself, fetch the pages you need, and run your own RAG step over them. Google even lists “Your search API” as a grounding source (Google Cloud), which shows Google sees it as grounding too.

This route wins when the hosted tools’ terms get in the way. Microsoft’s Bing page says grounding “Outputs are not directly accessible for use in other applications or programs” (Bing). If you need to store results, rerank them, mix them with your own documents, or hand them to a local model, you want results you hold yourself.

Your main options, verified 2026-11-16:

  • Perplexity Search API: ranked results “with titles, URLs, and extracted text; there is no generated answer”, at $5 per 1,000 requests or $1 with Fast Search (quickstart, pricing). If you’re moving off Sonar, my Perplexity API alternatives guide prices the replacements by job.
  • Brave Search API: $5 per 1,000 with a $5 monthly credit, from Brave’s own index. Storing results or using them for training needs a custom plan (Brave), so check that before you build a cache.
  • AWS AgentCore Web Search and Microsoft Web IQ: $7 per 1,000 queries each; Web IQ’s Browse is $1 per 1,000 (AWS, Web IQ).
  • A SERP API, when you need Google’s own results. apiserpent.com returns Google, Bing, Yahoo, DuckDuckGo or Brave results as parsed JSON with titles, URLs and snippets, and its docs say nothing about returning the pages themselves, so you still fetch them (docs). It costs $0.60 per 1,000 at the Default rate (the first deposit is $10 minimum) and down to $0.03 after a $1,250 deposit, with purchased credit that never expires (checked 24 November 2026: pricing, FAQ). The catches: there’s “No public SLA” for pay-as-you-go accounts, its terms make you indemnify the vendor, and its pricing page now warns that prices may rise from December 2026, so recheck before you budget.

The trade is more work for more control: you write the fetching, chunking and prompting that the hosted tools do for you. My guide to LLM web search versus a search API walks through the total-cost method, and search vs fetch vs browser covers what to do once you have the links.

What does each route cost per 1,000 questions? #

Web grounding on current models costs $10 to $14 per 1,000 searches in tool fees; hosted RAG over your own files costs less per question; a search API you call yourself ranges from under $1 to $7 per 1,000, before fetching and tokens.

Route Unit price, verified 2026-11-16 What’s extra
Gemini 3+ Google Search grounding 5,000 free a month, then $14 per 1,000 executed queries; 1,500 a day cap Model tokens
Gemini 2.5 grounding 1,500 free a day, then $35 per 1,000 grounded prompts Tokens
OpenAI web_search $10 per 1,000 calls Search content tokens and model tokens
Claude web search $10 per 1,000 searches Results billed as input tokens, also on later turns
Grounding with Bing Search (Foundry) $14 per 1,000 transactions Azure model usage
Foundry Web Search (Microsoft’s recommended tool) No per-query price on the pages I read Azure model usage
AWS AgentCore Web Search, Microsoft Web IQ Web $7 per 1,000 Your model
OpenAI file search (hosted RAG) $2.50 per 1,000 calls $0.10 per GB a day after 1 GB; tokens
Gemini File Search (hosted RAG) No per-query fee; indexing at $0.15 per 1M embedding tokens Retrieved tokens; storage free
Search API you call, then your own RAG Perplexity Search $5 ($1 Fast), Brave $5, apiserpent.com $0.03 to $0.60 per 1,000 (checked 2026-11-24) Page fetching (SERP APIs return snippets and links only); your model

Sources: Gemini pricing, OpenAI pricing, Claude, Bing, Microsoft Foundry, AWS, Web IQ, Perplexity, Brave, apiserpent.com.

Here’s a worked example. The volumes are my assumptions, not measurements: 10,000 questions a month, one search or retrieval per question, tool fees only, before tokens.

  • Gemini 3+: (10,000 − 5,000 free) × $14 ÷ 1,000 = $70. If the model runs two queries per question: (20,000 − 5,000) × $14 ÷ 1,000 = $210. That’s about 667 queries a day, under the 1,500 cap.
  • OpenAI or Claude web search: 10,000 × $10 ÷ 1,000 = $100 each, plus tokens.
  • Grounding with Bing Search: 10,000 × $14 ÷ 1,000 = $140.
  • AgentCore or Web IQ: 10,000 × $7 ÷ 1,000 = $70.
  • Brave, then your own RAG: 10,000 × $5 ÷ 1,000 = $50, minus the $5 monthly credit = $45. Perplexity Fast Search would be $10. apiserpent.com at its Default rate would be 10,000 × $0.60 ÷ 1,000 = $6, for snippets only, with fetching full pages on top and a Default cap of 10,000 calls a day.
  • Hosted RAG on OpenAI: 10,000 × $2.50 ÷ 1,000 = $25, plus a 5 GB store at (5 − 1) × $0.10 × 30 = $12, so $37 plus tokens.
  • Hosted RAG on Gemini File Search: no per-query fee. Indexing a 20-million-token corpus once costs 20 × $0.15 = $3.00, and storage is free.

That’s my calculation on list prices verified 2026-11-16. The pattern: answering from your own documents is cheap per question, while web grounding’s tool fee is the bigger line. A search API you call yourself is the cheapest web route on fees but moves the work, and the fetch costs, onto you.

How does each one fail? #

Differently, and that’s the most useful thing to know before you choose. RAG fails quietly inside your pipeline; web grounding fails inside someone else’s.

RAG over your documents Web grounding from the model vendor
Missing content answered anyway. The first of seven failure points in Barnett et al.: the answer isn’t in your corpus, and the model replies regardless The model doesn’t search. Foundry’s troubleshooting lists “No citations in response” when “The model generated a response without using search results”
The right chunk ranks too low, or never makes it into the context Queries multiply. On Gemini 3+ each executed query is billed
Stale index. It only knows what you last indexed Your data leaves the boundary. For Grounding with Bing, the DPA doesn’t apply and data “flows outside the Azure compliance and Geo boundary”
Access control gaps. Users must only retrieve content they’re allowed to see Reuse limits. Bing grounding outputs can’t be used in other applications
Can only be validated in operation, per Barnett et al. Display duties. OpenAI says you “must show inline citations as prominent, clickable links”

Sources: Barnett et al., Microsoft RAG, Microsoft Foundry, Gemini, Bing, OpenAI.

The Seven Failure Points study is worth reading whole. Its list runs from FP1 Missing Content and FP2 Missed the Top Ranked Documents through Not in Context, Not Extracted, Wrong Format and Incorrect Specificity to FP7 Incomplete. Its authors conclude that “validation of a RAG system is only feasible during operation” and that a RAG system’s robustness “evolves rather than designed in” (Barnett et al.).

On Microsoft’s data boundary, the exact wording matters for compliance teams: “The Microsoft Data Protection Addendum doesn’t apply to data sent to Grounding with Bing Search”, the tools “don’t respect VPN or private endpoints”, and “your data flows outside the Azure compliance and Geo boundary” (Microsoft Foundry). The same page’s comparison table says data from the recommended Web Search tool also flows outside the Azure compliance boundary. That’s why my pick for regulated data is RAG you run inside your own boundary.

Citations don’t prove much on either side. OpenAI’s sources field lists “the complete list of URLs the model consulted”, which is often longer than the citations (OpenAI). Fini, a vendor, sums it up: “A citation proves retrieval happened, not that the answer used it” (Fini).

Does retrieval help at all? On hard questions, yes. The FRAMES benchmark reports “0.40 accuracy with no retrieval” rising to “0.66 (>50% improvement)” with a multi-step retrieval pipeline, on multi-hop questions (Krishna et al.). And retrieval failures can be reduced: Anthropic reports its Contextual Retrieval cut top-20 retrieval failures from 5.7% to 1.9% with reranking, though those are its own numbers (Anthropic).

What I couldn’t find is any independent accuracy comparison of Google’s, OpenAI’s, Anthropic’s and Microsoft’s grounding tools. If you need to measure your own, Alation’s guide suggests metrics such as groundedness, context precision and citation accuracy (Alation).

Close-up of a dry-stone wall of flat brown stones speckled with pale lichen, with small wedge stones packed into the gaps between courses
Every gap in a dry-stone wall is a place it can shift: each route has its own weak points, and most only show once the system carries real load. Photo: John Kinnander / Unsplash · Unsplash License

Which one does your app need? #

Decide by where the answer lives: in your own documents (RAG), on the live web (web grounding or a search API), or both. Here’s what I’d pick for each kind of question, on the evidence above.

Your questions are about My pick Why
Your own docs, tickets or policies RAG: Gemini File Search, or OpenAI file search if you’re on OpenAI; your own index if you need per-user access control Web search can’t see private content
A small corpus, under about 200,000 tokens Put it all in the prompt Anthropic’s guidance: below roughly 500 pages, skip retrieval
What’s true on the web today, with citations The web grounding tool of the model you use: Gemini Google Search, or OpenAI or Claude web search One call, citations built in
Web data you must store, rerank or feed a local model A search API you call yourself (Brave for an independent index; a SERP API for Google’s results), then your own RAG Hosted tools restrict reuse
Regulated data that must stay in your boundary RAG inside your boundary; avoid Foundry’s Bing-backed web tools Microsoft’s DPA and Geo boundary warning
Both private and live facts RAG first, with web grounding as a fallback tool Covers both sources of truth

Sources: Anthropic, Microsoft RAG, Microsoft Foundry, Bing, Brave.

If you’re still choosing which search API to call, my guide to web search APIs compares them by job.

What I would do #

I’d start with the question log. If most questions are about our own documents, I’d ship RAG first, on whichever hosted file search matches the model we already use, and add web grounding only as a tool the model can call when the documents don’t have the answer.

If the questions are about the live web and I don’t need to keep anything, I’d use the grounding tool built into my model. If I need to store or rerank the results, I’d call a search API myself and feed my own RAG step.

FAQ

What is grounding in an LLM?

Grounding means connecting a model's answer to sources you can check. Google defines it as 'the ability to connect model output to verifiable sources of information'. RAG over your own documents and web search grounding are two ways to do it.

Is RAG a type of grounding?

Yes. Google defines grounding as connecting model output to verifiable sources and lists its managed RAG Engine as one grounding source. Microsoft describes RAG as 'grounding responses in your proprietary content'. Grounding is the goal; RAG is one technique for reaching it.

Does grounding stop hallucinations?

No. It gives the model sources to work from, but each route still fails in known ways: a RAG system can answer when the right content is missing, and a web grounding tool can answer without searching at all. A citation shows retrieval happened, not that the answer used it. I found no independent accuracy comparison across the big vendors' grounding tools.

Is Grounding with Google Search just RAG over the web?

It has the same shape: retrieve, then generate. The difference is who runs it. With Google Search grounding, the model decides whether to search and writes the queries, Google runs them on its own index, and on Gemini 3 and later you pay for each query executed.

When should I use a search API instead of a grounding tool?

When you need to keep, rerank or reuse the results, or feed them to a model the vendor doesn't host. Microsoft's Bing pricing page says grounding outputs 'are not directly accessible for use in other applications or programs'. A search API you call yourself returns results you can pass into your own RAG step, subject to that API's own terms: Brave, for example, needs a custom plan for storage.

Can I combine RAG and web grounding?

Yes. Google lists both Google Search and its RAG Engine as grounding sources, and nothing in the docs I read forces you to pick one. A common shape is RAG over your own documents first, with a web grounding tool the model can call when the answer isn't there.

What does web grounding cost per query?

Verified 2026-11-16: Gemini 3 and later get 5,000 free search queries a month, then $14 per 1,000 executed queries; OpenAI's web search is $10 per 1,000 calls plus search content tokens; Claude's is $10 per 1,000 searches plus tokens; Microsoft's Grounding with Bing Search is $14 per 1,000 transactions. I found no published per-query price for Microsoft's recommended Foundry Web Search tool.

Do I need a vector database for RAG?

Not necessarily. Hosted tools such as Gemini File Search and OpenAI file search handle chunking, embeddings and search for you. You'd run your own index when you need control, for example making sure users only retrieve content they're allowed to see. And if your whole corpus is under about 200,000 tokens, Anthropic suggests skipping retrieval and putting it in the prompt.

Sources

28 sources, accessed to .

Official pricing, docs, changelogs and status pages 21

  1. Google Cloud: grounding overview (Vertex AI) docs.cloud.google.com · accessed
  2. Microsoft: RAG in Azure AI Search learn.microsoft.com · accessed
  3. Microsoft Foundry: web grounding tools overview learn.microsoft.com · accessed
  4. Microsoft: Grounding with Bing Search pricing microsoft.com · accessed
  5. Gemini API: grounding with Google Search aistudio.google.com · accessed
  6. Gemini API pricing aistudio.google.com · accessed
  7. Gemini API: File Search aistudio.google.com · accessed
  8. OpenAI docs: web search tool developers.openai.com · accessed
  9. OpenAI API pricing (tools) developers.openai.com · accessed
  10. OpenAI docs: file search tool developers.openai.com · accessed
  11. Anthropic: Claude web search tool platform.claude.com · accessed
  12. Anthropic: Contextual Retrieval (Sep 19, 2024) anthropic.com · accessed
  13. Perplexity Search API quickstart docs.perplexity.ai · accessed
  14. Perplexity API pricing docs.perplexity.ai · accessed
  15. Brave Search API plans brave.com · accessed
  16. Amazon Bedrock AgentCore pricing aws.amazon.com · accessed
  17. Microsoft Web IQ microsoft.com · accessed
  18. apiserpent.com pricing apiserpent.com · accessed
  19. apiserpent.com API docs apiserpent.com · accessed
  20. apiserpent.com FAQ apiserpent.com · accessed
  21. apiserpent.com terms (31 October 2026) apiserpent.com · accessed

Other blogs 3

  1. Decagon glossary: AI grounding vs RAG (vendor) decagon.ai · accessed
  2. Alation: AI grounding techniques and metrics (vendor, Aug 24, 2026) alation.com · accessed
  3. Fini glossary: AI grounding vs RAG (vendor) usefini.com · accessed

Last updated: 16 November 2026. Researched and drafted with AI tools; human editorial review and publication approval are pending.

What readers say

Used one of the tools in this guide? Tell other readers how it went. I read every review before it goes up, and I never turn one down for being negative. How reviews work.

No reader reviews yet. Yours could be the first.

Write a review
Your rating

What did you use it for, what worked, and what didn't? 30 to 1500 characters. Please don't include links.

Your connection to the company

Your review appears with the name you enter, after I approve it. I don't ask for your email. Privacy.