LLM & Integration12 min
Cosine Similarity vs Dot Product for Embeddings (2026)
Cosine similarity vs dot product for embeddings, with runnable TypeScript. Learn when to normalize, why they match for unit vectors, and which to pick.
Tag
3 posts
LLM & Integration12 min
Cosine similarity vs dot product for embeddings, with runnable TypeScript. Learn when to normalize, why they match for unit vectors, and which to pick.
AI & Machine Learning22 min
Tune pgvector 0.8.2 HNSW indexes on PostgreSQL 18: ef_search, halfvec quantization, iterative scans, and parallel builds with a runnable Docker setup.
Embedding models compared: Word2Vec, GloVe, BERT, OpenAI text-embedding-3, Cohere v3, and open-source (BGE, E5). Dimensions, retrieval quality, and cost.