How Contextual AI Uses Elasticsearch to Achieve 90%+ RAG Accuracy at Scale
Contextual AI is an enterprise AI platform company that specializes in production-ready Retrieval Augmented Generation systems for complex knowledge tasks. The company built its context engineering platform on Elasticsearch, using hybrid search combining BM25 and vector search to power accurate, scalable AI agents for enterprise customers. With this foundation, Contextual AI’s agents achieve over 90% accuracy on demanding production tasks—well above the 65–75% range typical of traditional RAG approaches.
Impact
90%+
RAG accuracy achieved in production
22 million chunks
Largest single data repository indexed
60,000+
Documents in largest repository
Challenge
Enterprise AI deployments built on fragmented open-source RAG components typically plateau at 65–75% accuracy—inadequate for production use cases in compliance, knowledge management, or customer support where errors carry real business cost. Managing separate vector and keyword search systems added engineering overhead and made it difficult to maintain consistency between research and production environments.
Solution
Contextual AI built its context engineering platform on Elasticsearch, using Elastic’s native hybrid search capability to run BM25 keyword and vector similarity queries through a single API. This unified approach enabled the team to handle repositories of up to 22 million chunks, align research and production environments, and support multi-cloud and on-premises deployments for enterprise customers.
Tools & Technologies
What Leaders Say
“Elastic’s comprehensive support for BM25, combined with its vector search capabilities within the same database, means we can conduct both types of searches simultaneously without the complexity of managing separate services.”
“A significant advantage for us is that our platform team also uses Elasticsearch as their deployment solution. This ensures alignment between the research and platform environments.”
“Ultimately, the versatility of Elasticsearch is a significant asset. It provides us with sales flexibility and the agility to rapidly accommodate novel deployment requirements from our customers.”
Sign up to read complete case studies, access detailed metrics, and unlock all use cases.
Full Story
Contextual AI was founded to solve one of enterprise AI’s most stubborn problems: getting large language models to reliably answer questions using proprietary company data. The company’s context engineering platform sits between raw enterprise data and LLMs, providing the retrieval, reranking, and grounded generation needed to make AI agents accurate enough for high-value production use cases. Customers deploy these agents for tasks like enterprise knowledge search, compliance and risk analysis, and customer support—workflows where a 70% accuracy rate is simply not acceptable.
Before adopting Elasticsearch as the core of their data infrastructure, most RAG deployments stitched together open-source tools to handle keyword and semantic search separately. This fragmentation created engineering complexity, made it difficult to scale, and left accuracy stuck in a 65–75% range even after fine-tuning. For Contextual AI, building a platform that enterprise customers could trust in production required a different foundation—one that could handle massive, multimodal document collections while supporting both search paradigms in a single system.
Contextual AI built its platform on Elasticsearch, taking advantage of two key capabilities. First, Elastic’s support for BM25 keyword search and vector similarity search within the same database eliminated the need to manage separate services. The multi search API allows the platform to run hybrid queries in a single call, streamlining engineering workflows and reducing latency. Second, Elastic’s vector database handles the company’s most demanding data repositories: its largest single index contains approximately 14 million chunks sourced from more than 60,000 documents, much of it unstructured and multimodal—PDFs, HTML files, and documents containing images, tables, schematics, and charts. The research team also uses Elasticsearch to evaluate embedding models in real-world conditions before promoting them to production.
The result is an accuracy floor that competitors cannot match. Contextual AI’s agents consistently achieve 90%+ accuracy on complex knowledge tasks, compared to the 65–75% typical of conventional RAG. One of the most significant advantages comes from alignment between research and production: because both the research and platform teams use Elasticsearch, techniques proven in testing translate directly to deployed systems without integration risk. This consistency accelerates iteration and gives enterprise customers confidence that what they saw in evaluation is what they get in production.
Contextual AI’s deployment model spans Google Cloud as its primary environment, with the ability to extend to AWS and Azure regions—or to customer-controlled on-premises and VPC environments for clients with strict data compliance requirements. This flexibility, underpinned by Elasticsearch’s multi-cloud support and self-hosting capabilities, has become a commercial differentiator as more enterprises impose data sovereignty requirements on AI vendors. The company sees its Elastic-based architecture as foundational to scaling into increasingly complex enterprise deployments.