Rapid RAG Optimization with Qdrant and Quotient
Hands-on Qdrant and Quotient AI workshop: build a naive RAG over Qdrant docs, then run five scored experiments on chunk size, retrieval window, embedding model and LLM to show that evaluation is the compass for RAG optimisation.
In this workshop Atita argues that evaluation is the only reliable compass for optimising a RAG system, because without measured experiments every tuning decision is a guess. Together with the Quotient AI team she builds a naive RAG over the Qdrant documentation and runs five scored experiments that show which changes actually reduce hallucination.
What the workshop covers
The session is the hands-on version of Atita's Qdrant article published on 12 June 2024, and this entry uses that date. The pipeline uses Qdrant Cloud as the knowledge store, FastEmbed for embeddings and LangChain's recursive text splitter for chunking, over a dataset of 240 Qdrant documentation pages with a prebuilt evaluation set of questions and answers. Each run retrieves context from Qdrant, fills the context column, and submits the dataset to Quotient, which scores context relevance, chunk relevance, faithfulness, ROUGE-L, BERT sentence similarity and BERTScore.
Experiment 1 is the baseline: bge-small-en, chunk size 512, overlap 64, three documents, Mistral-7B-Instruct. It shows low average chunk relevance and that irrelevant retrieval goes hand in hand with hallucinated answers. Experiment 2 raises chunk size to 1024 and overlap to 128; completion metrics improve slightly but faithfulness drops. Experiment 3 keeps the small chunks and retrieves five documents, which gives the best relevance and faithfulness scores. Experiment 4 swaps in all-MiniLM-L6-v2 and does worse than bge-small. Experiment 5 replaces Mistral with GPT-3.5-turbo, which wins on every metric with the lowest hallucination.
Who it is for
Engineers who want a concrete, copyable evaluation loop for RAG. The article notes that retrieval performance still has a long way to go and suggests dynamic retrieval and prompt or model changes as the next levers. The recording is embedded above and the notebook is on GitHub.
Frequently asked questions
- Which metrics does the workshop use?
- Context relevance, chunk relevance, faithfulness, ROUGE-L, BERT sentence similarity and BERTScore, computed on Quotient, with faithfulness as the primary target.
- What is the baseline configuration?
- bge-small-en embeddings, chunk size 512 with overlap 64, three retrieved documents and Mistral-7B-Instruct as the generator, over the Qdrant documentation dataset with a prebuilt evaluation set.
- Where is the code?
- The notebook workshop-rag-eval-qdrant-quotient is in the qdrant/qdrant-rag-eval repository on GitHub, and the written version is Atita's Qdrant article 'Optimizing RAG Through an Evaluation-Based Methodology'.