Build vs buy · 2026

Build vs buy: AI documentation assistant

Every engineering team looks at OpenAI's Assistants API or LangChain and thinks 'we could just build this ourselves in a week'. Then two months later they have a chatbot that hallucinates on error codes, no evals, no analytics, no Slack bot, and one person on the team who understands the retrieval code. This is an honest breakdown of what each path actually costs, based on how customers have described the trade-off to us.

At a glance

Time and cost estimates are order-of-magnitude, drawn from published build-your-own case studies and BeforeQuery customer conversations. Your mileage will vary.

Feature
Build in-house
OpenAI Assistants / LangChain / LlamaIndex
Buy — BeforeQuery
Packaged, self-serve
Time to first working chat
2-4 weeks (a hackathon prototype)
Under an hour
Time to production-quality (evals, abstention, analytics)
3-6 months
Included — day one
Retrieval pipeline
You design chunking, embeddings, hybrid search, reranking, abstention. Every step has 3-5 decisions and no one right answer.
Included: HTML→markdown, heading-aware chunking, hybrid retrieval (pgvector + BM25 + RRF), cross-encoder reranker, abstention gate.
Source connectors
You write each one: crawl, chunk, embed, incremental sync, webhook re-index. A single connector done well is 2-4 engineering weeks; keeping it working as vendors change APIs is ongoing.
18 included: websites, GitHub/GitLab, Notion, Confluence, GDrive, SharePoint, Zendesk, Jira, Linear, Salesforce, Shopify, Slack, Discourse, Stack Overflow, YouTube, files.
Chat surfaces
Widget, Slack, Discord, Teams, MCP, form deflector, in-helpdesk copilot — each is its own project (OAuth, event handlers, install flow, feedback loop, per-platform quirks).
All included on Pro. One install per platform.
AI evals harness
You build it. Most in-house projects skip this and discover it after a bad release. When it exists, it's usually a hand-rolled test set that nobody updates.
Automated LLM-as-judge groundedness + citation scoring per answer. Trends per week. Exportable via API.
Analytics + gap discovery
You'd build a dashboard, an aggregation pipeline, an unanswered-questions report, and per-user feedback UX.
Included: questions/week, top sources, gap ranking by volume, feedback ratios, token/cost visibility, doc-proposal drafts for gaps.
Ongoing engineering
1-2 engineers indefinitely — connectors break, models get deprecated, features get requested, retrieval regresses on new content.
Zero from your team. Model deprecations, connector breakage, new features shipped for you.
First-year cost
~$300k-$600k (2 engineers × loaded cost) + LLM usage + infra. Excludes the opportunity cost of not shipping product features.
~$1,200/year (Pro) up to Enterprise (custom, typically low 5-figures). LLM usage is either bundled or run on your own account (BYOK) on Enterprise.
Ownership when the builder leaves
The bus factor is real. Retrieval code is often a 'we know it works, don't touch it' area of the codebase within a year of the person leaving.
SaaS. Support and docs are our problem.

When building is the right call

Two scenarios genuinely favour building. Scenario 1: The assistant is your differentiator. If the AI you build *is* the product — a coding agent, a therapy chatbot, an on-brand character, a domain-specific reasoning system — the flexibility of a framework is worth the engineering. You're not going to buy a packaged 'docs assistant' if the whole company is being built to be a coding assistant. Fair. Scenario 2: You have unusual retrieval requirements. If your knowledge doesn't fit into 'docs + wikis + tickets + code' — for example, structured claims data, medical records with strict lineage, or a proprietary knowledge graph — off-the-shelf retrieval may not model your data correctly. That's a real reason to build. Outside those two, building a docs assistant in 2026 is usually a case of 'we assumed this was a two-week job'. It isn't.

When buying is the right call

Everyone else. If your problem is 'we have docs and wikis and tickets, and we want an AI assistant that answers questions from them with citations, in our widget / Slack / Teams / helpdesk / IDE, without hallucinating', that's the exact problem BeforeQuery and its peers are built for. The engineering time you'd spend building the platform is engineering time you're not spending on your actual product. The buy path also has a hidden option that in-house builds skip: evals from day one. Every serious packaged platform ships LLM-as-judge evals that score every answer. That's the difference between 'we think it's working' and 'here's the trending score, here's the regression'. In-house builds usually add this six months in, after a bad release forces the conversation.

What the hybrid looks like

Some teams end up in a middle position: buy the platform for 80% of the work, extend it for the 20% that's specific to them. BeforeQuery's public API + SDKs + MCP + A2A + Agents SDK are designed for this — you get the packaged retrieval, connectors, evals, and analytics, and you build custom experiences (mobile, in-product widgets, agent workflows) on top of the platform. That's usually the answer when 'buy' feels like it's leaving something on the table. You're not choosing between packaged and custom; you're layering custom on packaged.

Frequently asked questions

Can't LLMs just answer from our docs without RAG now?

No — LLM context windows are large but the model still can't reliably answer 'what changed in v4.2' without retrieving your changelog. Retrieval is what makes the answer correct and citable. What has changed is that MCP lets external AIs (Cursor, Claude, ChatGPT) retrieve directly from your platform, which is why every serious platform now ships an MCP server.

How much does BeforeQuery actually cost at scale?

Pro is $99/month flat (1,000 questions, 5 KBs, 10 seats). Enterprise is custom based on question volume, SSO / DPA / regional residency requirements, and BYOK. A mid-market SaaS with 20-50k questions/month typically lands in the low 5-figures/year — an order of magnitude below the loaded cost of a single engineer working on retrieval full-time.

What if we've already started building?

Then the question is opportunity cost. Every week spent on the platform is a week not spent on your actual product. The most common pattern we see is teams who spent 3-6 months building, hit the 'evals + abstention + analytics + connector maintenance' wall, and switched to a packaged product. Doing that earlier saves the same time.

Can we bring our own model?

Yes on Enterprise. BYOK routes traffic through your OpenAI / Anthropic / Gemini account under your data-processing agreement. You keep the model choice and the invoice; BeforeQuery is the platform.

Is the retrieval quality really different vs a build-your-own on OpenAI File Search?

File Search does vector search on uploaded files. BeforeQuery layers full-text (BM25) and reciprocal rank fusion on top, rewrites the query with an LLM before search, and reranks with a cross-encoder. The difference is most visible on exact-match queries (error codes, SKUs, API names) and on niche vocabulary — the queries that most benchmark suites don't cover but users actually ask.

See it on your own docs

Connect a source and get your first cited AI answer in under 5 minutes. Free plan, no credit card required.