Back to directory

In-browser Semantic Search with EmbeddingGemma

A browser-only demo that runs Google's EmbeddingGemma model through Transformers.js to rank a set of documents against a search query by semantic similarity, with no server and no data leaving the device.

In-browser Semantic Search with EmbeddingGemma

This project demonstrates semantic search entirely in the browser, using the EmbeddingGemma model through Transformers.js so no document or query is sent to a remote server. A user adds documents in a documents section, enters a query, and the application computes embeddings for the query and every document, then ranks the documents by similarity.

After a search, the application visualizes the embedding vectors for the query and each document as a grid of colored squares, showing only the first 128 of each vector's values, since EmbeddingGemma is a Matryoshka model whose embeddings can be truncated to a smaller dimension with only a small accuracy cost. By default the model files are fetched from the Hugging Face Hub, though the application can also be configured to use a local model.

More in RAG

See all 540
  • ai·rete·rag

    ai-rete-rag.com

    A platform that pairs a Rete rule engine with retrieval-augmented generation, so deterministic rules decide an outcome and grounded retrieval explains the decision in plain language.

  • Xtriever

    github.com

    A hybrid retrieval engine for retrieval-augmented generation, written in Rust to run on-device on a phone or a laptop, combining lexical BM25 search, dense embedding search, reciprocal-rank fusion and cross-encoder re-ranking with no server.

  • FileFlux

    github.com

    A .NET library that turns PDF, DOCX, HWP and other documents into optimized chunks for RAG systems, through a five-stage pipeline built on high-performance Rust FFI readers.