This playground shows semantic search: finding documents by meaning instead of by exact words. You write a few documents, type a query, and see which documents are closest in meaning.
The starter query "cozy jacket for cold weather" shares almost no words with the winter coat document, but vector search still ranks it near the top. That is the main idea behind vector databases and RAG systems.
Each document and your query are turned into an embedding — a list of numbers that represents meaning — by a real embedding model (all-MiniLM-L6-v2) running in your browser through transformers.js. Documents are then ranked by how close their numbers are to the query's.
The first time you press Run, your browser downloads the model, which is about 90 MB. After that, everything runs on your computer. No API key is needed and your text is not sent to an AI service.
Vector search turns text into numbers called embeddings and finds the items whose numbers are closest to your query. This lets it match by meaning, even when the words are different.
Your browser downloads the embedding model the first time, which is about 90 MB. Later runs are much faster.
No. The model runs inside your browser, so your documents and queries stay on your computer.
RAG (retrieval-augmented generation) uses this same kind of search to find relevant text before an AI model writes an answer. This playground shows the retrieval step on its own.