Skip to main content

Evaluators

create_custom_llm_evaluator

Create a custom LLM metric. Arguments
  • name (str): Name of the metric.
  • user_prompt (str): User prompt for the metric.
  • node_level (StepType): Node level for the metric.
  • cot_enabled (bool): Whether chain-of-thought is enabled.
  • model_name (str): Model name to use.
  • num_judges (int): Number of judges for the metric.
  • description (str): Description of the metric.
  • tags (List[str]): Tags associated with the metric.
  • output_type (OutputTypeEnum): Output type for the metric.
  • ground_truth (bool): Whether the scorer requires ground truth (reference_output) from the dataset. When True, the judge LLM receives the row’s ground-truth value in its prompt.
Returns
  • BaseScorerVersionResponse: Response containing the created metric details.

create_custom_llm_evaluator

Create a custom LLM metric. Arguments
  • name (str): Name of the metric.
  • user_prompt (str): User prompt for the metric.
  • node_level (StepType): Node level for the metric.
  • cot_enabled (bool): Whether chain-of-thought is enabled.
  • model_name (str): Model name to use.
  • num_judges (int): Number of judges for the metric.
  • description (str): Description of the metric.
  • tags (List[str]): Tags associated with the metric.
  • output_type (OutputTypeEnum): Output type for the metric.
  • ground_truth (bool): Whether the scorer requires ground truth (reference_output) from the dataset. When True, the judge LLM receives the row’s ground-truth value in its prompt.
Returns
  • BaseScorerVersionResponse: Response containing the created metric details.

delete_evaluator

Deletes a metric by its name. Arguments
  • name: The name of the metric to delete.

get_evaluators

Queries for metrics in a project. Arguments
  • project_id: The unique identifier of the project.
  • start_time: The start of the time range for the query.
  • end_time: The end of the time range for the query.
  • experiment_id: Filter records by a specific experiment ID.
  • agent_stream_id: Filter records by a specific agent stream ID.
  • filters: A list of filters to apply to the query.
  • group_by: The field to group the results by.
  • interval: The time interval for the query in seconds.
Returns
  • LogRecordsMetricsResponse: A LogRecordsMetricsResponse object containing the query results, or None if the query fails.