PROGRAM ZERO 18-month live AI, LLM & full-stack programme · ₹17,999 for all 18 months · Starts 9 January 2027
Explore Program Zero →
Careers Ninza — business and startup leadership training
JOIN ZERO NINZA KIDS
JOIN ZERO NINZA KIDS
See all programs → Free live masterclass → Guides & articles → Newsletter →
Careers Ninza
AI & AUTOMATION 9 min read · Updated 24 September 2026

What is a vector database? A beginner’s guide

Embeddings, similarity search and the databases built for them, explained in plain English: what they do, when you need one, and how the popular options compare.

CN
Careers Ninza AI faculty
Careers Ninza · Kolkata, India
Learn this live in Program Zero

A vector database stores data as embeddings, lists of numbers that capture meaning, and quickly finds the items most similar to a query. It powers semantic search, recommendations and RAG chatbots, where you need to find text by meaning rather than exact keywords. For small projects, a simple library or a Postgres extension is often enough.

Vector databases became popular very quickly with the rise of AI assistants, and the jargon can make them sound more complicated than they are. This guide explains the idea step by step, then compares the common options and helps you decide whether you need one at all.

What problem does a vector database solve?

Traditional search matches words. Search a travel site for “cheap flights to Goa” and a keyword system looks for those exact words. A page titled “Budget airfare for your Goa holiday” might be missed, even though it is exactly what you wanted.

The problem gets worse with synonyms, spelling variations, Hinglish (“Goa ka sasta ticket”) and questions phrased differently from how the answer is written. People search by meaning; keyword systems search by spelling.

Vector search closes that gap. It compares meaning, so “cheap flights” and “budget airfare” land close together.

What is an embedding?

An embedding is a list of numbers that represents the meaning of a piece of content. An embedding model reads a sentence, a paragraph, an image or a product listing and outputs a vector, typically hundreds or thousands of numbers long.

Think of a map of India. Every city has two numbers, latitude and longitude, and cities that are close on the map have similar numbers. An embedding does the same thing for meaning, but instead of two dimensions it uses hundreds. Sentences about similar things end up with similar numbers, so they sit near each other in that space.

The embedding model matters as much as the database. A vector database only stores and searches the numbers; it is the model that decides what counts as “similar”. For Indian languages, choose an embedding model that has actually been trained on them.

How does similarity search work?

To answer a query, you turn the query into an embedding with the same model, then look for the stored embeddings closest to it. Closeness is usually measured with cosine similarity, which checks whether two vectors point in the same direction, or with simple distance.

Comparing a query against every stored item works fine for a few thousand items. At millions, it becomes too slow. So vector databases use approximate nearest neighbour (ANN) indexes, which find very close matches without checking everything.

A popular one is HNSW (Hierarchical Navigable Small World). Picture India’s road network: to get from Kolkata to a village near Pune, you take a highway most of the way, then state roads, then local lanes. HNSW builds layers of connections in the same spirit, so a search jumps quickly across the space and then narrows down. It gives up a tiny amount of accuracy for a very large gain in speed.

What does a vector database add beyond an index?

An index alone finds similar vectors. A database adds the things you need to run it in a real application:

—Metadata and filters. Search only documents from 2026, only Hindi content, or only products in stock.
—Updates and deletes. Add new documents and remove outdated ones without rebuilding everything.
—Scale and reliability. Storage, backups, replication and handling many users at once.
—Access control. Make sure one customer’s data never appears in another customer’s results.

How do the popular options compare?

You will meet these names in almost every tutorial. They fall into three groups: libraries, extensions to databases you already use, and dedicated vector databases.

OptionWhat it isGood forKeep in mind
FAISSOpen-source similarity search library from MetaFast local search, research, prototypesA library, not a database: you manage storage yourself
pgvectorExtension that adds vector search to PostgreSQLApps already using Postgres; vectors next to normal dataTune indexes as data grows
ChromaOpen-source, developer-friendly vector storeLearning, prototypes, small RAG appsCheck that it fits your production scale
PineconeFully managed cloud vector databaseTeams that do not want to run infrastructurePaid service; data sits with a provider
Milvus, Qdrant, WeaviateOpen-source dedicated vector databasesLarger workloads, advanced filtering, self-hostingMore to set up and operate

There is no single best choice. For a learning project, Chroma or FAISS is simplest. For a production app that already uses Postgres, pgvector keeps everything in one place.

Where are vector databases used?

—RAG chatbots. Find the most relevant document chunks and pass them to a language model. Program Zero’s explainer on what RAG is and how it works step by step shows where the vector search fits in the pipeline.
—Semantic search. An e-commerce catalogue where “kurta for Diwali” finds festive ethnic wear even without those exact words.
—Duplicate detection. Spotting support tickets or questions that ask the same thing in different words.
—Recommendations. “Similar products” or “articles like this one”.
—Image search. Find photos similar to an uploaded one, using image embeddings.

