Skip to main content
This tutorial shows how to classify documents as relevant or irrelevant to queries using benchmark datasets with ground-truth labels. Key Points:
  • Download and prepare benchmark datasets for relevance classification
  • Compare different LLM models (GPT-4, GPT-3.5, GPT-4 Turbo) for classification accuracy
  • Analyze results with confusion matrices and detailed reports
  • Get explanations for LLM classifications to understand decision-making
  • Measure retrieval quality using ranking metrics like precision@k

Notebook Walkthrough

We will go through key code snippets on this page. To follow the full tutorial, check out the full notebook.

Google Colab

colab.research.google.com

Download Benchmark Dataset

Configure Evaluation

Run Relevance Classification

Evaluate Results

Get Explanations

Compare Models

Run the same evaluation with different models: