TypologySienna Chen
InputLightweight

Vector search

Items placed and found by meaning.

Placing items by meaning: things that are alike sit near each other, and a search finds the closest matches to a sentence. A library becomes a map. The heavy work happens before the page loads.

Breaks when
embedding computation is not cheap client-side
Also called
embeddings, semantic map, UMAP

Prompts

Semantic map of a library
At build time, embed each item’s title and note with an embedding model, reduce to 2D with UMAP (n_neighbors 12, min_dist 0.1), and write points.json. The page renders the points as Canvas 2D dots with labels that appear at zoom levels, pan and zoom with the pointer, and a search box that embeds the query through a serverless endpoint and highlights the 8 nearest by cosine similarity with lines. Cache query embeddings.
Similar items on hover
For a gallery of 300 items with precomputed embeddings, hovering one dims everything except its 6 nearest neighbours, computed in the browser with a typed-array dot product (under 1 ms). Show the similarity as line thickness. No server call needed.
Hybrid search
Combine keyword matching (title contains) with vector similarity: score = 0.6 × cosine + 0.4 × keyword match, rerank the top 50, and show why each result matched (keyword hit vs semantic). Explain the failure modes of each half.

Related

Resources

None yet. Find one and add it with npm run add -- <url>.