# Evaluating Medical RAG with Qdrant, Jev and MLflow -- A Production Ready Setup

DevFeed: [Evaluating Medical RAG with Qdrant, Jev and MLflow -- A Production Ready Setup](<https://devfeed.tech/articles/evaluating-medical-rag-with-qdrant-jev-and-mlflow-a-production-ready-setup-90783.md>)

Original publisher: [Read original article](<https://blog.devops.dev/evaluating-medical-rag-with-qdrant-jev-and-mlflow-a-production-ready-setup-091a80fb1540?source=rss----33f8b2d9a328---4>)

Author: M K Pavan Kumar

Published: 2026-10-20T13:25:31Z

Content type: tutorial

Language: en

Sources: [DevOps.dev](<https://devfeed.tech/sources/devops-dev.md>)

Topics: [ai observability](<https://devfeed.tech/topics/ai-observability.md>), [Qdrant](<https://devfeed.tech/topics/qdrant.md>), [hybrid-search](<https://devfeed.tech/topics/hybrid-search.md>), [llamaindex](<https://devfeed.tech/topics/llamaindex.md>), [Ollama](<https://devfeed.tech/topics/ollama.md>), [Monitoring](<https://devfeed.tech/topics/monitoring.md>), [Embeddings](<https://devfeed.tech/topics/embeddings.md>), [reproducibility](<https://devfeed.tech/topics/reproducibility.md>), [Data Quality](<https://devfeed.tech/topics/data-quality.md>), [hugging face](<https://devfeed.tech/topics/hugging-face.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [3](<https://devfeed.tech/tags/3.md>), [analysis](<https://devfeed.tech/tags/analysis.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [automated](<https://devfeed.tech/tags/automated.md>), [blog](<https://devfeed.tech/tags/blog.md>), [bm25](<https://devfeed.tech/tags/bm25.md>), [build](<https://devfeed.tech/tags/build.md>), [but](<https://devfeed.tech/tags/but.md>), [code](<https://devfeed.tech/tags/code.md>), [combines](<https://devfeed.tech/tags/combines.md>), [compare](<https://devfeed.tech/tags/compare.md>), [jev](<https://devfeed.tech/tags/jev.md>), [jevevals](<https://devfeed.tech/tags/jevevals.md>), [medical](<https://devfeed.tech/tags/medical.md>), [mlflow](<https://devfeed.tech/tags/mlflow.md>), [production](<https://devfeed.tech/tags/production.md>), [productionrag](<https://devfeed.tech/tags/productionrag.md>), [qdrant](<https://devfeed.tech/tags/qdrant.md>), [rag](<https://devfeed.tech/tags/rag.md>), [setup](<https://devfeed.tech/tags/setup.md>), [tracedetection](<https://devfeed.tech/tags/tracedetection.md>), [with](<https://devfeed.tech/tags/with.md>)

## AI overview

The article builds a medical RAG evaluation pipeline with LlamaIndex, Qdrant, Ollama and MLflow, comparing Jev decision judges with a text-generating Gemma judge on MedQuAD answers. Hybrid dense and BM25 retrieval uses reciprocal rank fusion; evaluators separately score contradictions, coverage and whether the expected context was retrieved. On this run, Jev agreed with the text judge on 17 of 19 contradiction verdicts and 16 of 18 coverage verdicts; routing uncertain Jev scores to the text judge raised agreement to 18/19 and 18/18. Jev returned scores for all 28 completed traces, while the text judge timed out on some. Of 50 questions, 22 failed before scoring, and the gold context ranked first for 22 of 28 scored questions. The authors therefore present Jev as a fast first-pass judge with text-judge review for uncertain cases, while noting that a confident Jev error can fall outside the routing band. MLflow traces and issue detection helped expose failures and latency.

## Source excerpt

We often focus on retrieval accuracy and response quality, but what happens when we need to evaluate every answer against ground truth, detect contradictions, and understand where things went wrong? In this hands-on blog, we will build a complete medical RAG pipeline from scratch using LlamaIndex, Qdrant, and Ollama, then bring in MLflow and Jev to evaluate responses, compare them against ground-truth answers, inspect traces, and generate meaningful evaluation reports. 💡 The interesting part? We will put a traditional LLM judge and Jev side by side to explore how they evaluate the same RAG responses. No theory alone. Real datasets, real code, real evaluations, and measurable results. 🔬 created by author M K Pavan KumarThe Architecture Our architecture brings together LlamaIndex, Qdrant, Ollama, MLflow, and Jev to build a complete medical RAG pipeline with hybrid retrieval, automated evaluation, trace monitoring, and result analysis. The workflow is divided into four major components. 1. Data Preparation and Ingestion We start with the MedQuAD Context GroupedQA dataset from Hugging Face, which contains medical contexts and their corresponding question-answer pairs. A Python script (create_testset.py) randomly selects 50 question-answer pairs and creates a JSONL test set containing questions, ground-truth answers, and context IDs. A separate ingestion script (ingest_contexts.py) processes the medical contexts without chunking. Ollama's EmbeddingGemma generates dense embeddings, while FastEmbed BM25 generates sparse vectors. Both representations are stored in Qdrant, enabling hybrid retrieval with context-level traceability. 2. RAG Pipeline The RAG pipeline is built using LlamaIndex, which handles retrieval, response generation, and integration with Qdrant. When a question arrives, hybrid retrieval combines dense semantic search and sparse keyword matching using Reciprocal Rank Fusion (RRF). The retrieved contexts are passed to Ollama's Gemma 3, which generates the fin