@arizeai/phoenix-evals 0.6.2 → 0.6.5

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 CHANGED
@@ -19,6 +19,7 @@
19
19
  <a href="https://arize-ai.github.io/phoenix/">
20
20
  <img src="https://img.shields.io/badge/docs-blue?logo=typescript&logoColor=white" alt="Documentation">
21
21
  </a>
22
+ <img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=8e8e8b34-7900-43fa-a38f-1f070bd48c64&page=js/packages/phoenix-evals/README.md" />
22
23
  </p>
23
24
 
24
25
  This package provides a TypeScript evaluation library. It is vendor agnostic and can be used in isolation of any framework or platform. This package is still under active development and is subject to change.
@@ -2,7 +2,7 @@ import { EvaluatorBase } from "../core/EvaluatorBase.js";
2
2
  import { EvaluationKind, OptimizationDirection, TelemetryConfig } from "../types/index.js";
3
3
  type AnyFn = (...args: any[]) => any;
4
4
  /**
5
- * Options for creating a custom evaluator using {@link CreateEvaluator}.
5
+ * Options for creating a custom evaluator using {@link createEvaluator}.
6
6
  *
7
7
  * @public
8
8
  */
@@ -15,7 +15,7 @@ export type CreateEvaluatorOptions = {
15
15
  *
16
16
  * @example
17
17
  * ```typescript
18
- * const evaluator = CreateEvaluator(myFunction, { name: "custom-metric" });
18
+ * const evaluator = createEvaluator(myFunction, { name: "custom-metric" });
19
19
  * ```
20
20
  */
21
21
  name?: string;
@@ -29,7 +29,7 @@ export type CreateEvaluatorOptions = {
29
29
  *
30
30
  * @example
31
31
  * ```typescript
32
- * const evaluator = CreateEvaluator(myFunction, { kind: "CODE" });
32
+ * const evaluator = createEvaluator(myFunction, { kind: "CODE" });
33
33
  * ```
34
34
  */
35
35
  kind?: EvaluationKind;
@@ -43,7 +43,7 @@ export type CreateEvaluatorOptions = {
43
43
  *
44
44
  * @example
45
45
  * ```typescript
46
- * const evaluator = CreateEvaluator(myFunction, {
46
+ * const evaluator = createEvaluator(myFunction, {
47
47
  * optimizationDirection: "MAXIMIZE"
48
48
  * });
49
49
  * ```
@@ -60,7 +60,7 @@ export type CreateEvaluatorOptions = {
60
60
  *
61
61
  * @example
62
62
  * ```typescript
63
- * const evaluator = CreateEvaluator(myFunction, {
63
+ * const evaluator = createEvaluator(myFunction, {
64
64
  * telemetry: { isEnabled: true, tracer: myTracer }
65
65
  * });
66
66
  * ```
@@ -101,7 +101,7 @@ export type CreateEvaluatorOptions = {
101
101
  * @example
102
102
  * Basic usage with a simple scoring function:
103
103
  * ```typescript
104
- * const accuracyEvaluator = CreateEvaluator(
104
+ * const accuracyEvaluator = createEvaluator(
105
105
  * ({ output, expected }) => {
106
106
  * return output === expected ? 1 : 0;
107
107
  * },
@@ -123,7 +123,7 @@ export type CreateEvaluatorOptions = {
123
123
  * @example
124
124
  * Returning a full EvaluationResult:
125
125
  * ```typescript
126
- * const qualityEvaluator = CreateEvaluator(
126
+ * const qualityEvaluator = createEvaluator(
127
127
  * ({ output }) => {
128
128
  * const score = calculateQuality(output);
129
129
  * return {
@@ -38,7 +38,7 @@ function generateUniqueName() {
38
38
  * @example
39
39
  * Basic usage with a simple scoring function:
40
40
  * ```typescript
41
- * const accuracyEvaluator = CreateEvaluator(
41
+ * const accuracyEvaluator = createEvaluator(
42
42
  * ({ output, expected }) => {
43
43
  * return output === expected ? 1 : 0;
44
44
  * },
@@ -60,7 +60,7 @@ function generateUniqueName() {
60
60
  * @example
61
61
  * Returning a full EvaluationResult:
62
62
  * ```typescript
63
- * const qualityEvaluator = CreateEvaluator(
63
+ * const qualityEvaluator = createEvaluator(
64
64
  * ({ output }) => {
65
65
  * const score = calculateQuality(output);
66
66
  * return {
@@ -1,2 +1,4 @@
1
+ export * from "./asEvaluatorFn.js";
1
2
  export * from "./createEvaluator.js";
3
+ export * from "./toEvaluationResult.js";
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
@@ -1,2 +1,4 @@
1
+ export * from "./asEvaluatorFn.js";
1
2
  export * from "./createEvaluator.js";
3
+ export * from "./toEvaluationResult.js";
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}