QA
Beginner LevelAI, LLMs, Embeddings & MCP

What is a Vector Database (Pinecone, ChromaDB, Milvus, Qdrant)?

❓ Interview Prompt: Explain vector database storage, high-dimensional vector indexing, metadata filtering, and k-NN query execution.

A Vector Database is a specialized storage engine optimized for indexing, storing, and querying high-dimensional vector embeddings efficiently.

Key Differences from Relational DBs:

•
Relational DBs: Execute exact matches (WHERE id = 5).
•
Vector DBs: Execute Approximate Nearest Neighbor (ANN) search to find vectors closest in semantic space in sub-linear time ($O(\log N)$).

Key Features:

•
Hybrid Indexing: Combines vector similarity scores with metadata filtering (WHERE category = 'finance').
•
Popular Engines: Pinecone, Qdrant, ChromaDB, Milvus, Weaviate, pgvector (PostgreSQL extension).

Code Implementation Example

typescript
import { QdrantClient } from '@qdrant/js-client-rest';

const client = new QdrantClient({ url: 'http://localhost:6333' });

// Query vector DB with metadata filter
const searchResult = await client.search('documents', {
  vector: [0.02, -0.15, 0.43], // 768-dim query embedding sample
  filter: {
    must: [{ key: 'author', match: { value: 'Alice' } }]
  },
  limit: 5
});
💡Vector database query execution combining embedding similarity with metadata filtering.
🎯 Interview Key Takeaway

Vector databases execute sub-linear Approximate Nearest Neighbor (ANN) search across high-dimensional embeddings.

#Vector Database#ANN#Qdrant#Pinecone#Beginner
Back to all AI, LLMs, Embeddings & MCP Questions→

More AI, LLMs, Embeddings & MCP Interview Questions

Beginner LevelAI, LLMs, Embeddings & MCP

What are Vector Embeddings and Cosine Similarity in AI Semantic Search?

Beginner LevelAI, LLMs, Embeddings & MCP

What is the Model Context Protocol (MCP) and how does it connect LLMs to external tools?

Beginner LevelAI, LLMs, Embeddings & MCP

What is Retrieval-Augmented Generation (RAG) and how does it prevent LLM hallucinations?