Skip to main content
For the complete documentation index for agents and LLMs, see llms.txt.

Evaluate a Hosted Reranker on Your DataBeta

Beta
This is coming — this page describes a feature that's still being rolled out and may not be available to you yet.

Measure whether a reranker that deepset hosts would retrieve better documents for your questions than the ranker your pipeline uses today. You start the evaluation from the Models page, and nothing is deployed.


About This Task​

The evaluation runs two versions of one pipeline on every test case of a Dataset. The Current version is the version you pick, as it runs today. With this reranker is a new version of the same pipeline with its ranker swapped for the hosted model. The platform keeps the top_k and the comments of your YAML. Then it compares recall, MRR, and nDCG on the ranker's top documents.

The new version is created but not deployed. If the reranker wins, deploying that version is the switch.

Hosted rerankers add no price. The cost of the evaluation comes from the pipeline's own LLM calls while it replays the test cases.

Prerequisites​

  • A query pipeline that has a ranker and runs today: a deployed version, or a version served by a Gateway service. The picker lists only these versions and says where each one runs.
  • A Dataset whose test cases have a query and the documents each query should find, in a column such as document_ids. If you don't have one, you can create or generate one from the dialog. For the options, see Build an Evaluation Dataset and Generate a Retrieval Dataset from an Index.

Evaluate a Reranker​

  1. Open the Models page and click the Rerankers tab.
  2. Click Evaluate at the end of the row of the reranker you want to try.
  3. In Pipeline, pick the version to compare against. The dialog shows which ranker it swaps and its top k.
  4. In Dataset, pick a Dataset. To create or generate one first, follow the link to the Datasets of the pipeline you picked.
  5. Click Estimate cost. The platform creates the Metric Group Retrieval on <ranker> (top k), or reuses it if it exists. The estimate is an upper bound, because it assumes both versions replay every test case and reuse no earlier sessions. Nothing else is created yet.
  6. Check the estimate, and click Start evaluation. The platform creates the version with the swapped ranker and starts an Experiment. It then opens the Experiment on the Evaluation tab of the pipeline you picked.
  7. Wait for the Experiment to finish on the Evaluation tab, then compare the two sides. If neither MRR nor nDCG improves, keep your current version. The new version isn't deployed. If the reranker helps, MRR and nDCG go up. Recall goes up only if the reranker moves expected documents into the top k. For how to read the results, see Compare Two Pipeline Versions.

If you change the Dataset or the pipeline after you estimate, estimate again before you start.

The Metric Group, Evaluator, version description, and Experiment name are always saved in English, whatever the interface language.

What the Evaluation Measures​

The Metrics read only the documents of the ranker that the new version replaces, and only its first k documents, where k is the ranker's top_k. A change in the retriever therefore doesn't affect the score. For what Recall, MRR, and nDCG mean and how to change COMPONENTS and K yourself, see Compare Rankers with Retrieval Metrics.

Troubleshooting​

  • No pipeline appears in the picker. No version with a ranker runs today. Deploy a version that has a ranker, or serve one through a Gateway service, and open the dialog again.
  • The Dataset has no usable test cases. The Metrics are not applicable when a test case has no column that lists the expected documents. Add one, for example document_ids.
  • The evaluation couldn't start. The dialog stays open, so you can start again. If the message says the pipeline's YAML couldn't be changed, open the pipeline in Pipeline Builder and check that its ranker is valid.

What To Do Next​