Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

BrowserVec developer docs

Start here, then follow the path that matches what you're doing.

I'm new to BrowserVec

  • Beginner guide — what's a vector? what's similarity search? plain-language walkthrough, no ANN jargon
  • Quick start — get the demo running in 2 commands
  • Features — overview of every capability
  • Core API — minimal code example to see the shape
  • Benchmarks — what performance to expect

I'm integrating BrowserVec into my app

I'm choosing an index configuration

I want to understand how it works

  • Architecture — module map, data flow, index selection, ingest/query/delete paths, file↔spec mapping table
  • Internals — device acquisition, store internals, persistence format, encryption envelope, quantization codec, IVF/k-means details, Worker offload seam, CPU/WASM fallback details

I want to run the examples

Open any via npm run dev:

Example Feature
examples/01-basic-flat.html Basic flat search — create, addBatch, query
examples/02-quantization.html int8 / int4 quantization comparison
examples/03-ivf-index.html IVF approximate search with nprobe sweep
examples/04-ivf-quant-combo.html IVF × int8/int4 combo — the 1M path
examples/18-hnsw-index.html HNSW graph index — efSearch sweep, recall vs speed, works without WebGPU
examples/19-hnsw-gpu.html GPU graph search — one-dispatch beam kernel, queryBatch, CPU vs GPU crossover
examples/05-text-retrieval.html End-to-end text → search
examples/06-persistence.html Save/load to OPFS/IndexedDB
examples/07-encryption.html AES-256-GCM encrypted snapshots
examples/08-deletion-compaction.html Tombstone deletes, update, compact
examples/09-worker-ingest.html Worker-offloaded quantized ingest
examples/10-chunking.html Multi-buffer corpus chunking
examples/11-custom-embedder.html Custom embedder implementation
examples/12-transformers-embedder.html Transformers.js semantic embeddings
examples/13-all-metrics.html Cosine vs dot vs L2 comparison
examples/14-advanced-api.html isSupported, stats, destroy, device reuse
examples/15-browser-extension.html Browser extension pattern — capture pages, persist, semantic search, offline
examples/16-react-hooks.html React hooks: useVectorStore, useSimilaritySearch, useEmbedding, useRetriever
examples/17-vue-composables.html Vue composables: useVectorStore, useSimilaritySearch, useEmbedding, useRetriever
examples/perf-benchmark.html Large-scale performance benchmark

I want to contribute to BrowserVec

  • Development guide — setup, build, project layout, how to add an index type / WGSL kernel, code conventions
  • Architecture — understand the module structure and data flow before making changes

Reference