@mastra/evals 0.10.1 → 0.10.2-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.
@@ -1806,9 +1806,9 @@ function generateEvaluatePrompt9({
1806
1806
  output,
1807
1807
  context
1808
1808
  }) {
1809
- return `For EACH sentence in the given expected output below, determine whether the sentence can be attributed to the nodes of retrieval contexts. Please generate a list of JSON with two keys: \`verdict\` and \`reason\`.
1810
- The "verdict" key should STRICTLY be either a 'yes' or 'no'. Answer 'yes' if the sentence can be attributed to any parts of the retrieval context, else answer 'no'.
1811
- The "reason" key should provide a reason why to the verdict. In the reason, you should aim to include the node(s) count in the retrieval context (eg., 1st node, and 2nd node in the retrieval context) that is attributed to said sentence. You should also aim to quote the specific part of the retrieval context to justify your verdict, but keep it extremely concise and cut short the quote with an ellipsis if possible.
1809
+ return `For EACH context node provided below, determine whether the information in that node was used in the given output. Please generate a list of JSON with two keys: \`verdict\` and \`reason\`.
1810
+ The "verdict" key should STRICTLY be either a 'yes' or 'no'. Answer 'yes' if the context node was used in the output, else answer 'no'.
1811
+ The "reason" key should provide a brief explanation for the verdict. If the context was used, quote the specific part of the output that relates to this context node, keeping it concise and using an ellipsis if needed.
1812
1812
 
1813
1813
  **
1814
1814
  IMPORTANT: Please make sure to only return in JSON format, with the 'verdicts' key as a list of JSON objects, each with two keys: \`verdict\` and \`reason\`.
@@ -1823,17 +1823,18 @@ IMPORTANT: Please make sure to only return in JSON format, with the 'verdicts' k
1823
1823
  ]
1824
1824
  }}
1825
1825
 
1826
- Since you are going to generate a verdict for each sentence, the number of 'verdicts' SHOULD BE STRICTLY EQUAL to the number of sentences in of \`expected output\`.
1826
+ The number of 'verdicts' SHOULD BE STRICTLY EQUAL to the number of context nodes provided.
1827
1827
  **
1828
1828
 
1829
1829
  input:
1830
1830
  ${input}
1831
1831
 
1832
- Expected Output:
1832
+ Output to evaluate:
1833
1833
  ${output}
1834
1834
 
1835
- Retrieval Context:
1836
- ${context}
1835
+ Context Nodes:
1836
+ ${context.map((node, i) => `--- Node ${i + 1} ---
1837
+ ${node}`).join("\n\n")}
1837
1838
  `;
1838
1839
  }
1839
1840
  function generateReasonPrompt8({
@@ -1804,9 +1804,9 @@ function generateEvaluatePrompt9({
1804
1804
  output,
1805
1805
  context
1806
1806
  }) {
1807
- return `For EACH sentence in the given expected output below, determine whether the sentence can be attributed to the nodes of retrieval contexts. Please generate a list of JSON with two keys: \`verdict\` and \`reason\`.
1808
- The "verdict" key should STRICTLY be either a 'yes' or 'no'. Answer 'yes' if the sentence can be attributed to any parts of the retrieval context, else answer 'no'.
1809
- The "reason" key should provide a reason why to the verdict. In the reason, you should aim to include the node(s) count in the retrieval context (eg., 1st node, and 2nd node in the retrieval context) that is attributed to said sentence. You should also aim to quote the specific part of the retrieval context to justify your verdict, but keep it extremely concise and cut short the quote with an ellipsis if possible.
1807
+ return `For EACH context node provided below, determine whether the information in that node was used in the given output. Please generate a list of JSON with two keys: \`verdict\` and \`reason\`.
1808
+ The "verdict" key should STRICTLY be either a 'yes' or 'no'. Answer 'yes' if the context node was used in the output, else answer 'no'.
1809
+ The "reason" key should provide a brief explanation for the verdict. If the context was used, quote the specific part of the output that relates to this context node, keeping it concise and using an ellipsis if needed.
1810
1810
 
1811
1811
  **
1812
1812
  IMPORTANT: Please make sure to only return in JSON format, with the 'verdicts' key as a list of JSON objects, each with two keys: \`verdict\` and \`reason\`.
@@ -1821,17 +1821,18 @@ IMPORTANT: Please make sure to only return in JSON format, with the 'verdicts' k
1821
1821
  ]
1822
1822
  }}
1823
1823
 
1824
- Since you are going to generate a verdict for each sentence, the number of 'verdicts' SHOULD BE STRICTLY EQUAL to the number of sentences in of \`expected output\`.
1824
+ The number of 'verdicts' SHOULD BE STRICTLY EQUAL to the number of context nodes provided.
1825
1825
  **
1826
1826
 
1827
1827
  input:
1828
1828
  ${input}
1829
1829
 
1830
- Expected Output:
1830
+ Output to evaluate:
1831
1831
  ${output}
1832
1832
 
1833
- Retrieval Context:
1834
- ${context}
1833
+ Context Nodes:
1834
+ ${context.map((node, i) => `--- Node ${i + 1} ---
1835
+ ${node}`).join("\n\n")}
1835
1836
  `;
1836
1837
  }
1837
1838
  function generateReasonPrompt8({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/evals",
3
- "version": "0.10.1",
3
+ "version": "0.10.2-alpha.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -81,7 +81,7 @@
81
81
  "typescript": "^5.8.2",
82
82
  "vitest": "^3.1.2",
83
83
  "@internal/lint": "0.0.7",
84
- "@mastra/core": "0.10.1"
84
+ "@mastra/core": "0.10.2-alpha.1"
85
85
  },
86
86
  "scripts": {
87
87
  "check": "tsc --noEmit",