Qdrant
Qdrant is a vector similarity search engine and vector database. While working on RAG based applications, you can use QDrant to retrieve information from your context documents.
How will this help?
Vector databases store data as high-dimensional vectors, enabling fast and efficient similarity search and retrieval of data based on their vector representations. You can use UpTrain along with vector databases such as QDrant for evaluations such as the relevance of the retrieved context ensuring a good retrieval quality.
How to integrate?
First, let’s import the necessary packages
Let’s define a dataset to create embeddings
Creating a memory instance using QDrant:
Generate embedding and vectorise from the defined text
Define question and fetch relevant information from Qdrant
Create a list with the fetched information to perform evaluations
Evaluate the retrieval quality using UpTrain
Let’s look at the retrieval quality of the context documents
According to these evaluations:
- Example 1: The context contains information about a book “A Gift From The Stars”, which is related to the question asked i.e. books about alien abductions.
- Example 2: The context contains information about a book “The Royal Abduction”, which is related to a abduction but there is no reference specific to alien abduction, making the context irrelevant.