New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@mastra/evals

Package Overview
Dependencies
Maintainers
7
Versions
891
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
This package has malicious versions linked to the ongoing "Mastra AI framework compromise" supply chain attack.

Affected versions:

1.3.1
View campaign page

@mastra/evals

latest
Source
npmnpm
Version
1.10.2
Version published
Weekly downloads
158K
2.4%
Maintainers
7
Weekly downloads
 
Created
Source

@mastra/evals

@mastra/evals ships a collection of scoring utilities you can run locally or inside your own evaluation pipelines. These scorers come in two flavors:

  • LLM scorers – leverage a judge model (e.g. OpenAI, Anthropic) to rate responses for qualities such as faithfulness or toxicity.
  • Code/NLP scorers – deterministic heuristics (keyword coverage, similarity, etc.) that do not require an external model.

Installation

npm install @mastra/evals

Usage

Import prebuilt scorers from the package subpath.

import { createToolCallAccuracyScorerCode } from '@mastra/evals/scorers/prebuilt';

const scorer = createToolCallAccuracyScorerCode({ expectedTool: 'weather' });

Documentation

  • @mastra/evals documentation

Changelog

See the package changelog for version history and release notes.

Support

We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.

FAQs

Package last updated on 15 Sep 2026

Related posts