Semantic 3DVector Embeddings·Interactive 3D
3D Vector Embedding Space & Cosine Similarity Explorer
High-dimensional semantic vectors projected into interactive 3D spatial clusters with live nearest-neighbor beam search.
Live Hardware-Accelerated ViewportDrag to rotate · Interact with controls
System Architecture & Engineering Concept
Explore how large language models represent semantic meaning. High-dimensional 1536-dimensional embeddings (reduced via UMAP/t-SNE into 3D Cartesian coordinates) are visualized as clustered galaxy nodes. Click or query any cluster to trigger live cosine similarity calculation with glowing vector projection rays.
Mathematical Formulation / Heuristic:
Cosine Similarity: cos(theta) = (A · B) / (||A|| * ||B||), where A and B represent normalized coordinate vectors in R^3 space.
Implementation Highlights
- Volumetric spatial clustering grouped by domain: AI Systems, Architecture, Low-Level Proxies, and Native Tools.
- Raycasting intersection detection for instant vector metadata inspection on hover/tap.
- Dynamic beam casting highlighting the top-k nearest neighbors in the latent manifold.
Interactive Parameters
Cluster Selection
Click any semantic domain to focus camera and calculate vector neighbors
Similarity Threshold
Filter out nodes falling below specified cosine distance threshold
3D Orbit Controls
Pan, rotate, and zoom inside the multi-dimensional latent cloud
Core Engine LoopTypeScript
function findNearestNeighbors(queryVec, corpus, topK = 4) {
return corpus
.map(doc => ({
...doc,
score: queryVec.dot(doc.vector) / (queryVec.length() * doc.vector.length())
}))
.sort((a, b) => b.score - a.score)
.slice(0, topK);
}