Passage Lens: See Your Page the Way Google Chrome Does

Chrome's built-in AI team has proposed the Semantic Embedder API, which would expose the browser's embedding generator as a web API, and I wanted to experiment with the idea before it ships. In other words: generating embeddings locally, inside the browser, with no server, no API keys and no per-use cost. I've thought of a thousand uses for it, and this is just one of them.

With embeddings running inside the browser, I had the idea of combining them with the chunker Chrome uses to split pages into passages for its history search and with query fan-out (you can read more about this in the evolution of query augmentation). Put the three together and you get the pipeline of a retrieval system running inside Chrome: chunk, embed and rank passages against a query and its variants.

The result of the experiment is a Chrome extension I've called Passage Lens. It's a side panel that shows you which passages on the page would be retrieved for each query, which intent variants your content covers, and which ones aren't answered anywhere on the page (your content gaps). It also paints a heatmap over the page itself with the relevance percentile of each passage.

Disclaimer: Passage Lens is an experimental project I built to explore a concept, which means it's not a tool that will help you make decisions. The passage chunking does replicate Chrome's algorithm, but the rest is an illustrative approximation, because every system chunks content its own way (Perplexity, for example, uses chunks of about 7 tokens, and we don't know what Gemini or any other LLM does internally), and generating fan-outs with Gemini Nano is a toy for understanding the idea, not a reproduction of what Google Search does. It's useful for seeing, in a simple way, which parts of your page are most relevant to a query, without getting carried away.

What it does, exactly

You open a page, type a query and the extension runs this pipeline:

  • It splits the DOM into passages using a JavaScript port of Chromium's DocumentChunker (the original is in C++), with its production settings: greedy aggregation of sibling nodes up to 200 words, a minimum of 5 words and a cap of 1024 characters per passage. It's the same extractor Chrome uses for its History Embeddings, so the chunking you see is what Chrome is already doing with the pages you visit. One thing I haven't replicated exactly is the per-page cutoff: History Embeddings keeps the first 30 passages of each page, and in the extension I raised that limit to 200 on purpose (in case you want to audit a very long, complex page). The other difference is boilerplate. Chrome's chunker only discards script, style and noscript. It just uses tags like nav or footer as boundaries between passages, so they're not discarded (note: Chrome can also ignore ads through Annotated Page Content, the extractor behind Gemini's agentic features, which is a separate pipeline). In the extension I've added an optional filter, on by default, that removes nav, footers, asides and cookie banners before chunking.
  • It embeds the query and the passages with EmbeddingGemma 300m in ONNX via Transformers.js, using the model's official query and document prefixes. It tries WebGPU first and checks it with a canary test, because some GPUs return corrupted embeddings. If that fails, it falls back to plain WASM.
  • It calculates the cosine similarity of each passage against each query. EmbeddingGemma scores are squeezed between 0.4 and 0.85, so the useful thing isn't the absolute number but the percentile within the page, which is what I use for the ranking and the heatmap.

There are two fan-out modes. The recommended one is pasting your own variants, the ones you've pulled yourself from the Gemini API, ChatGPT, Bing's grounding data or wherever you like. I added the second one, Gemini Nano, just for fun, because I liked the idea of running an LLM locally and simulating a naive fan-out process. Gemini Nano is the model built into Chrome, and I made it generate variants using the taxonomy from Google's patent US20230281193A1: equivalent, generalization, specification, follow-up, entailment and clarification, one per type. I could have built something fancier, but I wanted the browser to do all the work at no cost. This has a lot of limitations, because the patent describes a control model that dynamically decides how many variants to generate, of which types, and when to stop, trained on Google's own data... and I'm not reproducing any of that. I generate one per type to get a complete, automatic random sample, nothing more.

If a fan-out variant has no passage that answers it well, the extension flags it in red as a content gap. Keep in mind, though: just because retrieval works at passage level doesn't mean you should chunk your content (I explain why here). The query chips are clickable: clicking a variant filters the passage ranking and the heatmap for that specific query, and another click takes you back to the overall view.

Passage lens

Why Chrome ships with a chunker and embedding models built in

This is the nerdiest part of the experiment for me, and the short answer is that your browser has been a retrieval system for more than 2 years.

In October 2023, the content_extraction module landed in Blink: an interface for capturing the inner text of pages for the on-device features that were on the way. Content extraction is a world of its own, and one I've been obsessed with ever since LLM chatbots appeared. On February 6, 2024, the history_embeddings component was created, and just over two weeks later, on February 23, the same engineer added the DocumentChunker on top of the content_extraction module. The changelist (CL) describes the algorithm exactly as I ported it to JS: grouping text nodes into passages, working up from the leaves of the tree, trying not to go over a word limit. In other words, the chunker was basically written for History Embeddings.

