Embedding Locality IDentifier
Encode high-dimensional embedding vectors into compact, sortable strings. Similar embeddings produce lexicographically similar ELIDs, enabling vector search using standard string indexes. Plus: blazing-fast string similarity algorithms. All powered by Rust compiled to WebAssembly -- every computation runs entirely in your browser.
Convert vector embeddings to sortable string identifiers
| Profile | Use Case | Reversible | Output Size |
|---|---|---|---|
| Mini128 | Fast similarity via Hamming distance | No | 26 chars |
| Morton10x10 | Z-order curve, good for range queries | No | ~20 chars |
| Hilbert10x10 | Best locality preservation | No | ~20 chars |
| Lossless | Exact embedding storage and retrieval | Yes | ~dims x 6 chars |
| Compressed | Tunable size/fidelity trade-off | Yes | Variable |
| MaxLength | Fit in database column constraints | Yes | User-defined |
Generate 256-dim embeddings using Model2Vec (potion-base-8M) — runs entirely in your browser via WASM + ONNX
Compare embeddings from different models with different dimensions
Images, audio, code — if you can embed it, ELID can index it
Semantic search requires vector databases (Pinecone, Milvus, Weaviate) that add infrastructure complexity and cost. You cannot use standard SQL databases efficiently for similarity search because vectors don't have natural ordering.
ELID encodes embeddings into strings where lexicographic order approximates semantic similarity. Store ELIDs in any database with a B-tree index (PostgreSQL, SQLite, DynamoDB) and use standard string operations for similarity search.
-- Store with standard index
CREATE INDEX idx_elid ON documents(elid);
-- Find similar documents
SELECT * FROM documents
WHERE elid BETWEEN 'abc...' AND 'abd...'
ORDER BY elid
LIMIT 10; Works with any database that supports string indexing. No special extensions required.
Compare two strings across every algorithm in real time
Search a list with typo tolerance and ranked results
See how similar strings produce similar 64-bit fingerprints
Click on two entries to compare their bit patterns. Differing bits are highlighted in red.