UNPKG

@mastra/core

Version:
31 lines (19 loc) 1.13 kB
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt # listScorers() The `listScorers()` method returns all scorers that have been registered with the Mastra instance. Scorers are used for evaluating AI outputs and can override default scorers during agent generation or workflow execution. ## Usage example ```typescript import { mastra } from './mastra' // Get all registered scorers const allScorers = mastra.listScorers() // Access a specific scorer const myScorer = allScorers.relevancyScorer ``` ## Parameters This method takes no parameters. ## Returns **scorers** (`Record<string, MastraScorer> | undefined`): An object containing all registered scorers, where keys are scorer names and values are MastraScorer instances. Returns undefined if no scorers are registered. ## Related - [getScorer()](https://mastra.ai/reference/core/getScorer): Get a specific scorer by key - [getScorerById()](https://mastra.ai/reference/core/getScorerById): Get a scorer by its id property - [Scorers Overview](https://mastra.ai/docs/evals/overview): Learn about creating and using scorers