@arizeai/phoenix-evals 0.0.7 → 0.1.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.
Files changed (89) hide show
  1. package/dist/esm/default_templates/DOCUMENT_RELEVANCY_TEMPLATE.d.ts +6 -0
  2. package/dist/esm/default_templates/DOCUMENT_RELEVANCY_TEMPLATE.d.ts.map +1 -0
  3. package/dist/esm/default_templates/DOCUMENT_RELEVANCY_TEMPLATE.js +25 -0
  4. package/dist/esm/default_templates/DOCUMENT_RELEVANCY_TEMPLATE.js.map +1 -0
  5. package/dist/esm/default_templates/HALLUCINATION_TEMPLATE.d.ts +1 -1
  6. package/dist/esm/default_templates/HALLUCINATION_TEMPLATE.js +2 -2
  7. package/dist/esm/default_templates/HALLUCINATION_TEMPLATE.js.map +1 -1
  8. package/dist/esm/default_templates/index.d.ts +1 -0
  9. package/dist/esm/default_templates/index.d.ts.map +1 -1
  10. package/dist/esm/default_templates/index.js +1 -0
  11. package/dist/esm/default_templates/index.js.map +1 -1
  12. package/dist/esm/llm/createClassificationEvaluator.d.ts +3 -0
  13. package/dist/esm/llm/createClassificationEvaluator.d.ts.map +1 -0
  14. package/dist/esm/llm/createClassificationEvaluator.js +10 -0
  15. package/dist/esm/llm/createClassificationEvaluator.js.map +1 -0
  16. package/dist/esm/llm/createClassifierFn.d.ts +6 -0
  17. package/dist/esm/llm/createClassifierFn.d.ts.map +1 -0
  18. package/dist/esm/llm/{createClassifier.js → createClassifierFn.js} +3 -3
  19. package/dist/esm/llm/createClassifierFn.js.map +1 -0
  20. package/dist/esm/llm/createDocumentRelevancyEvaluator.d.ts +42 -0
  21. package/dist/esm/llm/createDocumentRelevancyEvaluator.d.ts.map +1 -0
  22. package/dist/esm/llm/createDocumentRelevancyEvaluator.js +40 -0
  23. package/dist/esm/llm/createDocumentRelevancyEvaluator.js.map +1 -0
  24. package/dist/esm/llm/createHallucinationEvaluator.d.ts +16 -5
  25. package/dist/esm/llm/createHallucinationEvaluator.d.ts.map +1 -1
  26. package/dist/esm/llm/createHallucinationEvaluator.js +5 -4
  27. package/dist/esm/llm/createHallucinationEvaluator.js.map +1 -1
  28. package/dist/esm/llm/index.d.ts +3 -1
  29. package/dist/esm/llm/index.d.ts.map +1 -1
  30. package/dist/esm/llm/index.js +3 -1
  31. package/dist/esm/llm/index.js.map +1 -1
  32. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  33. package/dist/esm/types/evals.d.ts +49 -4
  34. package/dist/esm/types/evals.d.ts.map +1 -1
  35. package/dist/esm/types/prompts.d.ts +7 -6
  36. package/dist/esm/types/prompts.d.ts.map +1 -1
  37. package/dist/src/default_templates/DOCUMENT_RELEVANCY_TEMPLATE.d.ts +6 -0
  38. package/dist/src/default_templates/DOCUMENT_RELEVANCY_TEMPLATE.d.ts.map +1 -0
  39. package/dist/src/default_templates/DOCUMENT_RELEVANCY_TEMPLATE.js +28 -0
  40. package/dist/src/default_templates/DOCUMENT_RELEVANCY_TEMPLATE.js.map +1 -0
  41. package/dist/src/default_templates/HALLUCINATION_TEMPLATE.d.ts +1 -1
  42. package/dist/src/default_templates/HALLUCINATION_TEMPLATE.js +2 -2
  43. package/dist/src/default_templates/HALLUCINATION_TEMPLATE.js.map +1 -1
  44. package/dist/src/default_templates/index.d.ts +1 -0
  45. package/dist/src/default_templates/index.d.ts.map +1 -1
  46. package/dist/src/default_templates/index.js +1 -0
  47. package/dist/src/default_templates/index.js.map +1 -1
  48. package/dist/src/llm/createClassificationEvaluator.d.ts +3 -0
  49. package/dist/src/llm/createClassificationEvaluator.d.ts.map +1 -0
  50. package/dist/src/llm/createClassificationEvaluator.js +13 -0
  51. package/dist/src/llm/createClassificationEvaluator.js.map +1 -0
  52. package/dist/src/llm/createClassifierFn.d.ts +6 -0
  53. package/dist/src/llm/createClassifierFn.d.ts.map +1 -0
  54. package/dist/src/llm/{createClassifier.js → createClassifierFn.js} +4 -4
  55. package/dist/src/llm/createClassifierFn.js.map +1 -0
  56. package/dist/src/llm/createDocumentRelevancyEvaluator.d.ts +42 -0
  57. package/dist/src/llm/createDocumentRelevancyEvaluator.d.ts.map +1 -0
  58. package/dist/src/llm/createDocumentRelevancyEvaluator.js +50 -0
  59. package/dist/src/llm/createDocumentRelevancyEvaluator.js.map +1 -0
  60. package/dist/src/llm/createHallucinationEvaluator.d.ts +16 -5
  61. package/dist/src/llm/createHallucinationEvaluator.d.ts.map +1 -1
  62. package/dist/src/llm/createHallucinationEvaluator.js +6 -5
  63. package/dist/src/llm/createHallucinationEvaluator.js.map +1 -1
  64. package/dist/src/llm/index.d.ts +3 -1
  65. package/dist/src/llm/index.d.ts.map +1 -1
  66. package/dist/src/llm/index.js +3 -1
  67. package/dist/src/llm/index.js.map +1 -1
  68. package/dist/src/types/evals.d.ts +49 -4
  69. package/dist/src/types/evals.d.ts.map +1 -1
  70. package/dist/src/types/prompts.d.ts +7 -6
  71. package/dist/src/types/prompts.d.ts.map +1 -1
  72. package/dist/tsconfig.tsbuildinfo +1 -1
  73. package/package.json +5 -5
  74. package/src/default_templates/DOCUMENT_RELEVANCY_TEMPLATE.ts +25 -0
  75. package/src/default_templates/HALLUCINATION_TEMPLATE.ts +2 -2
  76. package/src/default_templates/index.ts +1 -0
  77. package/src/llm/createClassificationEvaluator.ts +13 -0
  78. package/src/llm/{createClassifier.ts → createClassifierFn.ts} +4 -7
  79. package/src/llm/createDocumentRelevancyEvaluator.ts +72 -0
  80. package/src/llm/createHallucinationEvaluator.ts +26 -8
  81. package/src/llm/index.ts +3 -1
  82. package/src/types/evals.ts +54 -7
  83. package/src/types/prompts.ts +7 -6
  84. package/dist/esm/llm/createClassifier.d.ts +0 -6
  85. package/dist/esm/llm/createClassifier.d.ts.map +0 -1
  86. package/dist/esm/llm/createClassifier.js.map +0 -1
  87. package/dist/src/llm/createClassifier.d.ts +0 -6
  88. package/dist/src/llm/createClassifier.d.ts.map +0 -1
  89. package/dist/src/llm/createClassifier.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arizeai/phoenix-evals",
