Skip to main content

Definition

The session LLM-as-a-judge test grades each conversation session against a criterion you write in natural language, such as “the assistant gathers the needed information before taking irreversible actions”. An LLM-as-a-judge reads the full session and returns a score and an explanation for it. It is the session-level counterpart of the LLM-as-a-judge test, which grades one trace at a time.

Taxonomy

  • Task types: LLM.
  • Availability: and .
  • Evaluation level: session.
  • Polarity: set by your criterion. A high score is good by default; set passesAbove to false when a high score is the bad outcome.

Why it matters

  • Some behaviour only shows up across turns, and no built-in session test covers it.
  • Because you write the criterion, you can grade good outcomes (“resolved the issue”) and bad ones (“leaked PII”) with the same test.

Required columns

  • Input: The user’s message in each turn.
  • Output: The assistant’s response in each turn.
  • Session ID: Groups turns belonging to the same conversation.
  • Timestamp: Used to reconstruct turn order within a session.

Insight parameters

  • criteria_list (list of objects, required): The criterion to grade sessions against. Each object contains:
    • name (string, up to 50 characters): A label for the criterion.
    • criteria (string, up to 8,192 characters): The criterion in plain English.
    • scoring (string): "Yes or No" (Yes is scored 1.0, No 0.0) or "0-1" (a continuous score between 0 and 1).
    • threshold (number between 0 and 1, optional): The score that separates a passing session from a failing one.
    • passesAbove (boolean, optional, true by default): Which side of threshold passes. Set it to false when a high score is the bad outcome.
  • llm_evaluator (object, optional): The judge model and sampling settings. See Choosing the LLM judge.
Openlayer grades sessions against the first criterion in criteria_list, using that criterion’s scoring, threshold, and passesAbove. To grade more than one criterion, create one test per criterion.
The test form in the app offers only the meanScore measurement and does not expose threshold or passesAbove. To use them, or any other measurement, create the test with tests.json, the REST API, the SDKs, or the MCP server.

How sessions pass

A session passes the criterion when its score is at or above threshold, or at or below it when passesAbove is false. Without a threshold, the cut is:
  • 0.8 when scoring is "0-1"
  • 0.5 when scoring is "Yes or No"
This cut drives the passingPercent and failingPercent measurements. meanScore and medianScore use the raw scores, so with passesAbove: false a lower value is better. The session table on a test result marks each session as passing or failing. When the test thresholds on meanScore or medianScore, each session is graded with the test’s own operator and value. With any other measurement, each session is graded with the criterion’s cut.

Available measurements

The threshold value is on the measurement’s own scale: a score between 0 and 1 for meanScore and medianScore, a percentage for passingPercent and failingPercent.

Test configuration examples

The second example grades a criterion where a high score is the bad outcome. With passesAbove: false, a session passes when the judge answers No, and the test passes when at least 99% of sessions do.