What the Chrome feature does is split the pages you visit into passages, embed them with a local model and store the vectors in a database in your profile (the component contains both a sql_database.cc and a vector_database.cc). That lets you search your history by meaning instead of by matching words. Google launched it on August 1, 2024 as AI-powered history search, opt-in and starting in the US. So, as I publish this, Chrome has been generating and storing embeddings of its users' browsing for 2 years, locally, and most of the industry hasn't noticed (I found out last year thanks to Dan Petrovic). And it looks like there's even more to it. Here's what I replied back then, and it looks like I was on the right track 🙂

 

Chrome's internal semantic search

 

In December 2024, the passage embedder was moved into its own component, passage_embeddings, which is what you do when more features are going to use it.

So where does the model that generates those embeddings come from? It's not in the Chromium code. All that's there is the machinery to receive and run it. Chrome downloads the model to each profile from Google's servers, through the model delivery infrastructure of Optimization Guide, and it's made up of two files: an embedding model in TFLite format and a SentencePiece tokenizer, with metadata for the input window, vector size and similarity threshold. It doesn't run in the browser process either, but in a separate sandboxed service that loads the model with TFLite and exposes a GenerateEmbeddings() function with three priority levels (user-initiated, urgent and passive). That's what lets it embed your browsing in the background without you noticing. So it's a proprietary model that doesn't come in the binary, that Google installs in your profile and that no website can touch. Keep this detail in mind, because it explains the Brave situation further down.

The second reason is Google's built-in AI strategy. Chrome ships Gemini Nano inside the browser and exposes task APIs for websites and extensions, such as the Prompt API, Summarizer, Translator and Writer. Google's case for putting models on the client comes down to privacy (content never leaves the machine), latency (no network round trips) and cost (inference is paid for by the user's device, not the server). And I'd add that if every website had to download its own 200MB model, the whole web would become unusable. A model shared at browser level spreads that download across every site.

And the third reason is the proposal to expose that on-device embedder as a standard web API. It's an early draft and it's not approved to ship, but the idea is that any website could generate embeddings locally without bringing its own model. The day that happens, Passage Lens will drop its bundled engine and use the native one. In the meantime, the extension loads its own Transformers.js and ONNX runtime, which is exactly the problem the API wants to solve.

Also, I've just noticed that in the current passage_embeddings code, next to the usual History Embeddings executor, there's a GemmaModelExecutor with an execute_for_gemma flag and metrics called AI.SemanticEmbedder.LaunchDuration and AI.SemanticEmbedder.TaskDuration. In other words, the native API is going to reuse the same embedding service as history search, swapping the model for one from the Gemma family, most likely EmbeddingGemma. If this is confirmed, the model I've bundled in Passage Lens will be the same one Chrome ends up serving by default. Google's strategic goal here is to turn Chrome into the default AI platform. If the browser ships the model, the runtime and the APIs, the browser becomes the layer where tools get built, and whoever controls that layer decides which model gets used. On top of that, Google gets the inference for free, which at its scale is no small thing...

What about Brave?

I was worried Brave might be doing this too, since it's built on Chromium and it's the browser I've been using for years... so I looked into it and found that it isn't. I checked by launching Brave with a clean profile and testing whether the LanguageModel, Summarizer and Translator APIs exist on the window object, and they don't.

So these features aren't part of Chromium. They're part of Google Chrome. The models aren't compiled into the binary, and Brave systematically removes or proxies anything that talks to Google's servers. Its AI strategy goes a different way with Leo, an assistant that uses cloud models behind a proxy that anonymizes requests. Opposite philosophies: Google moves the model onto the device and builds it into the web platform, while Brave keeps the model off the device and protects the request.

How to try it

The code is at github.com/natzir/passage-lens. Just load the folder as an unpacked extension in chrome://extensions (with developer mode turned on), open any page and click Analyze. The first analysis downloads the EmbeddingGemma weights (~200MB, only once; after that they're cached), and access to each site is granted per origin the first time you analyze it.

Conclusion

Passage Lens is just an exercise in playing with the browser and its retrieval building blocks (chunker, embedder, small LLM), and in seeing how an extension can combine them to build SEO tools that used to require a backend, API keys and per-use costs.

Think about what you could build with this stack without a single byte of content leaving your machine 🙂

Natzir Turrado 06 August 2026

Share

Facebook Linkedin Twitter

More articles

Are Meta Descriptions Back? The Impact of Meta Descriptions on Gemini AI

When Gemini searches Google, it doesn't read your pages. It reads the excerpt Google passes it for each result. Almost always, that's body text. But sometimes it's your meta description, and then Gemini cites you 22% of the time, versus 72% when it gets body text. I measured it across 115 prompts, in English and […]

Read more

AI Visibility Tools: What Prompt Trackers Don't Tell You

AI visibility tools (prompt trackers) promise to measure something that's impossible to measure accurately. To me, they're the business of manufactured certainty. This technical report looks at why measuring AI visibility is technically problematic, what the available evidence says, and how to evaluate the tools on the market. My goal is to try to reduce […]

Read more