Data & Vector Databases

Vector Databases Explained for Business AI

What a vector database does, how embeddings and similarity search work, when Postgres or a search service you already pay for will do, and what to compare.

By Published Updated

A vector database stores embeddings, which are lists of numbers that represent what a passage means, and returns the stored items closest to a query. AI assistants use one to find the relevant passages in a firm's documents before they answer. Postgres with pgvector, Pinecone, Weaviate and Foundry IQ (Azure AI Search) all offer vector search.

A vector database stores content as embeddings and finds the stored items most similar to a query. In OpenAI's definition, "an embedding is a vector (list) of floating point numbers. The distance between two vectors measures their relatedness." Embeddings of passages about the same idea are close together even when the passages use different words. Microsoft uses "dog" and "canine" as an example in its vector search documentation, along with "dog" in English and "hund" in German.

That's how an AI assistant can find the right paragraph in a policy manual when a customer asks the question in their own words.

How a vector search works

The documents get indexed first. Each one is split into chunks, each chunk is run through an embedding model, and the resulting vectors are stored next to the original text and any metadata, such as the title, date or department. OpenAI's text-embedding-3-small model returns 1,536 numbers per chunk by default, and text-embedding-3-large returns 3,072.

When someone asks a question, the question is run through the same embedding model and the database returns the stored vectors nearest to it, which Microsoft calls the k nearest neighbors. Microsoft's advice in its vector query guide is to "always use the same embedding models used to generate embeddings in the source documents." In a retrieval-augmented generation (RAG) system, the returned passages are added to the prompt, and a large language model writes its answer from them.

The search can be exact or approximate. pgvector, the open-source vector extension for Postgres, "performs exact nearest neighbor search, which provides perfect recall" by default. Adding an HNSW or IVFFlat index switches it to approximate search, "which trades some recall for speed." Weaviate offers the same choice: a flat index "designed for small datasets," an HNSW index that "scales well to large datasets," and a dynamic index that starts flat and switches to HNSW as the collection grows.

Keyword search still matters

Keyword search is built for exact strings, such as a part number, a policy code or a client ID. Pinecone's documentation lists its full-text search, ranked with BM25, for finding "exact IDs, codes, and phrases."

Pinecone, Weaviate, pgvector and Foundry IQ can all run both kinds of search together. Weaviate's hybrid search "combines the results of a vector search and a keyword (BM25F) search by fusing the two result sets." Microsoft says its hybrid queries return "a unified result set, which often provides better results than vector or keyword search alone." pgvector's maintainers suggest using it "together with Postgres full-text search for hybrid search."

Check what you already run

A separate vector database is one option among several. With pgvector you can "store your vectors with the rest of your data," with the usual Postgres features such as point-in-time recovery and joins, and according to its README it comes preinstalled with many hosted Postgres providers. Microsoft's search service, which it now calls Foundry IQ (Azure AI Search), includes vector search "in all regions and on all tiers at no extra charge," although generating the embeddings may incur charges from the model provider. Pinecone, a managed service, serves "full-text, semantic, and sparse-vector search and retrieval from one index."

If your records are already in Postgres, or your firm already pays for Azure AI Search, test vector search there before you add a vendor. Load a sample of your own documents, run the questions your staff and customers ask, and see whether the results and the speed are good enough.

What to compare between products

Start with filtering. Business searches are often filtered: one client, one department, documents after a certain date. Microsoft notes that its search engine "can process the filter before or after executing the vector query." pgvector's maintainers warn that with approximate indexes "filtering is applied after the index is scanned," so a filtered query can return fewer results than you asked for. Since version 0.8.0 you can turn on iterative index scans, which keep scanning the index until enough results are found. Test your real filtered queries before you commit.

If you keep separate clients' documents in one system, check how each product separates them. Pinecone uses namespaces to "keep each tenant's data separate within one index." pgvector's maintainers note that when tenants share an approximate index, "vectors from one tenant can affect recall (and speed) for other tenants."

Then list what your security reviewers will ask for. On Pinecone's pricing page as listed on December 2, 2026, the Standard plan includes single sign-on, role-based access control and a HIPAA add-on, and Enterprise adds Bring Your Own Cloud, private endpoints, customer-managed encryption keys and audit logs. If you use a vector extension inside a database you already secure, there's no new vendor to review.

