What Is a Vector Database?
Also called vector store, vector DB
Short Answer
A vector database stores embeddings and quickly finds the ones most similar to a query vector, even among millions of items. It is the storage layer of semantic search and retrieval-augmented generation. Examples include Chroma, Pinecone, Qdrant, Weaviate and pgvector, an extension for PostgreSQL.
- Taught in lesson 100
- In 1 real job ad
Why It Matters
Vector databases make semantic search and RAG possible at scale. Engineers building AI assistants choose, set up and tune them, and understanding them helps you decide when a dedicated vector database is needed and when an existing database with vector support is enough.
How It Works
Comparing a query with every stored vector would be too slow at scale, so vector databases use approximate nearest neighbor indexes such as HNSW, trading a tiny loss of accuracy for a large gain in speed.
Besides vectors, they store metadata such as source, date and access rights, so a search can be filtered, for example to documents a user is allowed to see.
Besides vectors, a vector database stores metadata, such as the document, date, author and access rights, so searches can be filtered. Indexes trade a little accuracy for speed, and settings control that balance. Many teams start with a vector extension in a database they already run, such as PostgreSQL with pgvector, and move to a specialised system only when scale or features require it.
Vector Database in Practice
Everyday Example
A music app stores an embedding for every song and finds tracks that sound similar to the one you just liked.
Industry Example: Pharma
A company stores embeddings of its standard operating procedures with metadata for site and version, so an assistant retrieves only the current procedure for the user's site.
Where You Meet It
- The storage layer of RAG assistants.
- Semantic search and recommendation systems.
- AI engineer job ads naming specific vector stores.
- Architecture diagrams of AI applications.
Key Ideas Around It
- Index
- A structure that makes similarity search fast.
- Approximate nearest neighbour
- Finding very close vectors quickly instead of exactly.
- Metadata filter
- Narrowing results by fields such as date or access rights.
- pgvector
- Vector search added to PostgreSQL.
A Common Mix-Up
A vector database does not understand text. It only stores and compares numbers produced by an embedding model; search quality depends heavily on that model.
Check YourselfWhy store access rights as metadata in a vector database?
So each search returns only documents the user is allowed to see.
Seen in Real Job Ads
Lines quoted word for word from live job postings.
Pfizer
Senior Manager, LLMOps & AI Integration Engineer
Hands‑on with GenAI/LLM ecosystems (e.g., tool/function calling, structured outputs, prompt orchestration) and RAG components (embeddings, retrievers, rerankers, vector stores).
Learn It on ai2hired
S9 · #100Vector Databases
Coming in Season 9, Embeddings, RAG and Search. Every ai2hired lesson is free on YouTube.
Questions People Ask
Do I need a dedicated vector database?
Not always. For small or medium projects, pgvector inside an existing PostgreSQL database is often enough.
What is HNSW?
A graph-based index that finds approximate nearest neighbors quickly. It is the default in many vector databases.
Related Terms
Learn AI From Zero to Hired
Free lessons on YouTube, each one built from what real AI job ads ask for.