How Retrieval-Augmented Generation Is Changing Enterprise Search
A support engineer at a 400-person logistics company recently told us she spent twenty minutes searching the internal wiki for a shipping exception policy she knew existed — because she didn't remember whether it was called a "delivery exception," a "carrier failure," or a "fulfillment override." The document existed. The keyword index just couldn't bridge the gap between her vocabulary and the author's.
That gap is the entire reason retrieval-augmented generation (RAG) has moved from research demo to production requirement in the space of about eighteen months.
Why keyword search breaks down at scale
Traditional enterprise search — Elasticsearch, SharePoint search, Confluence's built-in index — matches strings. It's fast and cheap, but it assumes the searcher and the author use the same words. As an organization's document base grows past a few thousand pages, spread across wikis, tickets, PDFs, and Slack threads, that assumption collapses. Search satisfaction scores in most mid-size companies sit below 40%, and the second-order cost is worse: people stop searching and just re-ask a colleague, which doesn't scale.
RAG systems retrieve based on semantic similarity rather than string matching, then hand the retrieved passages to a language model to synthesize a direct answer with citations. The employee above would have found her answer by describing the situation, not by guessing the exact noun someone used three years ago.
The architecture, without the hand-waving
A production RAG pipeline has four stages, and most of the engineering effort — and most of the failure modes — live in the first two:
- Ingestion and chunking. Documents are split into passages small enough to embed meaningfully but large enough to retain context. Naive fixed-length chunking (e.g., every 500 tokens) frequently splits a table or a procedure mid-step. We've had far better results with structure-aware chunking that respects headings, list boundaries, and table blocks.
- Embedding and indexing. Each chunk is converted into a vector and stored in a vector database (we typically reach for pgvector when a client is already on Postgres, or a managed service like Pinecone or Weaviate for very large corpora with high query volume).
- Retrieval. At query time, the question is embedded and the nearest chunks are retrieved — usually 5 to 15, depending on corpus density. Hybrid retrieval, combining vector similarity with traditional keyword (BM25) scoring, consistently outperforms pure vector search on exact-match queries like part numbers or policy IDs.
- Generation. The retrieved chunks are inserted into a prompt template alongside the user's question, and the LLM generates an answer constrained to that context, with inline citations back to source documents.
User question
→ embed query
→ hybrid retrieval (vector + BM25) against document index
→ top-k chunks + metadata
→ LLM synthesizes answer, citing chunk sources
→ response + "view source" links
The mistake almost everyone makes first
The most common failure we see in client RAG pilots isn't a model problem — it's a chunking and retrieval-evaluation problem. Teams ship a naive implementation, watch it produce confidently wrong answers on 15-20% of queries, and conclude "the LLM hallucinates too much for our use case." In nearly every case we've diagnosed, the actual defect was upstream: the retriever was returning irrelevant or incomplete chunks, and the LLM was doing exactly what it was told — synthesizing an answer from bad context.
The fix isn't a better model. It's building a retrieval evaluation set — 50 to 100 real questions with known correct source documents — and measuring retrieval precision and recall before ever looking at generation quality. Most teams skip this because it feels like it's slowing down the "AI feature," but it's the single highest-leverage step in the entire project.
Where RAG earns its keep
The clearest ROI we've seen has been in three areas:
- Internal knowledge bases for support and operations teams, cutting average ticket resolution time by 30-45% by surfacing answers instead of documents.
- Customer-facing product documentation, where a well-scoped RAG assistant reduces support ticket volume for FAQ-adjacent questions.
- Compliance and policy lookup in regulated industries, where citation-backed answers are a requirement, not a nice-to-have — auditors want to see exactly which clause an answer came from.
What to get right before you scale it
Before rolling a RAG system past a pilot, we push clients to lock down three things: an access-control layer that respects existing document permissions (a shocking number of early prototypes leak restricted content because retrieval bypasses permission checks), a feedback loop that captures thumbs-up/thumbs-down on answers to keep improving the retrieval set, and a clear "I don't know" behavior — a RAG system that guesses when retrieval confidence is low will erode trust faster than one that admits its limits.
Enterprise search was overdue for a rethink long before large language models made it fashionable. What's changed is that the pieces — cheap embeddings, mature vector databases, and models that can synthesize honestly from retrieved context — finally make it practical to ship. The organizations getting the most value aren't the ones with the flashiest demo; they're the ones treating retrieval quality as seriously as they'd treat any other core piece of infrastructure.