@mastra/evals 1.10.0-alpha.0 → 1.10.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/README.md +14 -18
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -5,34 +5,30 @@
|
|
|
5
5
|
- **LLM scorers** – leverage a judge model (e.g. OpenAI, Anthropic) to rate responses for qualities such as faithfulness or toxicity.
|
|
6
6
|
- **Code/NLP scorers** – deterministic heuristics (keyword coverage, similarity, etc.) that do not require an external model.
|
|
7
7
|
|
|
8
|
-
The scorers do not persist results or integrate with Mastra Storage; you decide where and how to record outcomes.
|
|
9
|
-
|
|
10
8
|
## Installation
|
|
11
9
|
|
|
12
10
|
```bash
|
|
13
11
|
npm install @mastra/evals
|
|
14
12
|
```
|
|
15
13
|
|
|
16
|
-
##
|
|
14
|
+
## Usage
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
import { createFaithfulnessScorer, createContentSimilarityScorer } from '@mastra/evals/scorers/prebuilt';
|
|
16
|
+
Import prebuilt scorers from the package subpath.
|
|
20
17
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
18
|
+
```typescript
|
|
19
|
+
import { createToolCallAccuracyScorerCode } from '@mastra/evals/scorers/prebuilt';
|
|
24
20
|
|
|
25
|
-
const
|
|
21
|
+
const scorer = createToolCallAccuracyScorerCode({ expectedTool: 'weather' });
|
|
22
|
+
```
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
const context = ['Paris is the capital of France', 'France is in Europe'];
|
|
24
|
+
## Documentation
|
|
29
25
|
|
|
30
|
-
|
|
26
|
+
- [@mastra/evals documentation](https://mastra.ai/docs/evals/overview)
|
|
31
27
|
|
|
32
|
-
|
|
33
|
-
input: context[0],
|
|
34
|
-
output: answer
|
|
35
|
-
});
|
|
28
|
+
## Changelog
|
|
36
29
|
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
See the [package changelog](https://github.com/mastra-ai/mastra/blob/main/packages/evals/CHANGELOG.md) for version history and release notes.
|
|
31
|
+
|
|
32
|
+
## Support
|
|
33
|
+
|
|
34
|
+
We have an [open community Discord](https://discord.gg/mastra-ai). Come and say hello and let us know if you have any questions or need any help getting things running.
|
package/dist/docs/SKILL.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/evals",
|
|
3
|
-
"version": "1.10.0
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -113,12 +113,12 @@
|
|
|
113
113
|
"typescript": "^7.0.2",
|
|
114
114
|
"vitest": "4.1.10",
|
|
115
115
|
"zod": "^4.4.3",
|
|
116
|
-
"@internal/
|
|
117
|
-
"@internal/
|
|
118
|
-
"@internal/
|
|
119
|
-
"@internal/
|
|
120
|
-
"@
|
|
121
|
-
"@
|
|
116
|
+
"@internal/ai-sdk-v5": "0.0.77",
|
|
117
|
+
"@internal/lint": "0.0.130",
|
|
118
|
+
"@internal/llm-recorder": "0.0.66",
|
|
119
|
+
"@internal/test-utils": "0.0.66",
|
|
120
|
+
"@mastra/core": "1.64.0",
|
|
121
|
+
"@internal/types-builder": "0.0.105"
|
|
122
122
|
},
|
|
123
123
|
"engines": {
|
|
124
124
|
"node": ">=22.13.0"
|