WhoBuilt

The Hidden Costs of Building Your Own RAG Stack

Feb 22, 2025· 15 min· 1.4K views·Watch on YouTube

Speaker

Ofer, a machine learning engineer and Vectara’s developer relations lead, explains the hidden costs of building an enterprise RAG stack at an AI Engineer talk.

How a RAG stack works

RAG retrieves relevant information from a company’s data and gives it to an LLM to ground its response. The workflow includes extracting and chunking documents, embedding and storing them, then retrieving and ranking relevant facts for a query. Hybrid search, reranking, and hallucination checks can add further components.

Response quality and latency

Ofer says production quality takes work across parsing, chunking, table understanding, and hybrid search. Teams also need ongoing evaluation as data and system components change, plus ways to detect hallucinations and preserve source links for users. Latency can rise when retrieval and ranking components are poorly coordinated, and one slow component can hold up the whole query.

Scaling brings cost and compliance demands

At production scale, costs include models, vector databases, parsing services, compute, storage, and LLM tokens, and grow as document volumes rise from dozens to thousands or millions. RAG also needs access controls that reflect who can see each document, as well as suitable handling of sensitive data such as PHI and PII.

Vendors and skills add operational load

Using separate vendors for databases, models, and search can mean more contracts, integration work, and support coordination. When problems arise, teams may struggle to identify which component is responsible. Maintaining a DIY stack also calls for specialized LLM, data engineering, DevOps, SRE, and security skills, while language support must be checked across every component.

Vectara’s managed approach and hallucination checks

Vectara offers extraction, indexing, storage, and retrieval through APIs, with deployment options including SaaS, a customer’s VPC, and on premises. Ofer says the platform focuses on accuracy, security, and observability, and describes HHEM as a hallucination evaluation model that provides a score with each call. He also points to a leaderboard comparing models’ hallucination rates.

Takeaways

  • Treat parsing, chunking, ranking, and continuous quality evaluation as production work, not one-time setup.
  • Measure end-to-end latency across the full retrieval flow, since one slow component affects the response.
  • Estimate compute, storage, and token costs at the document volumes you expect to reach.
  • Build document-level access controls and sensitive-data handling into the RAG flow.
  • Check vendor support, required team skills, and language coverage before choosing a DIY stack.

Mentioned in this talk

Search inside this talk

What was claimed 7

Related talks