Skip to main content
Ragas hero Ragas is an open-source library that offers metrics to evaluate large language model (LLM) applications. Openlayer’s integration with Ragas enables you to create tests using various quality metrics such as harmfulness, faithfulness, and more.

Tests with Ragas metrics

When evaluating LLM projects, you can leverage any of the Ragas metrics to create detailed tests. Each test provides:
  • A pass/fail status.
  • Row-by-row scoring and justification, provided by the LLM judge.
Answer relevancy metric

Configuring the LLM judge

Every Ragas metric relies on an LLM judging your data, and they all use your project’s LLM-as-a-judge settings. To review them, go to project SettingsLLM-as-a-judge, where you can:
  • Choose the Default LLM that computes the metrics, and use Test connection to confirm Openlayer reaches it.
  • Add Custom judge instructions, which the judge follows while scoring each row.
  • Adjust the Sampling settings, which control how data is sampled when computing LLM-based metrics. Ragas metrics are sampled the same way as every other LLM-judge metric in the project.
The judge authenticates with the credentials you store as environment variables, so add the key for the provider you select — OPENAI_API_KEY for OpenAI, or ANTHROPIC_API_KEY for Anthropic, for example. If the key is missing, Openlayer skips the metric and asks you to add the missing secrets to your workspace settings or update the project’s LLM evaluator settings.

Metrics available

The Ragas metrics available on Openlayer listed below.