Data & Memory

Vector Databases

3 min read

A different kind of database

Relational databases organize information into neat rows and columns — perfect for structured data like names, dates, and prices. But AI deals constantly with unstructured data: text, images, video, audio. You can't fit a paragraph or a photo into a spreadsheet cell in any meaningful way.

To make unstructured data usable by computers, we convert it into vector embeddings — arrays of numbers that capture the meaning or characteristics of the original content. Those embeddings are then stored and organized in a vector database.

Clustering by similarity

In a vector database, similar things end up positioned close together in "vector space," and dissimilar things end up far apart. The closeness is measured using similarity metrics — mathematical ways of asking "how alike are these two things?"

Imagine YouTube's library of millions of videos. They could be grouped by genre: vlogs, gaming, tutorials, tech reviews, music, and so on. To make that library searchable at scale, every video is converted into a vector and indexed so that videos with similar genre, content, or style sit near each other. That's what makes near-instant search and recommendation possible across millions of items.

Diagram — Similar Items Cluster Together in Vector Space

Vector space — items embedded as points, grouped by similarityGamingMusicTutorials & how-tosVlogs & tech reviewsfar apart = dissimilarIndexing keeps related items close together — so search stays fast even across millions of vectors.

Why speed matters here

Now scale that idea up to the size of the data used to train large language models — potentially billions of embeddings. Searching through that volume one item at a time would be unworkably slow. Vector databases solve this with specialized indexing and machine learning techniques that make similarity search fast even at enormous scale.

Beyond search: giving LLMs memory

Search is the headline use case, but it's not the only one. Vector databases can also give LLMs something resembling long-term memory — by storing past interactions or learned information as vectors that the model can reference later.

Picture an AI chatbot assistant that remembers details from your previous conversations and uses them to give you more relevant, personalized responses over time. That's a vector database working behind the scenes.

Popular vector databases

A few names come up often in this space:

  • Pinecone — popular, but not open source
  • Weaviate, Milvus, Chroma, Elasticsearch — widely used open source alternatives

That split between proprietary and open source tooling isn't unique to vector databases — it's one of the defining tensions of the entire AI landscape, which is exactly what we'll dig into next.

Key takeaway

Vector databases turn unstructured data — text, images, audio — into searchable, comparable representations, and they're the backbone of both fast similarity search and long-term memory for AI systems.

What's next?

We'll zoom out from individual tools to a much bigger question: should you build on open source AI, or rely on closed, proprietary models?