Skip to main content
Legacy Evaluator: This evaluator is from phoenix-evals 1.x and will be removed in a future version. For RAG evaluation, consider using the Document Relevance evaluator instead. You can migrate the template to a custom evaluator as shown below.

When To Use RAG Eval Template

This Eval evaluates whether a retrieved chunk contains an answer to the query. It’s extremely useful for evaluating retrieval systems.

RAG Eval Template

How To Run the RAG Relevance Eval

The above runs the RAG relevancy LLM template against the dataframe df.

Benchmark Results

This benchmark was obtained using notebook below. It was run using the WikiQA dataset as a ground truth dataset. Each example in the dataset was evaluating using the RAG_RELEVANCY_PROMPT_TEMPLATE above, then the resulting labels were compared against the ground truth label in the WikiQA dataset to generate the confusion matrices below.

Google Colab

colab.research.google.com

Try it out!

GPT-4 Result

Scikit GPT-4