Plan for a change of embedding model. Queries and stored documents have to use the same model, so switching models means re-embedding everything in the index.

On price, Pinecone listed four plans on December 2, 2026: Starter free, Builder at $20 a month flat, Standard at a $50 monthly usage minimum and Enterprise at a $500 monthly minimum. pgvector is open source. Microsoft charges nothing extra for vector search in Foundry IQ on top of the search service.

How you split documents matters

Microsoft gives two reasons to split documents in its chunking guide. Embedding models have input limits: the Azure OpenAI version of text-embedding-3-small accepts up to 8,191 tokens, around 6,000 words. And one vector can represent a long, varied page poorly, such as a wiki page that covers many subtopics.

Microsoft's suggested starting point is chunks of 512 tokens, about 2,000 characters, with a 25% overlap of 128 tokens between neighboring chunks. For long documents, it suggests adding the document title to chunks from the middle of the document to prevent context loss. Treat those numbers as a first setting, then adjust them against real questions.

Keep the index current

An index contains documents as they were when they were embedded. When a policy changes, the old chunks are still searchable until someone re-embeds the new version and deletes the old one. Add that step to the process your firm uses to publish or retire a document, so people searching get the current version.

Sources

  1. pgvector: open-source vector similarity search for Postgres (README, GitHub) (checked 2026-12-02)
  2. Pinecone Database overview (Pinecone documentation) (checked 2026-12-02)
  3. Pinecone pricing: plans and usage rates (checked 2026-12-02)
  4. Hybrid search (Weaviate documentation) (checked 2026-12-02)
  5. Vector indexing (Weaviate documentation) (checked 2026-12-02)
  6. Vector search in Foundry IQ (Azure AI Search) (Microsoft Learn) (checked 2026-12-02)
  7. Create a vector query in Foundry IQ (Azure AI Search) (Microsoft Learn) (checked 2026-12-02)
  8. Chunk large documents for RAG and vector search in Foundry IQ (Azure AI Search) (Microsoft Learn) (checked 2026-12-02)
  9. Vector embeddings guide (OpenAI API documentation) (checked 2026-12-02)
  10. Embeddings (Anthropic, Claude Platform documentation) (checked 2026-12-02)
the list

Get the next one.

Field notes from real deployments, written the way this one was. No schedule promised and nothing sold to you. Unsubscribe whenever.

Frequently asked questions

Do I need a vector database to use AI at work?

Only if you're building your own search or assistant over your documents. Microsoft lists grounding data for retrieval-augmented generation (RAG) among the main uses of a vector index. pgvector, Pinecone, Weaviate and Foundry IQ (Azure AI Search) all provide one.

Can Postgres do vector search?

Yes, with the open-source pgvector extension. It supports exact and approximate nearest neighbor search, stores vectors alongside your other data, and works with Postgres full-text search for hybrid search. Its README says it comes preinstalled with many hosted Postgres providers.

How much does a vector database cost?

As listed on December 2, 2026, Pinecone's plans run from a free Starter tier to Builder at $20 a month, Standard at a $50 monthly minimum and Enterprise at a $500 monthly minimum. pgvector is open source. Foundry IQ (Azure AI Search) includes vector search at no extra charge on all tiers.

Which embedding model should I use?

Test a few on your own documents. OpenAI offers text-embedding-3-small and text-embedding-3-large. Anthropic doesn't offer its own embedding model, and its documentation points to Voyage AI. Whichever you pick, use the same model for documents and queries, and expect to re-embed if you switch.

Is vector search better than keyword search?

They find different things. Vector search matches meaning, so a question in different words still finds the right passage. Keyword search finds exact IDs, codes and phrases. Pinecone, Weaviate, pgvector with Postgres and Foundry IQ all support hybrid search that runs both, and Microsoft says hybrid often beats either alone.

Not sure where AI fits?

An AI audit shows where it pays off in your business.

We look at how the business runs today and find the work AI can take on. You get a ranked list of opportunities, a written AI use policy and a plan.

see how the audit works