til
TIL: Jun 11
tilengineering
TIL: When working with pgvector and HNSW indexes, keep in mind that high-dimensional embeddings (e.g., 3072-dim) can exceed index limits; truncating vectors to 1536 dimensions using the Matryoshka property allows you to maintain HNSW performance while ensuring compatibility with standard vector database constraints. Always verify graph traversal efficiency using EXPLAIN ANALYZE to ensure your semantic searches are actually hitting the index rather than defaulting to slow linear scans.