@mastra/evals 1.9.0-alpha.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @mastra/evals
2
2
 
3
+ ## 1.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added `createMultiTurnJudgeScorer` to `@mastra/evals/scorers/prebuilt`, an LLM judge that grades a whole multi-turn conversation against a plain-English criterion. ([#21936](https://github.com/mastra-ai/mastra/pull/21936))
8
+
9
+ The other prebuilt LLM judges read a single assistant message, so they cannot grade a conversation run with the multi-turn `inputs` form of `runEvals`. This scorer reads every assistant turn accumulated in `run.output` and returns 1 when the criterion is satisfied, otherwise 0.
10
+
11
+ ```typescript
12
+ import { runEvals } from '@mastra/core/evals';
13
+ import { createMultiTurnJudgeScorer } from '@mastra/evals/scorers/prebuilt';
14
+
15
+ const result = await runEvals({
16
+ data: [{ inputs: ["How's the weather in London?", 'And Paris?', 'Should I pack an umbrella?'] }],
17
+ target: weatherAgent,
18
+ scorers: [
19
+ {
20
+ scorer: createMultiTurnJudgeScorer({
21
+ model: 'anthropic/claude-haiku-4-5',
22
+ criterion: 'The agent gave forecasts for London and Paris, and weather-appropriate packing advice.',
23
+ }),
24
+ threshold: 1,
25
+ },
26
+ ],
27
+ });
28
+ ```
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies [[`88d14ca`](https://github.com/mastra-ai/mastra/commit/88d14cac008582a618fecc3d5c7fd3bdf4f6ddc3), [`480e491`](https://github.com/mastra-ai/mastra/commit/480e491588bd6a7a1c9ee4407590ad625dd33952), [`9267e9b`](https://github.com/mastra-ai/mastra/commit/9267e9b3d9c2fcf16936050495a787054c2431ab), [`acc3471`](https://github.com/mastra-ai/mastra/commit/acc3471de5f3fde8027ee4e355af292b2bc1bc30), [`b6a771e`](https://github.com/mastra-ai/mastra/commit/b6a771ef23d203ddb348efca8065eff65def8191), [`84a5b69`](https://github.com/mastra-ai/mastra/commit/84a5b699f84d6bae0a34efe5a970d891090b9f41), [`9267e9b`](https://github.com/mastra-ai/mastra/commit/9267e9b3d9c2fcf16936050495a787054c2431ab), [`3bb88dd`](https://github.com/mastra-ai/mastra/commit/3bb88ddf07fb98f3cd16d3bff94e51cd3b45d011), [`d23e75d`](https://github.com/mastra-ai/mastra/commit/d23e75d57cc7cf5b9bfdbee896bf5a6a2484fed7), [`c8faa4e`](https://github.com/mastra-ai/mastra/commit/c8faa4e1cfebaec56b65e754e90b9fe46d153359), [`d378d75`](https://github.com/mastra-ai/mastra/commit/d378d7511f71309ed61a8f6b93cd0361dc6cb70f), [`84a5b69`](https://github.com/mastra-ai/mastra/commit/84a5b699f84d6bae0a34efe5a970d891090b9f41), [`26d4016`](https://github.com/mastra-ai/mastra/commit/26d40160ff7f7d8bf95fee2039a52cbc83863533), [`7c60df5`](https://github.com/mastra-ai/mastra/commit/7c60df5c7872343fbac5c3e5b1175c8076a5abfd), [`9267e9b`](https://github.com/mastra-ai/mastra/commit/9267e9b3d9c2fcf16936050495a787054c2431ab), [`84a5b69`](https://github.com/mastra-ai/mastra/commit/84a5b699f84d6bae0a34efe5a970d891090b9f41), [`f2031a4`](https://github.com/mastra-ai/mastra/commit/f2031a47445e8f67a89ba1309036816f97ab7a65), [`9267e9b`](https://github.com/mastra-ai/mastra/commit/9267e9b3d9c2fcf16936050495a787054c2431ab), [`cad4208`](https://github.com/mastra-ai/mastra/commit/cad42082e6aa1776168a94914f523334be45d929), [`8e529d4`](https://github.com/mastra-ai/mastra/commit/8e529d4ac754efef04b225841349e0da9edf89a6), [`57c5103`](https://github.com/mastra-ai/mastra/commit/57c51035a2a36e3df3c4f32f46bb789a66ed5946), [`038b7b4`](https://github.com/mastra-ai/mastra/commit/038b7b405cb4ac25ab3f3031334111b1f87ac112), [`4132d61`](https://github.com/mastra-ai/mastra/commit/4132d61f8367077120ee9e6420d3224dffd93c93), [`d378d75`](https://github.com/mastra-ai/mastra/commit/d378d7511f71309ed61a8f6b93cd0361dc6cb70f)]:
33
+ - @mastra/core@1.61.0
34
+
3
35
  ## 1.9.0-alpha.0
4
36
 
5
37
  ### Minor Changes
@@ -3,7 +3,7 @@ name: mastra-evals
3
3
  description: Documentation for @mastra/evals. Use when working with @mastra/evals APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/evals"
6
- version: "1.9.0-alpha.0"
6
+ version: "1.9.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.9.0-alpha.0",
2
+ "version": "1.9.0",
3
3
  "package": "@mastra/evals",
4
4
  "exports": {},
5
5
  "modules": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/evals",
3
- "version": "1.9.0-alpha.0",
3
+ "version": "1.9.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -88,12 +88,12 @@
88
88
  "typescript": "^6.0.3",
89
89
  "vitest": "4.1.10",
90
90
  "zod": "^4.4.3",
91
- "@internal/ai-sdk-v5": "0.0.71",
92
- "@internal/llm-recorder": "0.0.60",
93
- "@internal/test-utils": "0.0.60",
94
- "@internal/lint": "0.0.124",
95
- "@internal/types-builder": "0.0.99",
96
- "@mastra/core": "1.61.0-alpha.3"
91
+ "@internal/ai-sdk-v5": "0.0.72",
92
+ "@internal/lint": "0.0.125",
93
+ "@internal/llm-recorder": "0.0.61",
94
+ "@internal/test-utils": "0.0.61",
95
+ "@internal/types-builder": "0.0.100",
96
+ "@mastra/core": "1.61.0"
97
97
  },
98
98
  "engines": {
99
99
  "node": ">=22.13.0"