Skip to content
mentoor

Vector search

For engineers

Storing and querying embeddings in pgvector or a dedicated vector database, with the right index, distance metric and filters

See where you stand

110 questions across four stages: Understand, Apply, Solve and Judge.

Try 5 questions

Practice items, not counted towards your mastery. No account needed.

Check yourself · 1 of 5

Which pgvector operator returns cosine distance?

Choose one answer

Check yourself · 2 of 5

What does recall mean for an approximate vector index?

Choose one answer

Check yourself · 3 of 5

A filtered vector query with LIMIT 10 returns only 2 rows, though 5,000 rows match the filter. What is the most likely cause?

Choose one answer

Check yourself · 4 of 5

Which store is an in-process library rather than a server?

Choose one answer

Check yourself · 5 of 5

For vectors that all have length 1, which statement is true?

Choose one answer

Topics

  1. Vector search inside PostgreSQL with pgvector5 min read · The vector column type, distance operators, nearest-neighbour queries and keeping vectors next to the rows they describe
  2. Approximate indexes: HNSW and IVF6 min read · Exact versus approximate search, HNSW and IVFFlat parameters, build time, memory, and the recall-speed dial at query time
  3. Filtering by metadata during vector search6 min read · Pre-filtering, post-filtering and filtered HNSW, and why a selective filter can silently return too few results
  4. Picking a vector store for the job6 min read · pgvector, Qdrant, Weaviate, Pinecone, Elasticsearch, OpenSearch and in-process libraries such as FAISS compared on scale, ops and filtering
  5. Distance metrics and normalization5 min read · Cosine, dot product and Euclidean distance, normalized vectors and what goes wrong when the metric does not match the model

Start here

110 questions · last verified 2026-12