3
- "version": "0.0.7",
3
+ "version": "0.1.0",
4
4
  "description": "A library for running evaluations for AI use cases",
5
5
  "main": "dist/src/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -41,7 +41,7 @@
41
41
  "author": "oss@arize.com",
42
42
  "license": "ELv2",
43
43
  "devDependencies": {
44
- "@ai-sdk/openai": "^1.1.15",
44
+ "@ai-sdk/openai": "^2.0.0",
45
45
  "@arizeai/openinference-instrumentation-openai": "^2.3.0",
46
46
  "@types/mustache": "^4.2.6",
47
47
  "@types/node": "^24.0.10",
@@ -50,16 +50,16 @@
50
50
  "typedoc": "^0.27.9",
51
51
  "typescript": "^5.8.2",
52
52
  "vitest": "^2.1.9",
53
- "@arizeai/phoenix-client": "2.3.5"
53
+ "@arizeai/phoenix-client": "3.0.0"
54
54
  },
55
55
  "engines": {
56
56
  "node": ">=18"
57
57
  },
58
58
  "dependencies": {
59
59
  "@opentelemetry/api": "^1.9.0",
60
- "ai": "^4.1.47",
60
+ "ai": "^5.0.0",
61
61
  "mustache": "^4.2.0",
62
- "zod": "^3.25.75"
62
+ "zod": "^4.0.14"
63
63
  },
