Supported evals in Mastra
Mastra provides several eval metrics for assessing Agent outputs. Mastra is not limited to these metrics, and you can also define your own evals.
Accuracy and Reliability
hallucination
: Detects fabricated or unsupported informationfaithfulness
: Checks output alignment with source materialcontent-similarity
: Compares text similaritytextual-difference
: Measures text changescompleteness
: Measures if all required information is presentanswer-relevancy
: Measures how well an answer addresses the input question
Understanding Context
context-position
: Evaluates the placement of context in responsescontext-precision
: Assesses the accuracy of context usagecontext-relevancy
: Measures the relevance of used contextcontextual-recall
: Evaluates information recall from context
Output Quality
tone
: Analyzes writing style and tonetoxicity
: Detects harmful or inappropriate contentbias
: Detects potential biases in the outputprompt-alignment
: Measures adherence to prompt instructionssummarization
: Evaluates summary qualitykeyword-coverage
: Checks for presence of key terms