Skip to main content

agrag.eval.trajectory.trajectory_quality

trajectory_quality(judge:DeepEvalBaseLLM, *, threshold:float = 0.5) -> BaseMetric

Build the judged metric for trajectory quality.

Scores whether the steps follow logically from the question, with no reference trajectory and one judge call. The gate is the mean over questions, following the answer-quality eval.

Parameters:

  • judge (DeepEvalBaseLLM) – The judge model. Its chat model grades the trajectory.
  • threshold (float) – The minimum score that counts as success.

Returns:

  • BaseMetric – The trajectory quality metric.

Raises:

  • TypeError – The judge holds no LangChain chat model.