Varun Vemulapalli

Day 30 of 100 · Phase 4: Giving AI knowledge

Vector databases

2 min readBy Varun Vemulapalli

A home buyer types: "quiet family home near good schools with a big yard."

No listing contains that sentence. A vector database can still find the right ten homes out of 200,000 in well under a second.

Video explainer · 1:42
Key takeaway

A vector database stores embeddings with their metadata and quickly finds the closest matches by meaning, which is what makes semantic search work at scale.

Day 30 visual: Vector databases
The visual from the original post.

The concept

Yesterday (Day 29) semantic search compared the meaning of a question with the meaning of each document, using embeddings (Day 11). Fine for 3 articles. What about millions?

A vector database stores embeddings (a "vector" is just a list of numbers) and is built to answer one question fast: "which stored items are closest to this one?" That's called nearest-neighbor search.

Walkthrough: a real-estate site

Ahead of time

  • 200,000 listings. Each description ("Tree-lined cul-de-sac, 4 bedrooms, fenced half-acre lot, walk to the elementary school") is turned into an embedding.
  • Each embedding is stored with metadata: price, city, bedrooms, listing date.

At search time
1. The buyer's sentence becomes an embedding too.
2. Metadata filters narrow the field first: city = Austin, price under $550,000. Say 200,000 becomes 6,000.
3. The database finds the nearest neighbors among those 6,000: listings whose meaning is closest. "Cul-de-sac, fenced half-acre, walk to school" scores high, even without the words "quiet" or "big yard".
4. The top 10 come back, ranked by closeness.

Why not a normal database?

A regular database is great at exact questions: price < 550000 AND city = 'Austin'. It has no idea which descriptions mean "quiet" or "family-friendly". Comparing one query against every stored vector, one by one, gets slow as the numbers grow.

Approximate nearest neighbor (ANN), in one line: the database builds a smart index (like a map of neighborhoods) so it checks a small, promising area instead of every listing, trading a tiny bit of accuracy for a big jump in speed.

Many teams don't buy a separate product: several traditional databases now offer vector search too. The idea is what matters.

Where you see it at work

  • Banking: finding past customer complaints similar to a new one.
  • Insurance: matching a new claim to similar historical claims for review.
  • Healthcare: searching clinical guidelines or de-identified case notes by meaning.
  • Retail: "more like this" product recommendations.
  • Product management: grouping thousands of feedback comments by theme.

In one sentence

A vector database stores embeddings with their metadata and quickly finds the closest matches by meaning, which is what makes semantic search work at scale.

Your turn: if you could search one big pile of text at work "by meaning", which pile would it be? 👇

Join the discussion on LinkedIn