AI and LLMs · Concept

Vector search

Finding items by meaning rather than exact words, by storing embeddings and returning the ones closest to the embedding of a query.

Search and memory · Open source · updated

How it works

Each document chunk, product or image is stored with its embedding. At query time the question is embedded too, and the database returns the nearest vectors, usually filtered by metadata such as language, owner or date. Comparing against every vector is exact but gets slow as a collection grows, so most systems build an approximate nearest neighbour (ANN) index such as HNSW, giving up a little accuracy for a large gain in speed.

You rarely need a separate product to start. pgvector adds vector columns and HNSW indexes to PostgreSQL (Supabase and Neon include it), sqlite-vec adds vector search to SQLite, and MongoDB Atlas, Redis and Elasticsearch have it built in. Dedicated services such as Pinecone, Qdrant, Weaviate, Milvus and Cloudflare Vectorize run the index for you and add features for very large collections.

Vector search pros and cons

Pros

  • Finds relevant results even when the wording differs
  • Works across languages, and for images as well as text
  • Can live inside a database you already run (pgvector, sqlite-vec)
  • The retrieval backbone of RAG and recommendation features

Cons

  • Misses exact terms such as product codes, names and error numbers
  • Every document and every query needs an embedding call
  • Results are harder to explain than keyword matches
  • Changing the embedding model means re-indexing everything

When to use Vector search

Pick it when

  • Search over help articles, notes or products where wording varies
  • The retrieval step of a RAG chatbot
  • Related items, similar tickets or duplicate detection

Skip it when

  • Users search for exact codes, names or phrases (keyword search fits)
  • Structured filters such as price, size or date answer the question on their own

Vector search pricing

Open source

pgvector and sqlite-vec are free. Pinecone, a hosted option, has a free Starter plan, a $20 a month Builder plan and a $50 monthly minimum on Standard.

Vector search pricing page (opens in a new tab)Approximate, checked September 2026.What the other tools cost

Vector search vs the alternatives

More in AI and LLMs

Search and memory

All 22 AI and LLMs terms

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.