esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • Book a callContact
  • Download ResumeContact
Let’s talk

I’ll build the agent for it.

AI engineering / Core / 02.13

Choosing a vector store

Your vectors need a home. Learn the questions to ask, and how eight real stores describe themselves, before you pick one.

12 min readFree

Your vectors need a home

The last lesson, Indexing Embeddings, ended with a promise: next, choosing a vector store, where your vectors live. Here it is.

Think of your vectors as a pile of index cards. Each card is a list of numbers that stands for the meaning of a piece of text. Ten cards fit on your desk. Ten million do not. At some point you need a cabinet with labelled drawers, and a clerk who can find the right card fast. A vector store is that cabinet and clerk.

There are many cabinets to buy, and they look alike in the shop window. This lesson does not pick one for you. It gives you the questions to ask, shows how eight stores describe themselves in their own words, and lets you run a tiny checker that turns your needs into a shortlist.

Key words

Vector store
A place that keeps vectors (lists of numbers) and can find the ones closest to a vector you give it. People also say vector database.
Library
Code you add to your own program. It runs inside your program, like a calculator app that lives on your phone.
Server
A program that runs on its own and answers requests from other programs. You start it, keep it running and connect to it.
Managed service
A server that a company runs for you. You sign up, connect, and they keep it running.
Database extension
An add-on that gives a database you already use the power to store and search vectors.
Metadata filter
A rule that limits a search to cards with a certain label, such as "only documents from 2026".
Data location
The country or machine where your data physically sits.

Tip

The facts in this lesson about each store were checked on 16 November 2026. Products change, so open the linked pages at the end before you decide.

Four kinds of store

Before names, learn the shapes. Almost every vector store is one of four kinds. The kind matters more than the brand, because it decides who runs the thing and where your data sits.

  • A library inside your program

    You add it like any other package. There is no separate thing to start. Easy on a laptop, and your program is the only one that uses it.

  • A server you run

    A separate program that your app talks to over the network. Several apps can share it. You install it, update it and keep it alive.

  • A managed service

    The same idea, but someone else runs the server. You get less work, and your data lives on their machines.

The fourth kind is a database extension. If your product already keeps its users and orders in a database, that database may be able to hold vectors too. Then you have one cabinet instead of two.

A store can also be more than one kind. Several of the eight below can be run yourself or used as a managed service. We will point that out as we go.

Six questions to ask first

Do not start with a comparison chart. Start with your own project. These six questions do most of the work.

  1. 1

    Do I already run a database that can store vectors?

    If yes, try it first. One system to back up and watch is easier than two. If it is too slow or too small later, you can move.

  2. 2

    How many vectors will I have?

    A few thousand pieces of text is a small job. Hundreds of millions is a big one. Say your number out loud, with a rough guess for next year.

  3. 3

    Do I need filters?

    Many products need "only this customer's files" or "only English pages". Check that the store can filter while it searches, not just afterwards.

  4. 4

    Where must the data live?

    Some customers, laws or contracts say the data must stay in one country or on your own machines. A managed service may or may not allow that. Ask.

  5. 5

    How will I back it up?

    If the store loses your vectors, you can rebuild them from the original text, but it takes time and, with a paid embedding model, money. Know who makes the copies.

  6. 6

    What will it cost, and who looks after it?

    Cost is money for the store plus your time. A free library costs you little money but your own time to run it. Pricing pages change, so check them on the day.

Tip

Write your answers down before you read any product page. Otherwise the page will decide your questions for you.

Eight stores, in their own words

Here is what each store says about itself. Every quote below is copied from its own documentation page, fetched on 16 November 2026. The order is the order of our course plan, not a ranking. There are no prices and no scores, because the right pick depends on your answers above.