Do you actually need a vector database?

Often, not at first. A few questions help:

—How much data? A few thousand chunks can be searched in memory with NumPy or FAISS. A dedicated database starts to earn its place as volume grows.
—Do you already run Postgres? Then pgvector may be all you need.
—Do you need filters, frequent updates and many users? That is where dedicated vector databases shine.
—Would keyword search be enough? For exact codes, names and IDs, classic search is still better. Many good systems combine both, which is called hybrid search.

What does a simple example look like?

Imagine building a question-answering assistant for a college’s admission FAQs.

—Split the FAQ document and prospectus into short, self-contained chunks.
—Create an embedding for each chunk with an embedding model.
—Store each embedding with metadata: course, year and language.
—When a student asks “hostel fees for first year?”, embed the question the same way.
—Retrieve the top few closest chunks, filtered to the current year.
—Show them directly, or pass them to a language model to write a clear answer with the source.

That is the core of most RAG systems. When to add retrieval, and when a better prompt or fine-tuning is the right tool instead, is covered in our guide to fine-tuning vs RAG vs prompt engineering.

What mistakes should you avoid?

—Changing the embedding model without re-embedding. Vectors from different models are not comparable.
—Poor chunking. Chunks that are too long mix topics; too short lose context. Test a few sizes.
—Ignoring metadata. Without filters, last year’s fee sheet will happily outrank this year’s.
—Assuming similar means correct. The closest chunk can still be the wrong answer. Evaluate with real questions.

If you want to build this end to end, Program Zero’s LLM phase covers embeddings, vector databases such as FAISS, Chroma and Pinecone, and a full RAG pipeline, after earlier phases on databases and programming. For how retrieval fits into assistants that also take actions, see our guide to agentic AI.

Want to learn this live, with mentors?

In Program Zero you build embeddings, vector search and a full RAG pipeline yourself, inside an 18-month live programme in AI, LLMs and full-stack development. ₹17,999 for all 18 months; the batch starts 9 January 2027.

PROGRAM ZERO · 18-MONTH LIVE PROGRAMME
Program Zero: AI, LLM & Full-Stack Developer Programme

Learn AI, large language models and full-stack development live with mentors: from your first line of code to building and deploying your own language model.

₹17,999 for all 18 monthsStarts 9 January 2027Mon–Fri, 9:00–10:30 PM ISTEvery class recorded

Frequently asked questions

What is a vector database in simple words?+

A vector database stores content as embeddings, which are lists of numbers representing meaning, and finds the items most similar to a query. This lets you search by meaning instead of exact words, so a search for cheap flights can also find budget airfare. It is widely used for semantic search, recommendations and RAG chatbots.

Do I need a vector database for RAG?+

Not always. RAG needs some way to find relevant chunks by meaning, but for a few thousand chunks an in-memory library such as FAISS, or the pgvector extension in an existing Postgres database, is often enough. A dedicated vector database becomes useful when you have large volumes, frequent updates, complex filters or many users.

What is the difference between a vector database and a normal database?+

A normal database finds records by exact values, such as an ID, a name or a date range. A vector database finds records by similarity, comparing embeddings to return the closest matches to a query. Many applications use both, and some databases, such as PostgreSQL with pgvector, can do both in one place.

Which vector database should a beginner learn?+

Start with Chroma or FAISS for learning, because they are simple to set up locally and let you focus on embeddings and retrieval. If you already know PostgreSQL, try pgvector next, since it is common in production apps. The concepts, embeddings, similarity and indexes, transfer between all of them.

Related reading

AI & AUTOMATION LLM Course: What You Should Learn to Build Large Language Models Most LLM courses teach you to call an API. Building and adapting language models needs more: tokenisers, transformers, training, fine-tuning, alignment, evaluation and serving. Here is the full syllabus, in order. 10 min read AI & AUTOMATION Agentic AI Course: The Skills You Need to Build AI Agents in 2027 Building reliable AI agents takes more than chaining prompts. The skills an agentic AI course should teach, from tool use and memory to evaluation, security and deployment, and how to judge a course. 10 min read AI & AUTOMATION What Is Tokenization in LLMs? BPE, WordPiece and SentencePiece Explained Before a language model reads a word, a tokenizer chops text into pieces. How BPE, WordPiece and SentencePiece work, why tokens decide cost and context, and why Indian languages are affected most. 9 min read

We teach this, live

Every article here comes from something we teach. Sit in on a free masterclass and judge the mentors yourself.