@mastra/evals 0.14.0-alpha.0 → 0.14.1-alpha.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/dist/index.cjs CHANGED
@@ -41,7 +41,7 @@ var getCurrentTestInfo = async () => {
41
41
  };
42
42
  }
43
43
  try {
44
- const vitest = await import('./dist-PGA5XTSX.cjs');
44
+ const vitest = await import('./dist-KKO3PIUK.cjs');
45
45
  if (typeof vitest !== "undefined" && vitest.expect?.getState) {
46
46
  const state = vitest.expect.getState();
47
47
  return {
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ var getCurrentTestInfo = async () => {
39
39
  };
40
40
  }
41
41
  try {
42
- const vitest = await import('./dist-EKFCQ7IX.js');
42
+ const vitest = await import('./dist-E463LOAZ.js');
43
43
  if (typeof vitest !== "undefined" && vitest.expect?.getState) {
44
44
  const state = vitest.expect.getState();
45
45
  return {
@@ -1,4 +1,4 @@
1
- import type { MastraLanguageModel } from '@mastra/core/agent';
1
+ import type { MastraModelConfig } from '@mastra/core/llm';
2
2
  export interface AnswerSimilarityOptions {
3
3
  requireGroundTruth?: boolean;
4
4
  semanticThreshold?: number;
@@ -11,7 +11,7 @@ export interface AnswerSimilarityOptions {
11
11
  export declare const ANSWER_SIMILARITY_DEFAULT_OPTIONS: Required<AnswerSimilarityOptions>;
12
12
  export declare const ANSWER_SIMILARITY_INSTRUCTIONS = "\nYou are a precise answer similarity evaluator for CI/CD testing. Your role is to compare agent outputs against ground truth answers to ensure consistency and accuracy in automated testing.\n\nKey Principles:\n1. Focus on semantic equivalence, not just string matching\n2. Recognize that different phrasings can convey the same information\n3. Identify missing critical information from the ground truth\n4. Detect contradictions between output and ground truth\n5. Provide actionable feedback for improving answer accuracy\n6. Be strict but fair - partial credit for partial matches\n";
13
13
  export declare function createAnswerSimilarityScorer({ model, options, }: {
14
- model: MastraLanguageModel;
14
+ model: MastraModelConfig;
15
15
  options?: AnswerSimilarityOptions;
16
16
  }): import("@mastra/core/scores").MastraScorer<"Answer Similarity Scorer", import("@mastra/core/scores").ScorerRunInputForAgent, import("@mastra/core/scores").ScorerRunOutputForAgent, Record<"preprocessStepResult", {
17
17
  outputUnits: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/scorers/llm/answer-similarity/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAO9D,MAAM,WAAW,uBAAuB;IACtC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,uBAAuB,CAQ/E,CAAC;AAEF,eAAO,MAAM,8BAA8B,+kBAU1C,CAAC;AA0BF,wBAAgB,4BAA4B,CAAC,EAC3C,KAAK,EACL,OAA2C,GAC5C,EAAE;IACD,KAAK,EAAE,mBAAmB,CAAC;IAC3B,OAAO,CAAC,EAAE,uBAAuB,CAAC;CACnC;;;;;;;;;;;;;;;;6FA6HA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/scorers/llm/answer-similarity/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAO1D,MAAM,WAAW,uBAAuB;IACtC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,uBAAuB,CAQ/E,CAAC;AAEF,eAAO,MAAM,8BAA8B,+kBAU1C,CAAC;AA0BF,wBAAgB,4BAA4B,CAAC,EAC3C,KAAK,EACL,OAA2C,GAC5C,EAAE;IACD,KAAK,EAAE,iBAAiB,CAAC;IACzB,OAAO,CAAC,EAAE,uBAAuB,CAAC;CACnC;;;;;;;;;;;;;;;;6FA6HA"}
@@ -1,4 +1,4 @@
1
- import type { MastraLanguageModel } from '@mastra/core/agent';
1
+ import type { MastraModelConfig } from '@mastra/core/llm';
2
2
  import type { ScorerRunInputForAgent, ScorerRunOutputForAgent } from '@mastra/core/scores';
3
3
  export interface ContextPrecisionMetricOptions {
4
4
  scale?: number;
@@ -6,7 +6,7 @@ export interface ContextPrecisionMetricOptions {
6
6
  contextExtractor?: (input: ScorerRunInputForAgent, output: ScorerRunOutputForAgent) => string[];
7
7
  }
8
8
  export declare function createContextPrecisionScorer({ model, options, }: {
9
- model: MastraLanguageModel;
9
+ model: MastraModelConfig;
10
10
  options: ContextPrecisionMetricOptions;
11
11
  }): import("@mastra/core/scores").MastraScorer<"Context Precision Scorer", ScorerRunInputForAgent, ScorerRunOutputForAgent, Record<"analyzeStepResult", {
12
12
  verdicts: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/scorers/llm/context-precision/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAS3F,MAAM,WAAW,6BAA6B;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,EAAE,MAAM,EAAE,uBAAuB,KAAK,MAAM,EAAE,CAAC;CACjG;AAYD,wBAAgB,4BAA4B,CAAC,EAC3C,KAAK,EACL,OAAO,GACR,EAAE;IACD,KAAK,EAAE,mBAAmB,CAAC;IAC3B,OAAO,EAAE,6BAA6B,CAAC;CACxC;;;;;;6FAmGA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/scorers/llm/context-precision/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAS3F,MAAM,WAAW,6BAA6B;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,EAAE,MAAM,EAAE,uBAAuB,KAAK,MAAM,EAAE,CAAC;CACjG;AAYD,wBAAgB,4BAA4B,CAAC,EAC3C,KAAK,EACL,OAAO,GACR,EAAE;IACD,KAAK,EAAE,iBAAiB,CAAC;IACzB,OAAO,EAAE,6BAA6B,CAAC;CACxC;;;;;;6FAmGA"}
@@ -1,4 +1,4 @@
1
- import type { MastraLanguageModel } from '@mastra/core/agent';
1
+ import type { MastraModelConfig } from '@mastra/core/llm';
2
2
  import type { ScorerRunInputForAgent, ScorerRunOutputForAgent } from '@mastra/core/scores';
3
3
  export interface ContextRelevanceOptions {
4
4
  scale?: number;
@@ -11,7 +11,7 @@ export interface ContextRelevanceOptions {
11
11
  };
12
12
  }
13
13
  export declare function createContextRelevanceScorerLLM({ model, options, }: {
14
- model: MastraLanguageModel;
14
+ model: MastraModelConfig;
15
15
  options: ContextRelevanceOptions;
16
16
  }): import("@mastra/core/scores").MastraScorer<"Context Relevance (LLM)", ScorerRunInputForAgent, ScorerRunOutputForAgent, Record<"analyzeStepResult", {
17
17
  evaluations: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/scorers/llm/context-relevance/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAM3F,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,EAAE,MAAM,EAAE,uBAAuB,KAAK,MAAM,EAAE,CAAC;IAChG,SAAS,CAAC,EAAE;QACV,0BAA0B,CAAC,EAAE,MAAM,CAAC;QACpC,qBAAqB,CAAC,EAAE,MAAM,CAAC;QAC/B,wBAAwB,CAAC,EAAE,MAAM,CAAC;KACnC,CAAC;CACH;AAuBD,wBAAgB,+BAA+B,CAAC,EAC9C,KAAK,EACL,OAAO,GACR,EAAE;IACD,KAAK,EAAE,mBAAmB,CAAC;IAC3B,OAAO,EAAE,uBAAuB,CAAC;CAClC;;;;;;;;;;6FA6IA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/scorers/llm/context-relevance/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAM3F,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,EAAE,MAAM,EAAE,uBAAuB,KAAK,MAAM,EAAE,CAAC;IAChG,SAAS,CAAC,EAAE;QACV,0BAA0B,CAAC,EAAE,MAAM,CAAC;QACpC,qBAAqB,CAAC,EAAE,MAAM,CAAC;QAC/B,wBAAwB,CAAC,EAAE,MAAM,CAAC;KACnC,CAAC;CACH;AAuBD,wBAAgB,+BAA+B,CAAC,EAC9C,KAAK,EACL,OAAO,GACR,EAAE;IACD,KAAK,EAAE,iBAAiB,CAAC;IACzB,OAAO,EAAE,uBAAuB,CAAC;CAClC;;;;;;;;;;6FA6IA"}