Two lists of four. First, the ones that describe themselves as a library, a server or an open-source project.

  • Chroma

    Its docs say: "Chroma is licensed under Apache 2.0. Run it locally, self-host, or use Chroma Cloud for a managed, serverless experience." So one name covers running it on your laptop, running it yourself, and a managed option.

  • Weaviate

    Its docs say: "Weaviate is an open-source vector database designed to store and index both data objects and their vector embeddings." The same page lists separate sections for deploying it yourself and for Weaviate Cloud.

  • FAISS

    Its README says: "Faiss is a library for efficient similarity search and clustering of dense vectors." It also says it "contains algorithms that search in sets of vectors of any size, up to ones that possibly do not fit in RAM". It is a library, not a server.

  • LanceDB

    Its docs describe LanceDB Embedded as "An open-source, embedded retrieval library that runs inside your application process, with no separate database server to deploy." They also list LanceDB Enterprise, "A distributed multimodal lakehouse service for production workloads".

Now the other four: a server with a cloud option, a service, and two that sit inside a general-purpose database.

  • Qdrant

    Its overview says: "Qdrants operates in a client-server architecture" (the typo is theirs), and speaks of getting started "with Qdrant Open-Source or Cloud". So it is a server, which you can run yourself or use in the cloud.

  • Pinecone

    Its docs describe Pinecone Database as powering "retrieval for AI agents and applications". They mention keeping each tenant's data separate by using namespaces, and "backing up your indexes and deploying in your own cloud account with Bring Your Own Cloud (BYOC)".

  • Supabase

    Its docs say: "Supabase provides an open source toolkit for developing AI applications using Postgres and pgvector." So the vectors live in a Postgres database, as a column next to your other data.

  • MongoDB Atlas

    Its docs say you can use MongoDB Vector Search "to seamlessly search and index your vector data alongside your other MongoDB data", and that it can "filter your queries on other fields in your collection". A note on the page says it also works with self-managed or local Atlas deployments.

Read those again with the four kinds in mind. FAISS and LanceDB Embedded are libraries. Qdrant and Weaviate are servers. Pinecone is described as a database you build on through its API. Supabase and MongoDB give vector search to a database that does other jobs too. Chroma and LanceDB each reach across more than one kind.

One thing the pages do not do is tell you which is faster, cheaper or better for your data. Be careful of any blog post that claims to.

What using one looks like

To see how little code a small store needs, here is the first example from the Chroma Getting Started page. It makes a collection (a named drawer), adds two sentences, and asks for the two closest to a question. The page says Chroma will embed the text for you, which means it turns the words into vectors with an embedding model.

A warning. This snippet is copied from the docs and was not run here. It needs a package you install first (pip install chromadb), and what else it needs, such as an embedding model, is set out on the docs page, so read that page before you try it.

Text
# From the Chroma docs (Getting Started), shown without its output (not run here)
import chromadb
chroma_client = chromadb.Client()

collection = chroma_client.create_collection(name="my_collection")

collection.add(
    ids=["id1", "id2"],
    documents=[
        "This is a document about pineapple",
        "This is a document about oranges"
    ]
)

results = collection.query(
    query_texts=["This is a query document about hawaii"], # Chroma will embed this for you
    n_results=2 # how many results to return
)
print(results)

The same page explains the first line: "In this guide we used Chroma's in-memory client for simplicity." It adds that any data you ingest will be lost when your program terminates, and that a persistent client or a client-server mode exists if you need the data to stay.

That is a good lesson in itself. The same tool can behave very differently depending on how you start it. Ask which mode a tutorial is using before you copy its setup into a product.

A requirements checker you can run

Now a small program that does the "six questions" step for you. It uses plain Python, no packages and no network.

Important: the four store types in this code are made up and generic. They are not real products, and the yes/no flags are invented for the lesson. Do not use the output as advice about any real store. The point is the method: write down what you must have and what would be nice, then let a few lines of code do the sorting.

Each project has a "must" list and a "nice" list. A store that misses any must is dropped, and the code says why. The rest are ranked by how many nice things they offer. There are two projects: a prototype on a laptop, and a product with strict data-location rules.

