Skip to content
Learn · AI Lessons · Free lesson

Vector Databases Explained

If you have built or studied a retrieval-augmented generation system, you have almost certainly encountered a vector database. If you have not, you will. As of 2026, vector databases sit at the heart of most production AI retrieval pipelines, and understanding what they actually do, as opposed to what the marketing suggests, is becoming a core competency for AI practitioners. The term is frequently misunderstood, and that misunderstanding leads to poor architecture decisions: practitioners sometimes treat vector databases as AI in their own right, assume they can replace a relational database, or expect them to compensate for weak embeddings. None of these is true. Think of it this way: every piece of content you feed into an embedding model becomes a point on a vast, high-dimensional map, and similar content clusters together. A vector database is the specialised infrastructure that lets you ask, in milliseconds, "what is nearest to this point?" This lesson covers what a vector database actually stores, how it retrieves data geometrically rather than by keyword, why the approximate nature of its search is a feature rather than a bug, and where vector databases fit in a production stack and where they do not.

Start this lesson freeFree forever. No card required.
Advanced 15-20 minutes AI for Practitioners Certificate upon completion

Create your free account

Unlock the full lesson, the quiz, and your verifiable completion.

Continue with Google
or
Continue with email

By continuing you agree to the Institute of AI terms of use and privacy policy.

Learners across the UK study with the Institute of AI
Open to everyone From the UK's professional body for AI 100% free, no card required
What you'll learn

By the end of this lesson, you will be able to:

  • Say what a vector database actually stores, and where your source content still lives.
  • Explain how approximate nearest neighbour search trades a little recall for a large gain in speed.
  • Recognise that retrieval quality is set by embedding quality, not by index configuration.
  • Decide when a vector database fits the job, and when keyword or hybrid search beats it.

Recommended before you start

None of these are hard requirements. The lesson is easier if they are already familiar, but everything it uses is explained along the way, so you can start without them.

  • Working knowledge of a conventional database and how it serves queries.
Join Others Learning AI

Free to start. Free to finish. Free to prove.

Start this lesson free
Inside this lesson

3 sections, about 15-20 minutes.

Section one is open to everyone. Create a free account to work through the rest and take the quiz.

01

What a Vector Database Actually Stores

Free preview

One misconception is worth dispelling at the outset: a vector database is not the home of your documents, images, or audio. Its core job is to store embeddings, also called vectors, produced by a machine learning model, along with optional metadata. An embedding is a dense numerical vector that encodes the semantic content of an input as a point in high-dimensional space. When you pass a sentence through a text embedding model you get back an array of floating-point numbers, perhaps 768 dimensions from a model such as BERT-base or 3,072 from a more recent embedding model. Those numbers represent the meaning of the sentence geometrically: sentences that mean similar things produce vectors that are close together, and unrelated sentences produce vectors that are far apart. The model encodes; the database stores and retrieves. The distinction matters because the quality of your retrieval depends entirely on the quality of your embeddings. A vector database is a precision instrument, but it is only as useful as what you feed it, and weak embeddings produce weak retrieval regardless of how sophisticated the indexing is. For each record a vector database typically holds the vector itself, a unique identifier, and optional metadata such as a title, timestamp, or category. The source content, such as the original text chunk, is best kept elsewhere, usually in a relational or document database: the vector store returns IDs and optionally metadata, and your application fetches the full content using those IDs. Some systems let you keep the chunk text in the metadata payload for convenience, but treating the vector store as the canonical copy of your data is an anti-pattern. This also explains why the shorthand that any database with a vector extension is a vector database is dangerous. Postgres with the pgvector extension is a legitimate and useful tool, but it is architecturally different from purpose-built systems such as Pinecone, Weaviate, Qdrant, and Milvus, which are designed from the ground up for high-dimensional vector workloads, with indexing, memory management, and query execution optimised specifically for this task at scale. Pgvector is a sensible choice for smaller workloads or teams already committed to Postgres, but conflating the two can lead to poor performance decisions.

02

How Retrieval Works Under the Hood

Unlock free
03

When to Use One, and When Not To

Unlock free
How it works

Walk away with proof, not just knowledge.

Step 1

Study the lesson

Work through every section at your own pace, from start to finish.

Step 2

Pass the quiz

A short set of questions on what you have just covered.

Step 3

Get your certification

Every completion has a certificate that you can share publicly for anyone to verify.

Your record of completion

Finish the lesson. Keep the proof.

The Institute of AI
Record of completion
Vector Databases Explained
Completed by
Your name
Quiz score
90%
theinstituteofai.co.uk/verify/lesson/…

Pass the quiz and the Institute of AI issues you a record of completion with your score. Every completion has its own public verification page, so the link you put on your CV or LinkedIn profile can be checked by anyone, at any time.

  • Verifiable by anyone, with no account needed
  • One link for your CV, email signature, or LinkedIn profile
  • Issued by the UK's professional body for AI
— Common questions —

Frequently asked questions.

Is this lesson really free?+
Yes. Every AI lesson from the Institute of AI is free to take and free to complete, including the quiz and your record of completion. There is no trial, no card, and no catch.
Do I need a technical background?+
This lesson is pitched at advanced level, so it helps to be comfortable with what is recommended above, though none of it is a hard requirement. Everything is explained in plain English, and if a term matters, the lesson covers it before using it.
How long does this lesson take?+
Around 15-20 minutes to work through, plus the quiz at the end. You can leave and come back at any point.
What do I get when I finish?+
A record of completion with your score, held on your profile. Each completion has a public verification page, so you can share a link on your CV or LinkedIn profile that anyone can check.
What is the Institute of AI?+
The Institute of AI is the UK’s professional body for artificial intelligence. It sets the standard of AI practice, works to that standard itself, and puts it within reach of everyone else. Its work runs across four areas: Accreditation, Practice, Platforms, and AI for All.

Join learners across the UK and start "Vector Databases Explained" today.

Free lessons, a quiz to test what you have learned, and a completion you can verify publicly. All from the UK's professional body for artificial intelligence.

The Institute of AI

Free to learn.
Yours to prove.

Every AI lesson is free to start, free to finish, and ends in a completion you can verify publicly.