@arizeai/phoenix-evals 2.1.0 → 2.2.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 (27) hide show
  1. package/dist/esm/__generated__/default_templates/HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.d.ts.map +1 -1
  2. package/dist/esm/__generated__/default_templates/HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.js +48 -17
  3. package/dist/esm/__generated__/default_templates/HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.js.map +1 -1
  4. package/dist/esm/llm/createHallucinationEvaluator.d.ts +36 -19
  5. package/dist/esm/llm/createHallucinationEvaluator.d.ts.map +1 -1
  6. package/dist/esm/llm/createHallucinationEvaluator.js +24 -18
  7. package/dist/esm/llm/createHallucinationEvaluator.js.map +1 -1
  8. package/dist/esm/llm/index.js +1 -1
  9. package/dist/esm/llm/index.js.map +1 -1
  10. package/dist/esm/template/getTemplateVariables.js.map +1 -1
  11. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  12. package/dist/src/__generated__/default_templates/HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.d.ts.map +1 -1
  13. package/dist/src/__generated__/default_templates/HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.js +48 -17
  14. package/dist/src/__generated__/default_templates/HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.js.map +1 -1
  15. package/dist/src/llm/createHallucinationEvaluator.d.ts +36 -19
  16. package/dist/src/llm/createHallucinationEvaluator.d.ts.map +1 -1
  17. package/dist/src/llm/createHallucinationEvaluator.js +24 -18
  18. package/dist/src/llm/createHallucinationEvaluator.js.map +1 -1
  19. package/dist/src/llm/index.js +1 -1
  20. package/dist/src/llm/index.js.map +1 -1
  21. package/dist/src/template/getTemplateVariables.js.map +1 -1
  22. package/dist/tsconfig.tsbuildinfo +1 -1
  23. package/package.json +6 -6
  24. package/src/__generated__/default_templates/HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.ts +48 -17
  25. package/src/llm/createHallucinationEvaluator.ts +36 -28
  26. package/src/llm/index.ts +1 -1
  27. package/src/template/getTemplateVariables.ts +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.d.ts","sourceRoot":"","sources":["../../../../src/__generated__/default_templates/HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAE9D,eAAO,MAAM,6CAA6C,EAAE,6BA4C3D,CAAC"}
