Vector Databases Explained: The Infrastructure Behind RAG Systems
What vector databases actually do, when you need one, and how to choose between Pinecone, pgvector, and Weaviate.
Retrieval Augmented Generation (RAG) has become the default architecture for AI systems that need to reason about your specific data, not just general world knowledge. At the center of most RAG architectures is a vector database, a technology that many engineers encounter for the first time when building AI systems.
Here's a clear eyed explanation of what vector databases do, when you need one, and how to choose the right one for your use case.
What Is a Vector Database?
A vector database stores data as high dimensional numerical vectors (embeddings) and allows efficient similarity search over those vectors. Instead of finding records that exactly match a query, vector databases find records that are semantically similar, closest in the high dimensional space.
Why this matters for AI: When you convert text to embeddings using a model like OpenAI's text-embedding-3-large, you get a vector where semantically similar text is geometrically close. "What are your return policies?" and "How do I return a product?" will have similar vectors, even though they share no exact words. A vector search finds this semantic similarity.
The RAG Architecture
A typical RAG system works like this:
Ingestion: Your documents (product descriptions, knowledge base articles, order history) are chunked into pieces and embedded into vectors. Those vectors, along with the original text, are stored in the vector database.
Query: When a user asks a question, the query is also embedded into a vector.
Retrieval: The vector database finds the chunks most similar to the query vector (nearest neighbor search).
Generation: The retrieved chunks are included in the LLM prompt as context. The LLM generates an answer grounded in your actual data.
This architecture solves two fundamental LLM limitations: knowledge cutoff dates and context window size. Your vector database can index millions of documents; the LLM only needs to see the most relevant ones.
When Do You Need a Vector Database?
You need a vector database when:
- You're building a system that must answer questions about a large corpus of proprietary documents
- You need semantic search (find similar, not exact match)
- You're implementing product recommendation systems
- You need to detect duplicate or near duplicate records
- Your knowledge base is too large to fit in a single LLM context window
You probably don't need a dedicated vector database when:
- You're working with a small corpus (< 10,000 documents) where in memory search is sufficient
- You just need keyword search
- You're using an LLM for generation only and don't need to retrieve from your own data
The Options
Pinecone
Pinecone is the fully managed option: no infrastructure to operate, autoscaling handled for you, and a clean API that's easy to start with.
Best for: Teams that want to move fast without managing vector database infrastructure. Pinecone's simplicity has a cost. It's not the cheapest at scale and the fully managed model means less control.
pgvector
An extension to PostgreSQL that adds vector storage and similarity search. If you're already running Postgres, pgvector lets you add vector capabilities without a new database.
Best for: Organizations already on PostgreSQL that want to avoid adding a new system to their stack. Works well for medium scale use cases. Performance doesn't match purpose built vector databases at very large scale, but for most commercial RAG applications, it's entirely adequate.
Weaviate
Open source, self hostable, with multi modal support (text, images, video). More configuration than Pinecone but more flexibility and no per vector pricing.
Best for: Organizations with mature infrastructure teams who want to self host and have multi modal requirements. Also works well as a managed offering via Weaviate Cloud.
Qdrant
High performance, open source, Rust based. Excellent filter performance (hybrid search: vector similarity + metadata filtering). Strong choice for production workloads where performance matters.
Chunking Strategy
Vector databases are only as good as the chunks you put into them. Poor chunking strategy is the most common reason RAG systems underperform.
Fixed size chunking: Divide documents into fixed length chunks with overlap. Simple, predictable, works well for uniform documents.
Semantic chunking: Use a model to identify natural semantic boundaries and chunk at those points. More expensive but produces better retrieval quality.
Hierarchical chunking: Store document summaries alongside paragraph level chunks. Query returns summaries first, then retrieves relevant paragraphs. Works well for long documents.
The right chunking strategy depends on your document types. Long form content (documentation, legal documents) benefits from hierarchical chunking. Short form content (product descriptions, FAQ answers) often works fine with fixed size.
More from the lab.
NetSuite's Native AI Agents vs Custom MCP Tools: What Actually Moves the Needle in 2026
NetSuite 2026.2 brings Ask Oracle, a conversational assistant for natural language questions over your ERP data, and AI Canvas, a workspace for organizing the scorecards and charts that come out of that conversation. Both ship native, inside the NetSuite Next experience, available now in the United States and Canada. That is real progress on the question teams have been building custom NetSuite integrations to answer for years. It is also not the same question as whether to build a custom Model Context Protocol tool against your own schema, which remains the highest leverage move for anything Ask Oracle was never designed to touch.
Adobe Commerce's September 2026 Storefront Release: What B2B and Headless Teams Need to Verify
Adobe shipped its September 2026 Commerce Storefront release with six changes worth a headless or B2B team's attention: Free Gift Selection, an expanded Payment Services drop in with Google Pay and PayPal Buttons, Multiple Named Wishlists, a shared B2B Company Address Book with role based permissions, accessibility improvements across cart and account, and a reCAPTCHA fix for B2B company registration. Five of these are low risk component updates. The sixth ships with an action item, passing an explicit configuration flag, that will break company registration on B2B enabled backends if a team skips it. This post walks through what shipped, the versions behind it, and a verification checklist to run before this release reaches production.
Claude Code's Permanent 17 Percent Usage Cut: What Changed and How to Budget For It
If your team's Claude Code usage suddenly feels tighter this month, the numbers explain why. A temporary 50 percent weekly limit boost expired on August 31, 2026, and the permanent replacement that took effect September 14 is a 25 percent increase, not a 50 percent one. Anthropic said so directly in its own announcement: compared to the boosted summer level, this works out to a 17 percent reduction in weekly limits on Claude Code. That is an unusually plain admission from a vendor, and it is worth taking at face value rather than decoding it as marketing language. This post lays out the full timeline from May through September, why the separate 5 hour session change does not offset the weekly cut, and three concrete steps for budgeting a team's Claude Code usage against the new permanent ceiling.