64
64
  "scripts": {
65
65
  "clean": "rimraf dist",
@@ -0,0 +1,25 @@
1
+ export const DOCUMENT_RELEVANCY_TEMPLATE = `
2
+ You are comparing a document to a question and trying to determine if the document text
3
+ contains information relevant to answering the question. Here is the data:
4
+
5
+ [BEGIN DATA]
6
+ ************
7
+ [Question]: {{input}}
8
+ ************
9
+ [Document text]: {{documentText}}
10
+ ************
11
+ [END DATA]
12
+
13
+ Compare the Question above to the Document text. You must determine whether the Document text
14
+ contains information that can answer the Question. Please focus on whether the very specific
15
+ question can be answered by the information in the Document text.
16
+ Your response must be single word, either "relevant" or "unrelated",
17
+ and should not contain any text or characters aside from that word.
18
+ "unrelated" means that the document text does not contain an answer to the Question.
19
+ "relevant" means the document text contains an answer to the Question.
20
+ `;
21
+
22
+ export const DOCUMENT_RELEVANCY_CHOICES = {
23
+ relevant: 1,
24
+ unrelated: 0,
25
+ };
@@ -26,6 +26,6 @@ Is the answer above factual or hallucinated based on the query and reference tex
26
26
  `;
27
27
 
28
28
  export const HALLUCINATION_CHOICES = {
29
- factual: 1,
30
- hallucinated: 0,
29
+ hallucinated: 1,
30
+ factual: 0,
31
31
  };
@@ -1 +1,2 @@
1
1
  export * from "./HALLUCINATION_TEMPLATE";
2
+ export * from "./DOCUMENT_RELEVANCY_TEMPLATE";
@@ -0,0 +1,13 @@
1
+ import { CreateClassificationEvaluatorArgs, Evaluator } from "../types/evals";
2
+ import { createClassifierFn } from "./createClassifierFn";
3
+
4
+ export function createClassificationEvaluator<
5
+ ExampleType extends Record<string, unknown>,
6
+ >(args: CreateClassificationEvaluatorArgs): Evaluator<ExampleType> {
7
+ return {
8
+ name: args.name,
9
+ source: "LLM",
10
+ optimizationDirection: args.optimizationDirection,
11
+ evaluate: createClassifierFn(args),
12
+ };
13
+ }
@@ -1,6 +1,5 @@
1
1
  import {
2
2
  ClassificationChoicesMap,
3
- EvaluationArgs,
4
3
  EvaluationResult,
5
4
  CreateClassifierArgs,
6
5
  EvaluatorFn,
@@ -23,16 +22,14 @@ function choicesToLabels(
23
22
  }
24
23
 
25
24
  /**
26
- * A function that serves as a factory that will output a classification evaluator
25
+ * A function that serves as a factory that will output a classification evaluator function
27
26
  */
28
- export function createClassifier<OutputType, InputType>(
27
+ export function createClassifierFn<ExampleType extends Record<string, unknown>>(
29
28
  args: CreateClassifierArgs
30
- ): EvaluatorFn<OutputType, InputType> {
29
+ ): EvaluatorFn<ExampleType> {
31
30
  const { model, choices, promptTemplate, ...rest } = args;
32
31
 
33
- return async (
34
- args: EvaluationArgs<OutputType, InputType>
35
- ): Promise<EvaluationResult> => {
32
+ return async (args: ExampleType): Promise<EvaluationResult> => {
36
33
  const templateVariables = {
37
34
  ...args,
38
35
  };
@@ -0,0 +1,72 @@
1
+ import { CreateClassificationEvaluatorArgs, Evaluator } from "../types/evals";
2
+ import {
3
+ DOCUMENT_RELEVANCY_TEMPLATE,
4
+ DOCUMENT_RELEVANCY_CHOICES,
5
+ } from "../default_templates/DOCUMENT_RELEVANCY_TEMPLATE";
6
+ import { createClassificationEvaluator } from "./createClassificationEvaluator";
7
+
8
+ export interface DocumentRelevancyEvaluatorArgs
9
+ extends Omit<
10
+ CreateClassificationEvaluatorArgs,
11
+ "promptTemplate" | "choices" | "optimizationDirection" | "name"
12
+ > {
13
+ optimizationDirection?: CreateClassificationEvaluatorArgs["optimizationDirection"];
14
+ name?: CreateClassificationEvaluatorArgs["name"];
15
+ choices?: CreateClassificationEvaluatorArgs["choices"];
16
+ promptTemplate?: CreateClassificationEvaluatorArgs["promptTemplate"];
17
+ }
18
+
19
+ /**
20
+ * An example to be evaluated by the document relevancy evaluator.
21
+ */
22
+ export type DocumentRelevancyExample = {
23
+ input: string;
24
+ documentText: string;
25
+ };
26
+
27
+ /**
28
+ * Creates a document relevancy evaluator function.
29
+ *
30
+ * This function returns an evaluator that determines whether a given document text
31
+ * is relevant to a provided input question. The evaluator uses a classification model
32
+ * and a prompt template to make its determination.
33
+ *
34
+ * @param args - The arguments for creating the document relevancy evaluator.
35
+ * @param args.model - The model to use for classification.
36
+ * @param args.choices - The possible classification choices (defaults to DOCUMENT_RELEVANCY_CHOICES).
37
+ * @param args.promptTemplate - The prompt template to use (defaults to DOCUMENT_RELEVANCY_TEMPLATE).
38
+ * @param args.telemetry - The telemetry to use for the evaluator.
39
+ *
40
+ * @returns An evaluator function that takes a {@link DocumentRelevancyExample} and returns a classification result
41
+ * indicating whether the document is relevant to the input question.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * const evaluator = createDocumentRelevancyEvaluator({ model: openai("gpt-4o-mini") });
46
+ * const result = await evaluator.evaluate({
47
+ * input: "What is the capital of France?",
48
+ * documentText: "Paris is the capital and most populous city of France.",
49
+ * });
50
+ * console.log(result.label); // "relevant" or "unrelated"
51
+ * ```
52
+ */
53
+ export function createDocumentRelevancyEvaluator(
54
+ args: DocumentRelevancyEvaluatorArgs
55
+ ): Evaluator<DocumentRelevancyExample> {
56
+ const {
57
+ choices = DOCUMENT_RELEVANCY_CHOICES,
58
+ promptTemplate = DOCUMENT_RELEVANCY_TEMPLATE,
59
+ optimizationDirection = "MAXIMIZE",
60
+ name = "document_relevancy",
61
+ ...rest
62
+ } = args;
63
+
64
+ return createClassificationEvaluator<DocumentRelevancyExample>({
65
+ ...args,
66
+ promptTemplate,
67
+ choices,
68
+ optimizationDirection,
69
+ name,
70
+ ...rest,
71
+ });
72
+ }
@@ -1,15 +1,30 @@
1
- import { createClassifier } from "./createClassifier";
2
- import { CreateClassifierArgs, EvaluatorFn } from "../types/evals";
1
+ import { CreateClassificationEvaluatorArgs, Evaluator } from "../types/evals";
3
2
  import {
4
3
  HALLUCINATION_TEMPLATE,
5
4
  HALLUCINATION_CHOICES,
6
5
  } from "../default_templates/HALLUCINATION_TEMPLATE";
6
+ import { createClassificationEvaluator } from "./createClassificationEvaluator";
7
7
 
8
8
  export interface HallucinationEvaluatorArgs
9
- extends Omit<CreateClassifierArgs, "promptTemplate" | "choices"> {
10
- choices?: CreateClassifierArgs["choices"];
11
- promptTemplate?: CreateClassifierArgs["promptTemplate"];
9
+ extends Omit<
10
+ CreateClassificationEvaluatorArgs,
11
+ "promptTemplate" | "choices" | "optimizationDirection" | "name"
12
+ > {
13
+ optimizationDirection?: CreateClassificationEvaluatorArgs["optimizationDirection"];
14
+ name?: CreateClassificationEvaluatorArgs["name"];
15
+ choices?: CreateClassificationEvaluatorArgs["choices"];
16
+ promptTemplate?: CreateClassificationEvaluatorArgs["promptTemplate"];
12
17
  }
18
+
19
+ /**
20
+ * An example to be evaluated by the hallucination evaluator.
21
+ */
22
+ export type HallucinationExample = {
23
+ input: string;
24
+ output: string;
25
+ reference?: string;
26
+ context?: string;
27
+ };
13
28
  /**
14
29
  * Creates a function that evaluates whether an answer is factual or hallucinated based on a query and reference text.
15
30
  *
@@ -18,17 +33,20 @@ export interface HallucinationEvaluatorArgs
18
33
  */
19
34
  export function createHallucinationEvaluator(
20
35
  args: HallucinationEvaluatorArgs
21
- ): EvaluatorFn<string, string> {
36
+ ): Evaluator<HallucinationExample> {
22
37
  const {
23
38
  choices = HALLUCINATION_CHOICES,
24
39
  promptTemplate = HALLUCINATION_TEMPLATE,
40
+ optimizationDirection = "MINIMIZE",
41
+ name = "hallucination",
25
42
  ...rest
26
43
  } = args;
27
- const hallucinationEvaluatorFn = createClassifier<string, string>({
44
+ return createClassificationEvaluator<HallucinationExample>({
28
45
  ...args,
29
46
  promptTemplate,
30
47
  choices,
48
+ optimizationDirection,
49
+ name,
31
50
  ...rest,
32
51
  });
33
- return hallucinationEvaluatorFn;
34
52
  }
package/src/llm/index.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  export * from "./generateClassification";
2
- export * from "./createClassifier";
2
+ export * from "./createClassifierFn";
3
+ export * from "./createClassificationEvaluator";
3
4
  export * from "./createHallucinationEvaluator";
5
+ export * from "./createDocumentRelevancyEvaluator";
@@ -2,9 +2,9 @@ import { LanguageModel } from "ai";
2
2
  import { WithTelemetry } from "./otel";
3
3
 
4
4
  /**
5
- * The arguments for an evaluation
5
+ * A specific AI example that is under evaluation
6
6
  */
7
- export interface EvaluationArgs<OutputType, InputType> {
7
+ export interface ExampleRecord<OutputType, InputType> {
8
8
  output: OutputType;
9
9
  expected?: OutputType;
10
10
  input?: InputType;
@@ -15,9 +15,7 @@ export interface WithLLM {
15
15
  model: LanguageModel;
16
16
  }
17
17
 
18
- export interface LLMEvaluationArgs<OutputType, InputType>
19
- extends EvaluationArgs<OutputType, InputType>,
20
- WithLLM {}
18
+ export interface LLMEvaluationArgs extends WithLLM {}
21
19
 
22
20
  /**
23
21
  * The result of an evaluation
@@ -80,6 +78,55 @@ export interface CreateClassifierArgs extends WithTelemetry {
80
78
  promptTemplate: string;
81
79
  }
82
80
 
83
- export type EvaluatorFn<OutputType, InputType> = (
84
- args: EvaluationArgs<OutputType, InputType>
81
+ export interface CreateClassificationEvaluatorArgs
82
+ extends CreateClassifierArgs {
83
+ /**
84
+ * The name of the metric that the evaluator produces
85
+ * E.x. "correctness"
86
+ */
87
+ name: string;
88
+ /**
89
+ * If present, represents the direction in which you want the metric to be optimized
90
+ * E.x. "MAXIMIZE" means you want the number to be higher.
91
+ */
92
+ optimizationDirection?: OptimizationDirection;
93
+ }
94
+
95
+ export type EvaluatorFn<ExampleType extends Record<string, unknown>> = (
96
+ args: ExampleType
85
97
  ) => Promise<EvaluationResult>;
98
+
99
+ /**
100
+ * The source of the evaluation
101
+ */
102
+ type EvaluationSource = "LLM" | "CODE";
103
+
104
+ /**
105
+ * The direction to optimize the numeric evaluation score
106
+ * E.x. "MAXIMIZE" means that the higher the score, the better the evaluation
107
+ */
108
+ type OptimizationDirection = "MAXIMIZE" | "MINIMIZE";
109
+
110
+ /**
111
+ * The Base Evaluator interface
112
+ * This is the interface that all evaluators must implement
113
+ */
114
+ export interface Evaluator<ExampleType extends Record<string, unknown>> {
115
+ /**
116
+ * The name of the evaluator / the metric that it measures
117
+ */
118
+ name: string;
119
+ /**
120
+ * The source of the evaluation. Also known as the "kind" of evaluator.
121
+ */
122
+ source: EvaluationSource;
123
+ /**
124
+ * The direction to optimize the numeric evaluation score
125
+ * E.x. "MAXIMIZE" means that the higher the score, the better the evaluation
126
+ */
127
+ optimizationDirection?: OptimizationDirection;
128
+ /**
129
+ * The function that evaluates the example
130
+ */
131
+ evaluate: EvaluatorFn<ExampleType>;
132
+ }
@@ -1,9 +1,9 @@
1
- import { CoreMessage, Message } from "ai";
1
+ import { ModelMessage } from "ai";
2
2
 
3
3
  /**
4
- * Prompt part of the AI function options.
5
- * It contains a system message, a simple text prompt, or a list of messages.
6
- * Note: this is pulled from the `ai` package and is used as a compatibility type.
4
+ * Prompt part of the AI function options for model generation.
5
+ * It contains a system message, a simple text prompt, or a list of model messages.
6
+ * Uses ModelMessage format compatible with AI SDK v5 generateObject function.
7
7
  */
8
8
  export interface WithPrompt {
9
9
  /**
@@ -15,7 +15,8 @@ export interface WithPrompt {
15
15
  */
16
16
  prompt?: string;
17
17
  /**
18
- * A list of messages. You can either use `prompt` or `messages` but not both.
18
+ * A list of model messages. You can either use `prompt` or `messages` but not both.
19
+ * Uses ModelMessage format for compatibility with AI SDK v5.
19
20
  */
20
- messages?: Array<CoreMessage> | Array<Omit<Message, "id">>;
21
+ messages?: Array<ModelMessage>;
21
22
  }
@@ -1,6 +0,0 @@
1
- import { CreateClassifierArgs, EvaluatorFn } from "../types/evals.js";
2
- /**
3
- * A function that serves as a factory that will output a classification evaluator
4
- */
5
- export declare function createClassifier<OutputType, InputType>(args: CreateClassifierArgs): EvaluatorFn<OutputType, InputType>;
6
- //# sourceMappingURL=createClassifier.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createClassifier.d.ts","sourceRoot":"","sources":["../../../src/llm/createClassifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,oBAAoB,EACpB,WAAW,EACZ,MAAM,gBAAgB,CAAC;AAkBxB;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,SAAS,EACpD,IAAI,EAAE,oBAAoB,GACzB,WAAW,CAAC,UAAU,EAAE,SAAS,CAAC,CA8BpC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"createClassifier.js","sourceRoot":"","sources":["../../../src/llm/createClassifier.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;;GAGG;AACH,SAAS,eAAe,CACtB,OAAiC;IAEjC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,MAA+B,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC9B,IAA0B;IAE1B,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;IAEzD,OAAO,KAAK,EACV,IAA2C,EAChB,EAAE;QAC7B,MAAM,iBAAiB,GAAG;YACxB,GAAG,IAAI;SACR,CAAC;QAEF,MAAM,MAAM,GAAG,cAAc,CAAC;YAC5B,QAAQ,EAAE,cAAc;YACxB,SAAS,EAAE,iBAAiB;SAC7B,CAAC,CAAC;QAEH,MAAM,cAAc,GAAG,MAAM,sBAAsB,CAAC;YAClD,KAAK;YACL,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC;YAChC,MAAM;YACN,GAAG,IAAI;SACR,CAAC,CAAC;QAEH,mEAAmE;QACnE,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAE5C,OAAO;YACL,KAAK;YACL,GAAG,cAAc;SAClB,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
@@ -1,6 +0,0 @@
1
- import { CreateClassifierArgs, EvaluatorFn } from "../types/evals";
2
- /**
3
- * A function that serves as a factory that will output a classification evaluator
4
- */
5
- export declare function createClassifier<OutputType, InputType>(args: CreateClassifierArgs): EvaluatorFn<OutputType, InputType>;
6
- //# sourceMappingURL=createClassifier.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createClassifier.d.ts","sourceRoot":"","sources":["../../../src/llm/createClassifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,oBAAoB,EACpB,WAAW,EACZ,MAAM,gBAAgB,CAAC;AAkBxB;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,SAAS,EACpD,IAAI,EAAE,oBAAoB,GACzB,WAAW,CAAC,UAAU,EAAE,SAAS,CAAC,CA8BpC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"createClassifier.js","sourceRoot":"","sources":["../../../src/llm/createClassifier.ts"],"names":[],"mappings":";;;;;;;;;;;;;AA2BA,4CAgCC;AApDD,qEAAkE;AAClE,0CAA6C;AAE7C;;;GAGG;AACH,SAAS,eAAe,CACtB,OAAiC;IAEjC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,MAA+B,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,SAAgB,gBAAgB,CAC9B,IAA0B;IAE1B,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,KAAc,IAAI,EAAb,IAAI,UAAK,IAAI,EAAlD,sCAA2C,CAAO,CAAC;IAEzD,OAAO,KAAK,EACV,IAA2C,EAChB,EAAE;QAC7B,MAAM,iBAAiB,qBAClB,IAAI,CACR,CAAC;QAEF,MAAM,MAAM,GAAG,IAAA,yBAAc,EAAC;YAC5B,QAAQ,EAAE,cAAc;YACxB,SAAS,EAAE,iBAAiB;SAC7B,CAAC,CAAC;QAEH,MAAM,cAAc,GAAG,MAAM,IAAA,+CAAsB,kBACjD,KAAK,EACL,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,EAChC,MAAM,IACH,IAAI,EACP,CAAC;QAEH,mEAAmE;QACnE,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAE5C,uBACE,KAAK,IACF,cAAc,EACjB;IACJ,CAAC,CAAC;AACJ,CAAC"}