Skip to main content
Use this tutorial when the metric is about the retrieved material itself, rather than about a final model answer. Context relevance is the main example of this pattern.

Dataset schema

Typical columns:
  • documents: the retrieved documents
  • input: the user question or retrieval query
  • label: the ground-truth class for the metric

Config shape

Retriever span tutorials normally use:
  • data_generation.metric.input_format: "rag"
  • data_generation.source_data.dataset.columns.features: ["documents", "input"]
  • training.metric.type: "boolean"

Minimal end-to-end config