Python
# Four made-up store TYPES (not products). True means "yes".
STORES = {
    "in-process library": {"no_server": True, "own_machine": True, "filters": False, "big_scale": False, "auto_backups": False, "reuse_db": False},
    "self-hosted server": {"no_server": False, "own_machine": True, "filters": True, "big_scale": True, "auto_backups": False, "reuse_db": False},
    "managed service": {"no_server": True, "own_machine": False, "filters": True, "big_scale": True, "auto_backups": True, "reuse_db": False},
    "database extension": {"no_server": False, "own_machine": True, "filters": True, "big_scale": False, "auto_backups": True, "reuse_db": True},
}

PROJECTS = {
    "laptop prototype": {"must": ["no_server"], "nice": ["own_machine"]},
    "strict data-location product": {"must": ["own_machine", "filters"], "nice": ["auto_backups", "big_scale", "reuse_db"]},
}

def check(project):
    shortlist = []
    for name, flags in STORES.items():
        missing = [m for m in project["must"] if not flags[m]]
        if missing:
            print("  out:", name, "- lacks", ", ".join(missing))
            continue
        hits = [n for n in project["nice"] if flags[n]]
        shortlist.append((len(hits), name, hits))
    shortlist.sort(key=lambda row: (-row[0], row[1]))
    for score, name, hits in shortlist:
        print("  keep:", name, "- extras:", ", ".join(hits) or "none", f"({score}/{len(project['nice'])})")

for title, project in PROJECTS.items():
    print(title)
    check(project)

Output

laptop prototype
  out: self-hosted server - lacks no_server
  out: database extension - lacks no_server
  keep: in-process library - extras: own_machine (1/1)
  keep: managed service - extras: none (0/1)
strict data-location product
  out: in-process library - lacks filters
  out: managed service - lacks own_machine
  keep: database extension - extras: auto_backups, reuse_db (2/3)
  keep: self-hosted server - extras: big_scale (1/3)

Read the output. For the laptop prototype, the only must is "no server to run". Two types fail it. Of the two that stay, the in-process library offers the one nice thing (it keeps data on your own machine), and the managed service offers none, so it ranks lower.

The second project changes the answer completely. Data must stay on your own machine and filters are a must. The in-process library has no filters in our made-up table, and the managed service does not keep data on your machine, so both are out. The database extension and the self-hosted server remain. The extension offers 2 of 3 nice things (automatic backups and reusing a database you already run). The server offers 1 of 3 (it scales big).

Same four types, two projects, two different shortlists. A real decision has more questions, but the shape is the same.

Tip

Try editing the flags and the "must" lists. Add a project of your own, such as "an app for a hospital". Watch which stores drop out first.

Mistakes to avoid

A few traps catch people who are choosing for the first time.

  • Choosing for a scale you do not have

    A small project rarely needs the biggest system. Pick for today's size plus a sensible guess, and plan to move if you grow.

  • Forgetting where the data sits

    A managed service is convenient, but your customers' text now lives on someone else's machines. Settle data location before you build, not after.

  • Trusting a benchmark you did not run

    Speed charts depend on the data, the settings and the machine. Test with a small copy of your own data.

One more tip: keep the original text. Vectors can be rebuilt from text, but text cannot be rebuilt from vectors. If you keep the source, switching stores later is a copy job, not a disaster.

Quick check

Quick check

Your product already keeps all its data in one database that can store vectors. What is a sensible first move?

Quick check

A tutorial uses an in-memory client. What happens to your data when the program stops?

What to remember

  • Start with your questions

    Existing database, number of vectors, filters, data location, backups and cost. Answer them before you look at a product page.

  • Know the four kinds

    Library, server, managed service and database extension. Several products can be more than one kind.

  • Keep your source text

    With the original text saved, changing stores later is just a copy.

The Embeddings lessons covered how text becomes vectors, and the Machine Learning Foundations course covers the maths of distance in more depth. Here we only needed the idea that nearby vectors mean similar text.

Next: performing similarity search, asking the store for the nearest pieces.

Sources

How is this lesson?

Last updated on 16 November 2026

Learn with me

Every lesson is free. I add new ones as I learn. Have a question, or want help with your own work? Book a short call.