Entry

How do you choose a vector database (pgvector, Pinecone, and others)?

I start by turning the product requirements into a decision framework: filtering needs, expected scale, latency targets, how much operations work my team can absorb, and cost. I would not pick a database because it is fashionable.

How to answer it in an AI engineer interview: what is being tested, a step-by-step framework, a sample answer and the mistakes to avoid.

$19.99 on Gumroad, instant download

Smaller start: Score your answers against 50 rubrics, $9. 50 AI engineer questions, one rubric each, PDF on Gumroad.

Practiced one out loud? Paste your answer into the free self-check and get a score in 30 seconds

What the interviewer is testing

Whether you can compare pgvector, managed services, self-hosted engines, and hybrid-search options using filtering, scale, latency, operations, and cost rather than hype.

Answer framework

  1. Define filtering needs, scale, latency targets, operations capacity, and cost before choosing a store.
  2. Postgres with pgvector: simplest when you already run Postgres and the expected scale fits the setup.
  3. Managed vector databases such as Pinecone: little operations work, with usage-based pricing.
  4. Self-hosted engines such as Qdrant, Weaviate, and Milvus: more deployment control, with filtering and scaling capabilities to benchmark against the workload.
  5. Search engines such as Elasticsearch and OpenSearch: strong candidates for hybrid lexical plus vector retrieval.

Sample answer

I start by turning the product requirements into a decision framework: filtering needs, expected scale, latency targets, how much operations work my team can absorb, and cost. I would not pick a database because it is fashionable. I would benchmark representative queries with realistic vector counts, filters, and concurrency, and I would include the index build and update cost in the comparison.

If we already run Postgres and our scale fits what pgvector can handle well, pgvector is often the simplest choice. It keeps our relational data, permissions, and vector search in one system, so there is less infrastructure to operate. For managed vector databases such as Pinecone, the tradeoff is less operations work in exchange for usage-based pricing and less direct control over the stack.

If we need more deployment control, self-hosted engines such as Qdrant, Weaviate, or Milvus are candidates, but their filtering and scaling capabilities need workload-specific testing. If the application needs lexical search, BM25, and vector search together, Elasticsearch or OpenSearch is a natural candidate for hybrid retrieval. My final recommendation would come from the tested requirements, not the category name. I would also plan how the choice changes as the corpus and traffic grow.

Likely follow-ups

When is pgvector a better fit than a dedicated vector database? When the team already operates Postgres, the data and filters are relational, and the expected scale and latency fit a validated pgvector setup.
When should I choose a managed vector database? When minimizing operational work matters more than direct control, and usage-based pricing and the required features fit the workload.
How do I evaluate a hybrid-search engine? I would test representative lexical and semantic queries, filter behavior, latency, update cost, and ranking quality against the application requirements.

Common mistakes

The PlaybookWant the full method?

The 0 to 1 AI Engineer Interview Playbook covers the answer frameworks, system-design walkthroughs and an 8-week plan.

Get the playbook

Smaller start: Score your answers against 50 rubrics, $9. 50 AI engineer questions, one rubric each, PDF on Gumroad.

Interviewing for PM or TPM? See the full PM package, $59 on Gumroad: a resume system, a PM, TPM and PGM interview handbook, a 1:1 cheat sheet and a PM playbook. PM and TPM content, not AI engineer prep.

Related questions

Based on question #35 in the full question bank.

AI Engineer Interview PlaybookStructured practice for AI engineer interviews

A structured interview practice pack with prompts and scoring notes for AI engineer rounds. Price is $19.99.

Get the AI Engineer Interview Playbook, $19.99

Also: Grok Bot Team Setup Pack ($49)