Why does a chatbot with search cite the wrong page?
Web search and grounding: snippets in, a link per sentence out · Beginner · 5 min · rag, agents · after RAG vs fine-tuning, Hallucination
A chatbot with web search sends a query, reads short snippets from a few results and writes from them. Each link marks the snippet that best matches a sentence, which is not proof the page says it.
1 Guess first
2 Look
Search, write, link
1 / 3“How tall is the Eiffel Tower?” → 10 results
- 1Eiffel Tower · The Eiffel Tower (/ˈaɪfəl/ EYE-fəl; French: Tour Eiffel [tuʁ ɛfɛl] ) is a lattice tower on the Champ de Mars in Paris, France. It is named after the engineer
- 2Amazon Tall Tower Observatory · processes. The tall research tower is one metre taller than the Eiffel Tower and is currently the tallest structure in South America. All towers are equipped
- 3Gustave Eiffel · for the French railway network, most famously the Garabit Viaduct. He is best known for the Eiffel Tower, designed by his company and built for the 1889
- 4Tianducheng · 2007 (19 years ago) (2007). Its central feature is 108-metre-tall (354-foot) replica of the Eiffel Tower, French-style radiating avenues, neoclassical buildings
- 5Eiffel (film) · completed thousand-foot (300 metre) iron tower he has designed and constructed – the Eiffel Tower. September 1886 – Eiffel receives an award for his groundbreaking
- 6Blackpool Tower · Tower was the tallest man-made structure in the British Empire. Inspired by the Eiffel Tower in Paris, France, it is 518 feet (158 metres) tall and was
- 7Gliwice Radio Tower · connectors. It's the tallest wooden structure in the world. It was nicknamed "the Silesian Eiffel Tower" by the local population. The tower has four platforms
- 8ArcelorMittal Orbit · pedestal. The media picked up the apparent intention to cast the Orbit as London's answer to the Eiffel Tower, which is 324 metres (1,063 ft) tall. The Guardian
- 9CN Tower · The CN Tower (French: Tour CN) is a 553.3-metre-high (1,815.3 ft) communications and observation tower in Toronto, Ontario, Canada. Completed in 1976,
- 10Berlin Radio Tower · protected monument. The tower is built as one large steel framework construction, similar to the Eiffel Tower in Paris. The 150-metre-high (490 ft) and
Heights in the snippets: 108 · 300 · 158 · 324 · 553.3 · 150 m. The tower’s real height, 330 m, is in none.
search: Wikipedia API, top 10 of 304 · links: closest snippet by all-MiniLM-L6-v2 cosine · answer drafted by Claude Opus 5.5 · measured 2026-10-23
The search hands the model 10 snippets: 254 words out of 37,012. Six heights, none of them right.
The search hands the model a few short snippets; each link marks the snippet that reads most like a sentence, which need not be the one that says it.
Real tools work like this, bigger. The model writes search queries (the words it sends to a search engine); Claude’s docs say a simple fact takes 1 to 3 searches. Results come back as titles, links and short extracts. Then each citation is pinned to a span of the answer: Claude quotes up to 150 characters per citation.
4 You are the model
You attach the links. For four sentences of the answer, pick the result whose snippet all-MiniLM-L6-v2 finds most alike, as the picture did.
you attach the links · pick the result whose snippet reads most like the sentence
“The Eiffel Tower is a lattice tower on the Champ de Mars in Paris, France.”
search: Wikipedia API, top 10 of 304 · links: closest snippet by all-MiniLM-L6-v2 cosine · answer drafted by Claude Opus 5.5 · measured 2026-10-23
You attach the links. Which snippet reads most like this sentence?5 Check
Not just this demo. Stanford researchers audited four AI search engines in 2023: 51.5% of sentences were fully backed by their citations, and 74.5% of citations backed their sentence. In 2025, eight AI search tools gave wrong answers for over 60% of 1,600 queries asking where a news excerpt came from. So open the link and find the sentence.
7 Say it back
8 Mission · 5 min
In Google AI Studio (free, no card) pick Gemini 2.5 Flash and turn on Grounding with Google Search (free up to 500 requests a day). Ask “How tall is the Eiffel Tower?”, then a question about this week’s news. Open each source link and search the page (Ctrl+F) for the number or phrase it is pinned to. Does every link say its sentence?
Three quick ones
Drawn at random from this lesson's pool; different next time.
Done?
Go deeper
Sources
- Search: Wikipedia’s keyless search API (https://en.wikipedia.org/w/api.php, list=search, srlimit=10) for “how tall is the eiffel tower” on 2026-10-23 by scripts/explain-data/web-search.ts: 304 hits; top 10 Eiffel Tower, Amazon Tall Tower Observatory, Gustave Eiffel, Tianducheng, Eiffel (film), Blackpool Tower, Gliwice Radio Tower, ArcelorMittal Orbit, CN Tower, Berlin Radio Tower; snippets 254 words, pages 37,012 words (0.7%); snippet heights 108, 300, 158, 324, 553.3, 150 m. Snippets are Wikipedia text (CC BY-SA 4.0)
- Eiffel Tower article lead (prop=extracts, exintro), same day: “The tower is 330 metres (1,083 ft) tall” (paragraph 3); “the most visited monument with an entrance fee in the world” (paragraph 2)
- The answer’s four sentences were drafted by Claude Opus 5.5 on 2026-10-23 from the 10 snippets (prompt in scripts/explain-data/web-search.ts); “most visited” is from the model’s memory, in no snippet
- Links: each sentence goes to the snippet with the highest cosine similarity, sentence-transformers/all-MiniLM-L6-v2 (plain TS forward pass of scripts/explain-data/semantic-search.ts, --check matches the published 0.6660/0.1046/0.1411). Matching by similarity is one way tools attach links; real tools use their own models. Scores: where → Eiffel Tower 0.938; built → Gustave Eiffel 0.735; height → Tianducheng 0.782 (Blackpool Tower 0.780, ArcelorMittal Orbit 0.632, Eiffel Tower 0.622); visits → Berlin Radio Tower 0.647. Lead paragraphs vs the question: 0.681, 0.609, 0.760, 0.663
- https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool (checked 2026-10-23): “Simple factual queries typically use 1–3 searches”; citations are always enabled; cited_text is “Up to 150 characters of the cited content”; $10 per 1,000 searches
- https://ai.google.dev/gemini-api/docs/google-search (last updated 2026-10-13): the model “automatically generates one or multiple search queries and executes them”; each url_citation annotation links a text segment (start_index, end_index) to a source URL
- https://ai.google.dev/gemini-api/docs/pricing (last updated 2026-10-22): Grounding with Google Search on Gemini 2.5 Flash and Flash-Lite, free tier “Free of charge, up to 500 RPD” (shared); aifree.dev catalog google-gemini-developer-api-free-tier lists the same 500 RPD
- Liu, Zhang, Liang, “Evaluating Verifiability in Generative Search Engines” (2023, https://arxiv.org/abs/2304.09848): four engines; “a mere 51.5% of generated sentences are fully supported by citations and only 74.5% of citations support their associated sentence”
- Jaźwińska and Chandrasekar, Columbia Journalism Review Tow Center, 2025-03-06: eight generative search tools, 1,600 queries (excerpt → headline, publisher, date, URL); “incorrect answers to more than 60 percent of queries”; Perplexity 37%, Grok 3 94%
Published Oct 23, 2026 · updated Oct 23, 2026