/ sandbox / embeddings

Vector embeddings · semantic search

Pick a few public-domain novels, embed every paragraph into a 384-d vector with MiniLM-L6-v2 — entirely in your browser via Transformers.js — then search by meaning, not keyword.

semantic search
// ready to embed

Three steps. One browser.

  1. 1
    Load the model — ~25MB, cached forever in IndexedDB
  2. 2
    Index a few books — streams ~paragraph-sized chunks through MiniLM
  3. 3
    Search by meaning — cosine similarity against every chunk in RAM
queryload model + index a book first