Grounding an LLM in Wikipedia: we tested DeepSeek, Gemma 4 and gpt-oss on 45 questions
Wikipedia's own search makes AI models no better at rare facts. WikiVectors makes them nearly 3 times better.
Rare facts answered right
Average of DeepSeek, Gemma 4, gpt-oss-20b and gpt-oss-120b
Also: this year's news went from 0% to 100%, and made-up answers fell from 35% to 2%.
Want the version that found 3x more rare facts?
WikiVectors is English Wikipedia, split into paragraphs and searchable by meaning, updated within the hour. One call returns the 5 best paragraphs for a plain-English question, each with its link and revision. Drop them in your prompt.
What did we test?
45 questions in three groups of 15, each with a known right answer:
- Common facts, like "In what year did the Berlin Wall fall?"
- Rare facts from small Wikipedia pages, like "Which region did Lloyd Quinan represent as an MSP from 1999 to 2003?"
- 2026 news, after every model's training cutoff, like "Who won the 2026 Tour de France?"
Each question was asked three ways, with the same model and the same short prompt ("answer in as few words as possible; if you are not sure, say I don't know"):
- Alone: the model answers from memory.
- Wikipedia search: Wikipedia's search API, then the top 3 pages' text, 4,000 characters each. These are LangChain's
WikipediaRetrieverdefaults, so this is what many apps do today. - WikiVectors: one search call, the top 5 paragraphs.
Models, all through OpenRouter: DeepSeek V4.1 Flash, Google Gemma 4 31B, and OpenAI's gpt-oss-20b and gpt-oss-120b. We ran it on 26 November 2026, then ran the WikiVectors column again on 27 November after we added a reranker to our search (more on that below). The code and every answer are below.
Which way found the most rare facts?
Right answers out of 15 rare-fact questions:
| Model | Alone | Wikipedia search | WikiVectors |
|---|---|---|---|
| DeepSeek V4.1 Flash | 6 | 3 | 12 |
| Gemma 4 31B | 3 | 4 | 12 |
| gpt-oss-20b | 3 | 4 | 12 |
| gpt-oss-120b | 5 | 4 | 12 |
Grounding with Wikipedia's own search did no better than no grounding at all on rare facts. The model was fine; the search was the problem. Look at what each one handed the model:
| Rare-fact questions | Wikipedia search | WikiVectors |
|---|---|---|
| Answer was in the text sent to the model | 5 of 15 | 13 of 15 |
| Search returned nothing at all | 4 of 15 | 0 of 15 |
| Text sent to the model, average | 6,500 characters | 2,500 characters |
| Median time, search + answer | 1.5 s | 0.8 s |
Why does Wikipedia's search miss them?
Wikipedia's search is a keyword search built for people typing a few words. Give it a whole question and it looks for pages with all of those words. Small pages rarely have them all. "With which logician did Francisco Dória prove that chaos theory is undecidable?" got zero results. "In which German town was computer scientist Kristian Kersting born?" returned a list of Nobel Prize nominees.
WikiVectors searches paragraphs by meaning, and it gives a page a boost when the question names it. Both questions got the right page first: Francisco Dória and Kristian Kersting.
You could rewrite each question into keywords first, with another model call. That adds time and cost, and the rewrite can drop the one rare name that mattered.
Does grounding stop made-up answers?
Mostly, yes. These are wrong answers on the 15 rare facts, not counting "I don't know":
| Model | Alone | Wikipedia search | WikiVectors |
|---|---|---|---|
| DeepSeek V4.1 Flash | 0 | 0 | 0 |
| Gemma 4 31B | 8 | 3 | 0 |
| gpt-oss-20b | 6 | 2 | 0 |
| gpt-oss-120b | 7 | 2 | 1 |
Real answers from that run, for the same questions:
| Question | Alone | WikiVectors |
|---|---|---|
| Arnold F. Riedhammer is principal percussionist of which orchestra? | Berlin Philharmonic (gpt-oss-120b) | Munich Philharmonic |
| Tewa author Gregory Cajete is from which pueblo? | Jemez Pueblo (gpt-oss-120b) | Santa Clara Pueblo |
| The plant genus Leucocroton is endemic to which country? | Madagascar (Gemma 4) | Cuba |
| Who was the first Portuguese tennis player to reach the ATP top 100? | João Cunha e Silva (gpt-oss-120b) | Nuno Marques |
DeepSeek alone made nothing up: it said "I don't know" 9 times. Grounded, it answered 12. So grounding helps careful models too: it turns "I don't know" into a right answer.
What about news from this year?
No model knew any of the 15 events from 2026. Every one said "I don't know" (gpt-oss-20b guessed wrong twice). Grounded:
| Model | Alone | Wikipedia search | WikiVectors |
|---|---|---|---|
| DeepSeek V4.1 Flash | 0 | 15 | 15 |
| Gemma 4 31B | 0 | 15 | 15 |
| gpt-oss-20b | 0 | 14 | 15 |
| gpt-oss-120b | 0 | 15 | 15 |
Here Wikipedia's search did well too: big news events have big pages that match any wording. Both got the answer to the model nearly every time, but WikiVectors sent 2,600 characters instead of 11,900, about 5 times fewer tokens. On common facts the models alone already knew 14 or 15 of 15, so grounding added little there.
In the first run on 26 November, WikiVectors missed 2 of these (the Tour de France and the UK Prime Minister): the right paragraph was in our top 40 but not our top 5. So we added a reranker, a second model that reads the best 40 paragraphs and puts the ones that answer the question first. With it, every model got all 15. More on models and this year's news in LLM knowledge cutoff: why your AI doesn't know 2026.
What does it cost?
Per 1,000 questions, model cost plus search cost:
| Alone | Wikipedia search | WikiVectors | |
|---|---|---|---|
| Model (Gemma 4 31B, rare facts) | $0.01 | $0.21 | $0.08 |
| Search | $0 | $0 | $2.00 |
Wikipedia's API is free; we are not. You pay $2 per 1,000 searches after the first 1,000 each month, and save on tokens because the text is shorter. If your questions are mostly about big topics, Wikipedia's search may be enough. If they touch small pages, people, places or anything rare, it misses most of them.
How do I ground my own model?
One search, then put the paragraphs in the prompt. This is the code we ran, standard library only:
import json, os, urllib.request def wikivectors_context(question): req = urllib.request.Request( "https://wikivectors.com/v1/search", json.dumps({"query": question, "limit": 5}).encode(), {"Authorization": "Bearer " + os.environ["WIKIVECTORS_KEY"], "Content-Type": "application/json"}) results = json.load(urllib.request.urlopen(req))["results"] return "\n\n".join( f"Page: {r['title']} ({r.get('section') or 'intro'})\n{r['text']}" for r in results) question = "Which region did Lloyd Quinan represent as an MSP from 1999 to 2003?" messages = [ {"role": "system", "content": "Answer the question in as few words as possible, using only " "the context. If the context does not contain the answer, answer: I don't know."}, {"role": "user", "content": f"Context:\n{wikivectors_context(question)}\n\nQuestion: {question}"}, ] # send messages to any chat model: OpenRouter, OpenAI, a local model in LM Studio...
gpt-oss answered: West of Scotland region. Alone, it said Central Scotland.
Each result also carries url, permalink (the exact revision) and license, so your app can cite its source. Want the model step done for you? /v1/answer returns a short answer with its sources, or says it doesn't know. Using Claude, Cursor or another MCP client? Add our MCP server and the model searches on its own.
How fair is this test?
- It is small. 15 questions per group. Treat the numbers as a strong hint, not a benchmark.
- We wrote the questions. The rare facts come from small Wikipedia pages, each with one clear answer. We fixed a WikiVectors search bug the first run found (names in long questions) before this run. Wikipedia's search got no second chance.
- The WikiVectors column was run twice. First on 26 November, then on 27 November after we added the reranker. The tables show the second run; the Alone and Wikipedia search columns are from the first. Before the reranker, WikiVectors got 9 to 12 rare facts and 13 news questions per model, with 4 wrong answers in all. Both runs are in the zip.
- WikiVectors still misses some. On 2 rare facts (who wrote the sitcom The Lady Is a Tramp, and who designed The Leys in Elstree) the answer was not in our top 5, so the models rightly said "I don't know". gpt-oss-120b made one answer up when its context didn't hold the answer.
- The Wikipedia setup is the common default (LangChain's top 3 pages, 4,000 characters each), not the best you could build.
- Thinking was off for DeepSeek and Gemma, and set to low for gpt-oss, which can't turn it off. Answers were capped at 60 tokens (1,000 for gpt-oss, to leave room for its thinking).
- An answer counted as right if it contained the expected name or number.
OPENROUTER_API_KEY, WIKIVECTORS_KEY and MODEL, then run python3 grounding_test.py.Wikipedia for your AI app, without the limits
WikiVectors searches all of English Wikipedia and returns short, cited paragraphs, fresh within the hour. 1,000 free searches a month, then $2 per 1,000.
More guides
- LLM knowledge cutoff: why your AI doesn't know 2026, and how to fix itWhat a knowledge cutoff is, the real cutoffs of gpt-oss, Gemma 4 and DeepSeek, and a 15-line fix: four models went from 0 to 15 of 15 on this year's news with one Wikipedia search.
- LM Studio and Wikipedia: give your local model this year's news with MCPConnect WikiVectors to LM Studio as an MCP server so a local model answers current events from today's Wikipedia. Gemma 4 12B went from 0 to 8 of 8. Setup, system prompt, real answers.
- Wikipedia API rate limits in 2026, and how to fix 403 and 429 errorsWikipedia's API limits per minute, why you get 403 Forbidden or 429 Too Many Requests, how to fix them, and how to skip the limits for read-only use.