Skip to main content

Scorers

get_scorer_version

Arguments
  • name (str): Name of the scorer
  • version (int): Version of the scorer.
Returns
  • Scorer response if found, otherwise None.:

list

Lists scorers, optionally filtering by name and/or type. The filters are combined with an AND condition, while the values within the types list are combined with an OR condition. For example, calling list(name="my_scorer", types=[ScorerTypes.llm, ScorerTypes.code]) will return scorers where the name is “my_scorer” AND the type is either “llm” OR “code”. Arguments
  • name: Name of the scorer to filter by.
  • types: List of scorer types to filter by. Defaults to all scorers.
Returns
  • A list of scorers that match the filter criteria.:

list_by_ids

List scorers by their UUIDs. Arguments
  • scorer_ids: UUID strings of scorers to retrieve.
Returns
  • A list of scorers matching the given IDs.:

list_by_labels

List scorers by label. Arguments
  • labels: Label values to search for.
  • strict: When False (default), also matches by scorer name as a fallback for custom scorers that have no label set.
Returns
  • A list of scorers matching the label (or name) criteria.:

ScorerSettings

create

Arguments
  • project_id: ID of the project
  • run_id: ID of the run
  • scorers: List of scorer configurations
Returns
  • Upserted scorer settings.: