Search Engine Comparison for RAG Applications: Qdrant vs Elasticsearch

Gökhan Gerdan
bimser.tech

--

With the current state of Large Language Models (LLMs), applications are endless. One of the more popular application is powering your chatbot with a LLM instead of rule based approaches. Nowadays chatbots are even changing how we interact with applications, from graphical user interfaces to conversational interfaces with the power of AI.

Apart from that, even with the most powerful LLM’s there are downsides such as hallucinations, becoming outdated, not being aware of enterprise context. RAG allows LLMs to become more contextually correct with source attribution by accessing relevant context from a vector search.

With the use of locally deployed Small Language Models (SLMs) such as Microsoft’s Phi-3, event though Phi-3’s strong reasoning abilities, this model is struggling to store enough factual knowledge due to its smaller size. This makes RAG implementation even more important.

To implement RAG into your AI powered chatbot, you need a search engine to retrieve relevant context from your knowledge base. There are many free and open search engine options in the market. In this article we compared Qdrant vs Elasticsearch.

Why compare Qdrant with Elasticsearch?

Even though Qdrant is built to support multidimensional vector data, it is still a newer product against the more mature option of Elasticsearch. This means your organization might be already using Elasticsearch for other purposes. In this article we compared Qdrant with Elasticsearch in a scenario as if it makes sense to spend resources on a newer technology over the one we already familiar with.

Qdrant

Qdrant is a cutting-edge vector similarity search engine known for its high throughput, minimal latency, rapid indexing, and precise control. It elevates search functionalities by providing semantic, similarity, multimodal, and hybrid search capabilities, among other features.

Pros

  • Purpose-built for Vectors
  • Better trade-off between performance and precision
  • Highest RPS and lowest latencies
  • Open Source

Cons

  • Authentication only
  • Newer product, smaller community

Elasticsearch

Elasticsearch is a distributed, RESTful search and analytics engine designed to handle an increasing array of use cases. It allows you to execute and integrate various types of searches, including structured, unstructured, geo, metric, and those from a piped query language.

Pros

  • Role-based Access Control (RBAC)
  • Support for both stream and batch of vector data
  • Binary Vector support
  • Excels in text-based search and analytics applications

Cons

Conclusion: Qdrant vs Elasticsearch

https://qdrant.tech/benchmarks/

In consideration of choosing one of this search engines to use it in a RAG application, being built to support multidimensional vector data with high performance, Qdrant is the clear winner as you can see in the benchmarks. But if you are already using Elasticsearch and maybe other tools from Elastic Stack, you can definitely choose to go with Elasticsearch for its rich ecosystem, versatility, and proven track record in traditional text-based search domains.

References

Vector Database Benchmarks

Qdrant Vector Database

Retrieval Augmented Generation (RAG) With Qdrant

World’s most used vector database — Elasticsearch

Elasticsearch Relevance Engine

--

--