Buy the index. Build the eval set. At 5 million chunks and 200,000 queries a month, a managed retrieval API costs roughly $4,800 a year and a per-seat search product lists at roughly $960,000 — and neither number is what makes an architect regret this decision three years later. The thing that does is permission sync: who is on the hook the morning somebody edits a SharePoint group and your assistant starts quoting the restructuring memo back to the people named in it. Price that ownership first. Then price the software.
The Verdict at 5M Chunks and 200,000 Queries
Every vendor benchmarks on the metric it wins. So here is one workload, and every option priced against it: 5 million chunks (about 40 GB of raw source documents) across six systems — SharePoint, Confluence, Google Drive, Salesforce, S3 and one application Postgres — 200,000 retrieval calls a month, 4,000 employees entitled to ask, and permissions inherited from Entra or Okta groups. All metered prices checked on the vendors' live pricing pages on 21 August 2026; the two per-seat rows are estimates, sourced separately below. None of them include the LLM tokens you spend generating the answer, which is a separate bill entirely.
| Option | What you get | Cost at this workload | Who owns permission sync |
|---|---|---|---|
| Bedrock Managed Knowledge Bases | Retrieval API, 6 connectors, parsing + embeddings included | ~$400/mo ($200 index + $200 retrieval) | AWS, checked against the source at query time |
| Azure AI Search (S1 ×4 units) | Index, hybrid search, semantic ranker | ~$1,180/mo ($981 + $199 ranker) | You, unless you run preview APIs |
| Databricks Vector Search | Managed vector index inside the lakehouse | ~$605/mo (vendor's own 5M-vector example) | You |
| pgvector on Aurora Serverless v2 | A vector column. Nothing else. |
~$726/mo infra + the team | You, entirely |
| Onyx Cloud | Finished app, 50+ connectors, permission mirroring | ~$80,000/mo at 4,000 seats, list | Vendor |
| Glean | Finished app, enterprise search | ~$98,890/yr median deal, all sizes | Vendor |
| Vectara | Managed RAG platform, SaaS or VPC | from $100,000/yr | Vendor |
The two per-seat rows are estimates in a way the others are not, and it matters. Every other row is a metered rate you can look up and multiply. Onyx publishes $20 a seat — but also sells an enterprise tier with explicit volume discounts, so the $960,000 is list arithmetic that nobody at that headcount actually pays. Glean publishes nothing: its $98,890 is the median of 55 deals across a wide range of company sizes as of February 2026, not a 4,000-seat quote, and the top of that observed range is $208,897. Treat both as an order of magnitude, not a number. The gap between the substrate tier and the product tier is one to two orders of magnitude and that much is not in doubt; the exact multiple is not knowable without a sales cycle.
The recommendation: run Amazon Bedrock Managed Knowledge Bases or Azure AI Search as the retrieval substrate, and build exactly two things on top — the ingestion contract and the eval set. Build the whole stack on pgvector only when you have one corpus and no per-user access control. Buy a finished per-seat product only when your users are non-technical staff across the whole company and you have no platform team that will still exist in three years.
What the Fully-Loaded Cost Actually Looks Like
The infrastructure line is the smallest number in a build, usually by an order of magnitude. That is the single most consistent thing about build-vs-buy arithmetic, and it is why infrastructure comparisons keep producing the wrong answer.
Run the build side honestly. Aurora Serverless v2 bills $0.12 per ACU-hour with storage at $0.10 per GB-month, so eight steady ACUs and 150 GB of indexed data is about $726 a month. Embedding 5 million chunks at roughly 400 tokens each is 2 billion tokens — $40 at text-embedding-3-small's $0.02 per million tokens, or $260 at text-embedding-3-large's $0.13. Call it $8,700 a year, all in, for the machinery.
Now the part nobody puts in the business case. Six connectors, each with its own auth model, pagination behaviour and deletion semantics. An ACL sync that has to survive a group being renamed. A chunker. A re-embedding path for the day your embedding model is deprecated. An eval harness. On-call. Two engineers for two quarters to build it, then half to one engineer forever. At a fully-loaded $250,000 an engineer, that is $125,000 to $250,000 a year against $8,700 of infrastructure — the servers are about 4% of the bill.
The buy side inverts it. Bedrock Managed Knowledge Bases charges $5.00 per GB of raw data per month for index storage and $1.00 per 1,000 standard Retrieve calls, with document parsing, embedding generation and managed re-ranking all at $0. Forty gigabytes and 200,000 retrievals is $400 a month. Its Agentic Retrieval mode — multi-hop with query planning — is $4.00 per 1,000 calls plus $1.00 per 1,000 of the underlying retrievals it fans out to, so a three-hop average takes the same workload to roughly $1,400 a month. Worth knowing before you turn it on.
Azure prices differently and lands higher. A Standard S1 search unit is $0.336 an hour in US East per the Azure Retail Prices API, so a production two-partition, two-replica configuration is four units at $981 a month, and the semantic ranker adds $1.00 per 1,000 queries after the first 1,000 free each month — about $1,180 a month together. Databricks publishes a worked example for this exact scale: 5 million vectors on three standard endpoint units is $605 a month in US East.
One trap worth naming. The older self-managed Bedrock pattern put your vectors in OpenSearch Serverless, which bills a minimum of 2 OCUs for the first classic collection in an account at roughly $0.24 per OCU-hour — a floor of about $350 a month before a single query runs. The managed knowledge base removes that floor. If you are costing a "build" that quietly rents a managed vector store, you are costing a buy with worse ergonomics.
Permission Sync Is the Line That Predicts Regret
Ask one question of every option: when a user's access changes in the source system, how long until retrieval reflects it, and who wrote that code? Everything else in an RFP is noise next to this.
Amazon's answer is the strongest currently shipping. AWS describes Managed Knowledge Base as performing "real-time access control list (ACL) checks as an additional layer of security on top of existing pre-retrieval ACL filtering", checking permissions "directly with the authoritative source at query time, rather than relying on potentially stale or incorrectly mapped ACL data." That last clause is a description of what the alternative gets you.
Microsoft's answer is honest and more complicated. Azure AI Search now documents four approaches to document-level access control: security filters, POSIX-like ACL and RBAC scopes, Microsoft Purview sensitivity labels, and SharePoint ACLs. Three of the four are preview, gated on the 2026-05-01-preview REST API, and Microsoft states plainly that the preview "can't modify access permissions that were set outside of the 2026-05-01-preview" and that "a timing lag occurs before the 2026-05-01-preview recognizes changes to those access or permission restrictions." The generally available path is security filters — and the security filter documentation says the quiet part out loud: "Azure AI Search doesn't provide APIs or features for populating the security field specifically."
Read that sentence again if you are budgeting an Azure RAG project. You are buying the index and the ranker. You are still building the identity plumbing that makes the index safe to query.
The deletion path is the same shape. Microsoft's own reindexing guidance notes that renaming a field, changing a data type, or assigning an analyzer requires a full drop and rebuild of the index, with an alias to avoid touching application code — a maintenance event you will hit at least once, and one nobody scopes.
Why pgvector Loses the Job It Usually Wins
pgvector is the right default for a single corpus with no per-user access control, and the wrong one the moment retrieval has to be filtered per user. The reason is documented in its own README, not inferred: "With approximate indexes, filtering is applied after the index is scanned."
Follow that through for enterprise RAG. You issue an approximate nearest-neighbour search against an HNSW index, get your candidate set back, and then apply the WHERE clause that restricts results to documents this user may see. pgvector's own worked example: if the condition matches 10% of rows at default settings, "only 4 rows will match on average." Your retrieval did not fail loudly. It returned four chunks instead of twenty, the model answered from four chunks, and the answer was thinner than it should have been — for this user, on this query, silently. Iterative index scans exist to mitigate exactly this, and tuning them is a recall-versus-latency exercise you now own forever.
That is a genuine architectural loss, and it is worth being precise about the boundary. pgvector still wins the case it has always won: one corpus, uniform access, data you already keep in Postgres, and a team that would rather add a column than adopt a system. If that describes you, stay on Postgres and stop reading vendor comparisons. It is when "everyone sees everything" stops being true that the extension stops being the answer.
The other loser at this workload is Vectara. Its pricing page lists SaaS starting at $100,000 a year, VPC at $250,000 and on-premises at $500,000. At 5 million chunks and 200,000 monthly retrievals, the SaaS floor alone is more than twenty years of Bedrock Managed Knowledge Bases. There is a real buyer for that — a regulated organisation that needs a genuine on-premises deployment with a vendor's name on the support contract, which the hyperscaler retrieval APIs will not sell you. If that is not your constraint, you are paying platform money for a retrieval API.
Who Should Not Buy Each of These
This is the section sponsored comparisons never write, so it is the one worth reading twice.
- Do not buy Bedrock Managed Knowledge Bases if you are not already on AWS, if your sources fall outside its six native connectors (S3, SharePoint, Confluence, Google Drive, OneDrive, web crawler), or if you need to inspect and tune the underlying index. AWS is explicit that "you don't interact with the underlying storage." That is the deal: no knobs, no surprises, no escape hatch.
- Do not buy Azure AI Search if you need generally available document-level ACLs this quarter. The native ACL, SharePoint and Purview paths are preview; the GA path leaves the identity sync to you. Buy it if you are a Microsoft 365 shop who will happily run preview APIs, or if your permission model is simple enough for string filters.
- Do not build on pgvector if retrieval is permission-filtered per user, or if you are past roughly 10 million vectors with a hard latency SLO. Its approximate indexes also cap at 2,000 dimensions — the
vectortype stores up to 16,000, but a larger embedding needs half-precision or subvector indexing before it can be indexed at all. - Do not buy Glean below a few hundred seats, and go in knowing you cannot get a number without a sales cycle. Vendr's marketplace data — 55 deals, median contract value $98,890, range $29,880 to $208,897 — is the closest thing to a published price, and Vendr notes the platform "does not publish transparent list pricing publicly."
- Do not buy Onyx Cloud at scale without doing the seat arithmetic. $20 per user per month billed annually is reasonable for 200 people and $960,000 a year for 4,000. The MIT-licensed Community Edition is genuinely free and ships 50+ connectors, but SSO, role-based access control, audit trails and white-labelling sit in the Enterprise Edition — which is to say, the four things your security review will ask for.
- Do not buy Pinecone expecting a predictable monthly line. Storage is $0.33 per GB-month with read units at $16–$18 per million on Standard, against a $50 monthly minimum ($500 on Enterprise) — but read units scale with data scanned per query, so the dominant term is the one you cannot forecast from a document count.
The Hybrid Path: Buy the Substrate, Own the Contract
Build-vs-buy is a false binary, and the useful version has three tiers, not two: the product (Glean, Vectara, Onyx Cloud), the substrate (Bedrock, Azure AI Search, Databricks), and the primitive (pgvector, Qdrant, Weaviate). Almost every enterprise that gets this right buys at the substrate tier and builds two artefacts on top.
Artefact one: the ingestion contract. A written, versioned specification of what enters the index — which repositories, which document types, what gets excluded, how documents are chunked, what metadata every chunk carries, and how a deletion in the source becomes a deletion in the index. This is a document, not a service, and it is the thing that makes retrieval debuggable eighteen months from now. Whichever vendor you pick, they will not write it for you, because it encodes decisions only you can make.
Artefact two: the eval set. Two hundred real questions from real users, each with the chunk that should have been retrieved, scored on every release. This is the only asset in your RAG stack that survives a vendor swap, which is precisely why it must never be outsourced. It is also what turns retrieval quality from an argument into a number.
The best public evidence that this layer pays comes from Anthropic — which measured that contextual embeddings alone cut the top-20 retrieval failure rate by 35%, from 5.7% to 3.7%; adding contextual BM25 took it to 49%; adding a reranker reached 67%, down to 1.9% — with a one-time cost of $1.02 per million document tokens to generate the contextualised chunks, using prompt caching. Discount it appropriately: the technique consumes the vendor's own tokens, every headline figure is measured at a single retrieval depth, and the four corpora tested were codebases, fiction, arXiv and science papers, none of which is an enterprise wiki. The direction is well established; the magnitude on your corpus is not. None of that is a database decision. It is a pipeline decision, made above whatever index you rented, and it moves accuracy further than any vector store swap will.
If your documents are the hard part rather than your permissions, price the parsing separately. LlamaCloud sells credits at 1,000 credits for $1.25, with a $50/month Starter tier including 40,000 credits and a $500/month Pro tier including 400,000 — cheap next to a team writing PDF table extraction, and worth buying before you buy anything else.
Five Things That Change This Answer
- A hard residency or air-gap requirement. Cost stops being the variable. Self-host Onyx CE or run pgvector inside your boundary and accept the engineering, or pay Vectara's $250,000 VPC floor. The true cost of self-hosting is real but the residency case is the one that justifies it.
- Your corpus is one system, not six. The connector argument — the strongest argument for buying — evaporates. Build.
- Your users are the whole company, not one team. Per-seat products include an application, a UI, admin tooling and a support line. The substrate options include none of that. At $20 per seat per month, a per-seat product costs $240 per seat per year; three fully-loaded platform engineers at $250,000 each is $750,000, which is the crossover at roughly 3,100 seats. Below that the product is cheaper than the team that replaces it. Above it, the substrate wins on paper — and only on paper, because the team has to actually exist and still exist in year three.
- Your permission model is not group-based. Row-level entitlements, matter-level access in a law firm, patient-level scoping in a hospital: no vendor's ACL feature maps to it, and you will build the filter regardless. That makes the substrate tier the only sensible choice, because you are paying for the index and nothing else.
- Your embedding model gets deprecated. It will. Under buy, that is a resync someone else schedules. Under build, it is a project: re-embed 5 million chunks, rebuild the index, revalidate recall, and prove nothing regressed. The eval set is what turns that from a quarter into a week.
Run This Decision in the Next 30 Days
This week: Write the ingestion contract. One page per source system: auth model, deletion semantics, permission model, expected freshness. The system you cannot describe in a page is the one that will break the project.
This month: Build the 200-question eval set before you shortlist a vendor, not after. Then run one adversarial test against every candidate — index a document only one group can see, query as a user outside that group, and check both the retrieved chunks and the generated answer. Then revoke that user's access in the source system and time how long until retrieval reflects it. That number is your real SLA, and no vendor publishes it.
Before your next budget cycle: Price all three tiers against your actual seat count and query volume, using the dated figures above as the starting point and your own salary numbers for the build. Put the engineer-years on the same slide as the infrastructure. If the fully-loaded build cost is not at least 10× the infrastructure line, you have not costed it yet.
The Bottom Line
Enterprise software has run this cycle before. Full-text search was something serious companies built, then something they rented. Message queues went the same way, a decade later. Both moved for the same reason: the differentiated part was never the index or the broker, it was what you fed it and how you measured what came back out.
RAG is at the same turn, a little earlier. The vector database has been commoditised — only one option in the category even publishes a straightforward rate — and the retrieval API is following it down. What is not commoditised, and will not be, is the contract governing what enters your index and the eval set proving it comes back correctly.
Rent the index. Own the contract. Own the evals.
Continue Reading
- What RAG Actually Costs: $1,308 a Month at 10M Tokens/Day
- Vector Database Pricing: Only pgvector Publishes a Rate
- Best RAG Platforms for Regulated Industries: Permissions First
- Pinecone vs Weaviate vs pgvector: Stay on Postgres
- Self-Host the Vector DB for Residency. Not for the Bill.
- The Build-to-Buy Spectrum: 5 Tiers for Enterprise AI Agents
- LangChain Alternatives: Fix Durability Before You Rewrite
- Snowflake Cortex vs Databricks Mosaic AI: Pick on Exit Cost
