RAG Evaluation with Arize Phoenix
Third and final part of the VectorHub RAG evaluation series: tracing a naive dense-retrieval RAG with Arize Phoenix, scoring hallucination, QA correctness and relevance with LLM evaluators, then rebuilding it as a hybrid RAG with SPLADE++ sparse and bge-small dense vectors.
This write-up was first published at superlinked.com. Below is a summary and what we would add today.
Published on Superlinked's VectorHub in mid-2024 as the third article in Atita's RAG evaluation series, after the framework piece and the RAGAS walkthrough, with Mór Kapronczay and Robert Turner as editors. A companion workshop with Arize and Qdrant is on YouTube and the code lives in the qdrant-rag-eval repository.
What the article covers
Phoenix is Arize's open-source observability library for LLM applications. Its core idea is traces made of spans, one per operation in a request, giving a live view of latency, token usage, retrieved documents, prompts and exceptions for every query.
The first experiment is a naive RAG built with LlamaIndex over the Qdrant documentation dataset: bge-small-en-v1.5 dense embeddings via FastEmbed, a Qdrant collection, a top-2 dense retriever and GPT-4 as the generator. Ten evaluation questions are run through it, the retriever spans are exported into two dataframes (one per query, one per retrieved document), and three LLM evaluators are applied: hallucination, QA correctness, and per-document relevance, which Phoenix rolls up into nDCG, precision and recall. The result was 18% hallucination and 91% QA correctness. Drilling into one trace showed an answer marked both hallucinated and correct, a signature of domain terminology that needs exact matching rather than semantic similarity.
The second half rebuilds the retriever as a hybrid. SPLADE++ provides sparse vectors and bge-small provides dense ones, both through FastEmbed, stored in a second Qdrant collection with hybrid search enabled. A sparse-only retriever is tried first, then a hybrid retriever whose alpha parameter weights sparse against dense; the article uses 0.1, so lexical matching dominates. Evaluated on the same questions, hallucination dropped to 0% and QA correctness rose to 100%, and the ef_construct question that had hallucinated now scored as factual. Other levers (chunk sizes, rerankers, query enrichment) are left for the reader.
What I would add today
Ten questions is a demonstration, not an evaluation set, and I would say so more loudly now; the direction of the result holds up well, the magnitude should not be quoted. The deeper lesson has only become more important: when a technical corpus is full of parameter names and identifiers, the fix for hallucination is usually in retrieval, not in the prompt, and hybrid retrieval with an exact-match component is the first thing to try. Tracing every span, which felt like overhead in 2024, is now simply how I expect any RAG or agent pipeline to be run.