Tools · AI Search Simulator

AI Search Simulator

The AI Search Simulator is a retrieval testing app I built in Streamlit on top of a Qdrant vector database. It indexes a site (and its competitors) passage by passage, the way an AI search system would, then shows which passages get retrieved for a query, which pages an AI Overview most likely pulled from, and how a draft would hold up against the content already out there.

Book a Discovery Call

AI Search Simulator search tab in AI Overview mode for the query How does Google AI Mode use query fan-out with Gemini to retrieve passages for AI Overviews, showing 4 results with counts of 0 Strong, 1 Likely, 3 Possible, and 1 unique domain, a dynamic score bar chart, and the top result from the AI Mode Query Fan-Out Analyzer page with a dynamic score of 0.8048 labeled Likely, base score 0.677, overlap 7.8%, and entity coverage 80%.
A search against 20 pages from this site. The top passage comes from my Query Fan-Out Analyzer page: a base cosine score of 0.677, lifted to 0.805 by entity coverage and word overlap.

Why Build an AI Search Simulator?

Rankings don’t tell you whether you’re retrievable. AI Overviews, AI Mode, ChatGPT, and Perplexity all work on some version of retrieval-augmented generation: find the passages that best match the query in embedding space, then write an answer from them. If none of your passages make the retrieval cut, it doesn’t matter where the page ranks in the blue links.

I started testing this in Google Colab, which I wrote up in Analyzing AI Overview Results With Vector Databases. The notebook worked but it didn’t scale to client work, where I need dozens of competing pages indexed and queryable in the same place. So it became an app.

How Are Sites Indexed for the Simulation?

For a target topic, I import every page ranking on the first page of Google (often the second page too), plus every URL linked in the AI Overview and AI Mode answers. That’s the real competitive set: the pages Google already ranks and the ones AI search already cites. The Importer takes them as a list of URLs or XML sitemaps (sitemap index files get followed recursively), and each page goes through four steps before it’s searchable.

StepWhat happensWhy it matters
FetchPages are loaded with JavaScript executed.Single-page apps get indexed as users see them, not as an empty shell.
CleanScripts, styles, nav, header, and footer are stripped and the HTML is converted to Markdown.Boilerplate repeated on every page would otherwise match every query.
ChunkLayout-aware chunking keeps each heading with the content under it and keeps tables and lists intact.Fixed-size chunking splits answers in half. Retrieval works on passages, so passage boundaries matter.
Embed & storeEach chunk is embedded with Gemini (gemini-embedding-001) and stored in Qdrant with cosine distance, plus page metadata: title, headings, description, schema.Search results can be filtered and reported by URL and domain, not just by raw vector.

Re-importing a URL replaces its old chunks, so a page can be edited, re-imported, and re-tested in a couple of minutes.

AI Search Simulator importer tab with 20 theseoconsultant.ai URLs entered, chunk overlap set to 50, and a completed progress bar with the message Imported 20 documents (392 chunks) with sentence-transformers embeddings.
Twenty pages from this site, split into 392 layout-aware chunks. This run used the app’s local sentence-transformers embedding option rather than Gemini.

How Does the Simulation Model AI Retrieval?

Passage search with a dynamic relevance score

A query is embedded with the same model and matched against every passage in the collection. Raw cosine similarity is the starting point, not the final answer. The dynamic score adds credit for word overlap with the query and for coverage of the query’s entities (extracted with the Google Cloud Natural Language API), because a passage that names the right things tends to get cited over one that’s merely in the right neighborhood. Results are labeled Strong, Likely, or Possible.

Query fan-out simulation

AI Mode doesn’t search for your query. It searches for a dozen variations of it. The simulator has Gemini generate fan-out variations (reformulations, comparisons, follow-up questions), runs every one against the collection, and ranks domains by how often and how high they get retrieved. A domain that shows up for one variation is lucky. A domain that shows up for most of them owns the topic. The Query Fan-Out Analyzer is the free, single-page version of the same idea.

AI Overview source tracing

Paste the text of an AI Overview and the simulator works backward: it chunks the answer, searches each piece against the collection, and ranks the passages most likely to have been used as sources. It’s the fastest way to answer “why did they get cited and not us” with something better than a guess.

AI answer grounding check

Optionally, each top passage gets checked by Gemini with Google Search grounding for whether its claims hold up. Passages that fail get pushed below the ranked list. AI systems increasingly cross-check sources, and a passage that’s semantically perfect but factually shaky is a liability.

Can You Test Content Before Publishing?

Yes, and that’s the part I use most. Content Testing takes a draft that isn’t live yet and runs it against the indexed competition.

  1. Fan out the target query into a couple dozen variations.
  2. Retrieve the top passages from the collection for each variation.
  3. Score the draft against each variation and slot it into the competitor ranking.
  4. Simulate three answer formats (a classic AI Overview, a Web Guide, and an AI Mode response) with Gemini, written from the top sources.
  5. Count citations by domain across all three, and roll citation rate and prominence into an AI visibility score per domain.

The output shows where the draft lands against competitors for every variation, which variations it misses entirely, and which domains get cited in the simulated answers. That’s a punch list you can act on before the page ships, not after it fails to get cited.

How Is Entity Coverage Measured?

For any result, the simulator lists which of the query’s (or AI Overview’s) entities a passage covers and which it’s missing. A passage that matches the topic but skips the named things an answer needs is a near miss, and near misses are the cheapest wins in AI search.

Entity coverage panels for two search results from the same page: the first, scored 0.8048 Likely, covers fan-out, gemini, google, and passages with ai overviews flagged as a content gap; the second, scored 0.7194 Possible, covers gemini, google, and passages with ai overviews and fan-out flagged as gaps.
Entity coverage for the top two passages. Both are missing “AI Overviews”, which is exactly the kind of near miss worth fixing.

What Doesn’t the AI Search Simulator Do?

When Is AI Search Simulation Useful?

Working With Me on AI Search Visibility

The AI Search Simulator runs on client engagements as part of my AI SEO consulting. Indexing is the easy part. The work is choosing the right competitor set, interpreting why one passage gets retrieved over another, and rewriting content so it gets cited without reading like it was written for a machine. If you want to see how your site holds up, feel free to reach out.

← All Tools