1
+ {"version":3,"file":"HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.d.ts","sourceRoot":"","sources":["../../../../src/__generated__/default_templates/HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAE9D,eAAO,MAAM,6CAA6C,EAAE,6BA2E3D,CAAC"}
@@ -1,47 +1,78 @@
1
1
  // This file is generated. Do not edit by hand.
2
2
  export const HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG = {
3
3
  name: "hallucination",
4
- description: "A specialized evaluator for detecting hallucinations in grounded LLM responses.",
4
+ description: "Detect whether an assistant's response contains hallucinations — claims not supported by the input it came from (prior turns, tool calls and results, and any content read, retrieved, or provided).",
5
5
  optimizationDirection: "MINIMIZE",
6
6
  template: [
7
7
  {
8
8
  role: "user",
9
9
  content: `
10
- In this task, you will be presented with a query, some context and a response. The response is generated to the question based on the context. The response may contain false information. You must use the context to determine if the response to the question contains false information, if the response is hallucinated.
10
+ You are an expert evaluator labeling whether an assistant's response is grounded in the input it came from.
11
11
 
12
- Your objective is to determine whether the response text contains factual information and is factual relative to the context. An 'hallucinated' response refers to a response that is not based on the context or assumes information that is not available in the context.
12
+ The input is the complete record of what the assistant had available before it responded: the user's request, any earlier turns, any tool calls and the results they returned, and any content that was read, retrieved, or provided. It may appear as plain text, as structured data, or as a rendered transcript. Whatever form it takes, treat it as the full record of what the assistant knew and did, and as the only source of truth for claims about this situation. You are judging whether the response is GROUNDED in that record, not whether it is factually true about the world. The output is the response you are judging.
13
13
 
14
- Your response should be a single word: either 'factual' or 'hallucinated', and it should not include any other text or characters.
14
+ <rubric>
15
15
 
16
- 'hallucinated' indicates that the response provides factually inaccurate information to the query based on the context.
16
+ HALLUCINATED - The response contains at least one claim that the input does not support. This includes:
17
17
 
18
- 'factual' indicates that the response to the question is correct relative to the context, and does not contain made up information.
18
+ - Contradiction: the claim conflicts with something in the input.
19
+ - Invented specifics: names, numbers, prices, dates, quotes, identifiers, entities, or events that do not appear in the input and do not follow from it.
20
+ - Fabricated tool results: the response reports what a tool returned, but the input shows no such result — or shows a different one.
21
+ - Unsupported findings: the response presents findings, file contents, search results, sources, or a review of material that the input never shows being read, searched, or returned.
22
+ - Fabricated completed actions: the response states that an action has already been taken when the input shows no record of it happening.
23
+ - Misattribution: the response attributes a claim, source, or action to the input that never appears there.
19
24
 
20
- Please read the query and context carefully before determining your response.
25
+ GROUNDED - Every claim in the response is supported. The response:
26
+
27
+ - Restates or summarizes what is in the input, accurately.
28
+ - Draws conclusions that follow necessarily from the input.
29
+ - Uses only uncontroversial, widely-known general knowledge — common facts, definitions, arithmetic, units of time or measure — that does not contradict the input. This is the one kind of claim that need not appear in the input (see rule 4).
30
+ - Declines to answer, reports a failure, expresses uncertainty, or asks a clarifying question without asserting unsupported specifics.
31
+
32
+ </rubric>
33
+
34
+ Apply these rules when deciding:
35
+
36
+ 1. Absence of evidence is enough. You do not need to find a contradiction. If the response asserts situation-specific facts that simply do not appear anywhere in the input, that is a hallucination — however plausible, fluent, or well-organized the response is. A confident report is not evidence that the work behind it was done.
37
+
38
+ 2. Not everything in the input carries the same weight. User messages, tool results, and content that was read or provided are authoritative evidence. The assistant's own earlier statements are part of the record but are not independent evidence for a claim.
39
+
40
+ 3. A failed tool is not a source. An error, timeout, empty result, or "not found" is evidence that the lookup failed. It is not evidence about the thing being looked up. A response that supplies the missing value anyway is hallucinating.
41
+
42
+ 4. Apply the absence-of-evidence rule only to situation-specific claims. First distinguish claims about this particular situation — its entities, values, dates, events, sources, and what was returned or done — from ordinary general knowledge. Situation-specific claims must restate the input or follow from it necessarily; they are not supported if deriving them requires adding a typical value, default, cause, external lookup, or plausible completion. Ordinary general knowledge — definitions, arithmetic, common units and conventions, and widely known facts — is outside the grounding check and cannot by itself make a response hallucinated, as long as it does not contradict the input.
43
+
44
+ 5. One unsupported claim is enough. If any claim in the response fails these tests, the response is hallucinated. Quote the specific claim in your explanation.
45
+
46
+ Out of scope — do not label a response hallucinated for any of these:
47
+
48
+ - Being unhelpful, incomplete, poorly written, off-topic, or badly formatted.
49
+ - Failing to do everything the user asked. Whether the assistant covered the full request is separate from whether what it said is supported.
50
+ - Stating an intention to do something in the future. "I'll open a ticket" is a plan, not a claim about what happened. Only claims that an action is already complete are checkable here.
51
+ - Content the input shows was shortened or omitted. Do not treat the absence of a claim from an explicitly elided region as evidence that the claim was fabricated. If the omitted region could plausibly contain the missing support, default to grounded. Otherwise, judge the claim against the visible input normally.
52
+
53
+ When you are genuinely unsure whether a claim is supported, label the response grounded.
21
54
 
22
55
  <data>
23
56
 
24
- <query>
57
+ <input>
25
58
  {{input}}
26
- </query>
27
-
28
- <context>
29
- {{context}}
30
- </context>
59
+ </input>
31
60
 
32
- <response>
61
+ <output>
33
62
  {{output}}
34
- </response>
63
+ </output>
35
64
 
36
65
  </data>
37
66
 
38
- Is the response above factual or hallucinated based on the query and context?
67
+ Work through the claims in the output one at a time, checking each against the input, before you decide.
68
+
69
+ Is the output above grounded or hallucinated?
39
70
  `,
40
71
  },
41
72
  ],
42
73
  choices: {
43
74
  "hallucinated": 1,
44
- "factual": 0
75
+ "grounded": 0
45
76
  },
46
77
  };
47
78
  //# sourceMappingURL=HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.js","sourceRoot":"","sources":["../../../../src/__generated__/default_templates/HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAI/C,MAAM,CAAC,MAAM,6CAA6C,GAAkC;IAC1F,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,iFAAiF;IAC9F,qBAAqB,EAAE,UAAU;IACjC,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8Bd;SACI;KACF;IACD,OAAO,EAAE;QACT,cAAc,EAAE,CAAC;QACjB,SAAS,EAAE,CAAC;KACb;CACA,CAAC"}
1
+ {"version":3,"file":"HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.js","sourceRoot":"","sources":["../../../../src/__generated__/default_templates/HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAI/C,MAAM,CAAC,MAAM,6CAA6C,GAAkC;IAC1F,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,sMAAsM;IACnN,qBAAqB,EAAE,UAAU;IACjC,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Dd;SACI;KACF;IACD,OAAO,EAAE;QACT,cAAc,EAAE,CAAC;QACjB,UAAU,EAAE,CAAC;KACd;CACA,CAAC"}
@@ -1,9 +1,3 @@
1
- /**
2
- * @deprecated This evaluator is maintained for backwards compatibility.
3
- * Please use createFaithfulnessEvaluator instead, which uses updated terminology:
4
- * - 'faithful'/'unfaithful' labels instead of 'factual'/'hallucinated'
5
- * - Maximizes score (1.0=faithful) instead of minimizing it
6
- */
7
1
  import type { CreateClassificationEvaluatorArgs } from "../types/evals.js";
8
2
  import type { ClassificationEvaluator } from "./ClassificationEvaluator.js";
9
3
  export interface HallucinationEvaluatorArgs<RecordType extends Record<string, unknown> = HallucinationEvaluationRecord> extends Omit<CreateClassificationEvaluatorArgs<RecordType>, "promptTemplate" | "choices" | "optimizationDirection" | "name"> {
@@ -12,25 +6,48 @@ export interface HallucinationEvaluatorArgs<RecordType extends Record<string, un
12
6
  choices?: CreateClassificationEvaluatorArgs<RecordType>["choices"];
13
7
  promptTemplate?: CreateClassificationEvaluatorArgs<RecordType>["promptTemplate"];
14
8
  }
15
- /**
16
- * A record to be evaluated by the hallucination evaluator.
17
- */
18
- export type HallucinationEvaluationRecord = {
9
+ /** A conversation and the assistant response to evaluate for hallucination. */
10
+ export interface HallucinationEvaluationRecord {
11
+ /**
12
+ * The full conversation history the assistant had access to (prior turns,
13
+ * tool calls, and tool results); its last message is the user turn being
14
+ * answered. Treated as the source of truth.
15
+ */
19
16
  input: string;
17
+ /**
18
+ * The assistant's latest response to classify.
19
+ */
20
20
  output: string;
21
- context?: string;
22
- };
21
+ [key: string]: unknown;
22
+ }
23
23
  /**
24
- * @deprecated Use createFaithfulnessEvaluator instead.
25
- *
26
- * Creates a function that evaluates whether an answer is factual or hallucinated based on a query and reference text.
24
+ * Creates a hallucination evaluator function.
27
25
  *
28
- * Note: This is deprecated. Please use createFaithfulnessEvaluator which:
29
- * - Uses 'faithful'/'unfaithful' labels instead of 'factual'/'hallucinated'
30
- * - Maximizes the score (1.0 for faithful, 0.0 for unfaithful)
26
+ * This function returns an evaluator that detects whether an assistant's latest
27
+ * response contains claims that are not grounded in — unsupported by, or
28
+ * contradicting — the conversation. Unlike the faithfulness evaluator, which
29
+ * grounds a response against a specific provided context (e.g. retrieved
30
+ * documents), this grounds it against the conversation itself.
31
31
  *
32
32
  * @param args - The arguments for creating the hallucination evaluator.
33
- * @returns A function that evaluates whether an answer is factual or hallucinated based on a query and reference text.
33
+ * @param args.model - The model to use for classification.
34
+ * @param args.choices - The possible classification choices (defaults to hallucinated/grounded).
35
+ * @param args.promptTemplate - The prompt template to use (defaults to HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.template).
36
+ * @param args.telemetry - The telemetry to use for the evaluator.
37
+ *
38
+ * @returns An evaluator function that takes a {@link HallucinationEvaluationRecord} and returns a classification result
39
+ * indicating whether the response is grounded or hallucinated relative to the conversation.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * const evaluator = createHallucinationEvaluator({ model: openai("gpt-4o-mini") });
44
+ * const result = await evaluator.evaluate({
45
+ * input:
46
+ * "User: What's our refund window?\nTool (lookup_policy): Refunds: 30 days from delivery.\nAssistant: 30 days from delivery.\nUser: And for electronics?",
47
+ * output: "Electronics can be returned within 90 days.",
48
+ * });
49
+ * console.log(result.label); // "hallucinated"
50
+ * ```
34
51
  */
35
52
  export declare function createHallucinationEvaluator<RecordType extends Record<string, unknown> = HallucinationEvaluationRecord>(args: HallucinationEvaluatorArgs<RecordType>): ClassificationEvaluator<RecordType>;
36
53
  //# sourceMappingURL=createHallucinationEvaluator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createHallucinationEvaluator.d.ts","sourceRoot":"","sources":["../../../src/llm/createHallucinationEvaluator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGzE,MAAM,WAAW,0BAA0B,CACzC,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,6BAA6B,CAC1E,SAAQ,IAAI,CACZ,iCAAiC,CAAC,UAAU,CAAC,EAC7C,gBAAgB,GAAG,SAAS,GAAG,uBAAuB,GAAG,MAAM,CAChE;IACC,qBAAqB,CAAC,EAAE,iCAAiC,CAAC,UAAU,CAAC,CAAC,uBAAuB,CAAC,CAAC;IAC/F,IAAI,CAAC,E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,CAAC,EAAE,iCAAiC,CAAC,UAAU,CAAC,CAAC,gBAAgB,CAAC,CAAC;CAClF;AAED,+EAA+E;AAC/E,MAAM,WAAW,6BAA6B;IAC5C;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,6BAA6B,EAE1E,IAAI,EAAE,0BAA0B,CAAC,UAAU,CAAC,GAC3C,uBAAuB,CAAC,UAAU,CAAC,CAerC"}
@@ -1,29 +1,35 @@
1
- /**
2
- * @deprecated This evaluator is maintained for backwards compatibility.
3
- * Please use createFaithfulnessEvaluator instead, which uses updated terminology:
4
- * - 'faithful'/'unfaithful' labels instead of 'factual'/'hallucinated'
5
- * - Maximizes score (1.0=faithful) instead of minimizing it
6
- */
7
1
  import { HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG } from "../__generated__/default_templates/index.js";
8
2
  import { createClassificationEvaluator } from "./createClassificationEvaluator.js";
9
3
  /**
10
- * @deprecated Use createFaithfulnessEvaluator instead.
11
- *
12
- * Creates a function that evaluates whether an answer is factual or hallucinated based on a query and reference text.
4
+ * Creates a hallucination evaluator function.
13
5
  *
14
- * Note: This is deprecated. Please use createFaithfulnessEvaluator which:
15
- * - Uses 'faithful'/'unfaithful' labels instead of 'factual'/'hallucinated'
16
- * - Maximizes the score (1.0 for faithful, 0.0 for unfaithful)
6
+ * This function returns an evaluator that detects whether an assistant's latest
7
+ * response contains claims that are not grounded in — unsupported by, or
8
+ * contradicting — the conversation. Unlike the faithfulness evaluator, which
9
+ * grounds a response against a specific provided context (e.g. retrieved
10
+ * documents), this grounds it against the conversation itself.
17
11
  *
18
12
  * @param args - The arguments for creating the hallucination evaluator.
19
- * @returns A function that evaluates whether an answer is factual or hallucinated based on a query and reference text.
13
+ * @param args.model - The model to use for classification.
14
+ * @param args.choices - The possible classification choices (defaults to hallucinated/grounded).
15
+ * @param args.promptTemplate - The prompt template to use (defaults to HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.template).
16
+ * @param args.telemetry - The telemetry to use for the evaluator.
17
+ *
18
+ * @returns An evaluator function that takes a {@link HallucinationEvaluationRecord} and returns a classification result
19
+ * indicating whether the response is grounded or hallucinated relative to the conversation.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * const evaluator = createHallucinationEvaluator({ model: openai("gpt-4o-mini") });
24
+ * const result = await evaluator.evaluate({
25
+ * input:
26
+ * "User: What's our refund window?\nTool (lookup_policy): Refunds: 30 days from delivery.\nAssistant: 30 days from delivery.\nUser: And for electronics?",
27
+ * output: "Electronics can be returned within 90 days.",
28
+ * });
29
+ * console.log(result.label); // "hallucinated"
30
+ * ```
20
31
  */
21
32
  export function createHallucinationEvaluator(args) {
22
- // eslint-disable-next-line no-console
23
- console.warn("createHallucinationEvaluator is deprecated and will be removed in a future version. " +
24
- "Please use createFaithfulnessEvaluator instead. The new evaluator uses " +
25
- "'faithful'/'unfaithful' labels and maximizes score (1.0=faithful) instead of " +
26
- "minimizing it (0.0=factual).");
27
33
  const { choices = HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.choices, promptTemplate = HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.template, optimizationDirection = HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.optimizationDirection, name = HALLUCINATION_CLASSIFICATION_EVALUATOR_CONFIG.name, ...rest } = args;
28
34
  return createClassificationEvaluator({
29
35
  ...rest,
@@ -1 +1 @@
1
- {"version":3,"file":"createHallucinationEvaluator.js","sourceRoot":"","sources":["../../../src/llm/createHallucinationEvaluator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,6CAA6C,EAAE,MAAM,oCAAoC,CAAC;AAGnG,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAuBhF;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,4BAA4B,CAG1C,IAA4C;IAE5C,sCAAsC;IACtC,OAAO,CAAC,IAAI,CACV,sFAAsF;QACpF,yEAAyE;QACzE,+EAA+E;QAC/E,8BAA8B,CACjC,CAAC;IAEF,MAAM,EACJ,OAAO,GAAG,6CAA6C,CAAC,OAAO,EAC/D,cAAc,GAAG,6CAA6C,CAAC,QAAQ,EACvE,qBAAqB,GAAG,6CAA6C,CAAC,qBAAqB,EAC3F,IAAI,GAAG,6CAA6C,CAAC,IAAI,EACzD,GAAG,IAAI,EACR,GAAG,IAAI,CAAC;IACT,OAAO,6BAA6B,CAAa;QAC/C,GAAG,IAAI;QACP,cAAc;QACd,OAAO;QACP,qBAAqB;QACrB,IAAI;KACL,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"createHallucinationEvaluator.js","sourceRoot":"","sources":["../../../src/llm/createHallucinationEvaluator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6CAA6C,EAAE,MAAM,oCAAoC,CAAC;AAGnG,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AA6BhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,4BAA4B,CAG1C,IAA4C;IAE5C,MAAM,EACJ,OAAO,GAAG,6CAA6C,CAAC,OAAO,EAC/D,cAAc,GAAG,6CAA6C,CAAC,QAAQ,EACvE,qBAAqB,GAAG,6CAA6C,CAAC,qBAAqB,EAC3F,IAAI,GAAG,6CAA6C,CAAC,IAAI,EACzD,GAAG,IAAI,EACR,GAAG,IAAI,CAAC;IACT,OAAO,6BAA6B,CAAa;QAC/C,GAAG,IAAI;QACP,cAAc;QACd,OAAO;QACP,qBAAqB;QACrB,IAAI;KACL,CAAC,CAAC;AACL,CAAC"}
@@ -5,7 +5,7 @@ export * from "./createConcisenessEvaluator.js";
5
5
  export * from "./createCorrectnessEvaluator.js";
6
6
  export * from "./createDocumentRelevanceEvaluator.js";
7
7
  export * from "./createFaithfulnessEvaluator.js";
8
- export * from "./createHallucinationEvaluator.js"; // Deprecated: use createFaithfulnessEvaluator
8
+ export * from "./createHallucinationEvaluator.js";
9
9
  export * from "./createRefusalEvaluator.js";
10
10
  export * from "./createToolInvocationEvaluator.js";
11
11
  export * from "./createToolResponseHandlingEvaluator.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/llm/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC,CAAC,8CAA8C;AAC9F,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/llm/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAA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