UNPKG

@arizeai/phoenix-evals

Version:
50 lines (39 loc) 1.88 kB
"use strict"; // This file is generated. Do not edit by hand. Object.defineProperty(exports, "__esModule", { value: true }); exports.FAITHFULNESS_CLASSIFICATION_EVALUATOR_CONFIG = void 0; exports.FAITHFULNESS_CLASSIFICATION_EVALUATOR_CONFIG = { name: "faithfulness", description: "For determining if a response is faithful to the context.", optimizationDirection: "MAXIMIZE", template: [ { role: "user", content: ` 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 unfaithful to the facts. Your objective is to determine whether the response text contains factual information and is faithful to the context. An 'unfaithful' response refers to a response that is not based on the context or assumes information that is not available in the context. Your response should be a single word: either 'faithful' or 'unfaithful', and it should not include any other text or characters. 'unfaithful' indicates that the response provides factually inaccurate information to the query based on the context. 'faithful' indicates that the response to the question is correct relative to the context, and does not contain made up information. Please read the query and context carefully before determining your response. <data> <query> {{input}} </query> <context> {{context}} </context> <response> {{output}} </response> </data> Is the response above faithful or unfaithful based on the query and context? `, }, ], choices: { "faithful": 1, "unfaithful": 0 }, }; //# sourceMappingURL=FAITHFULNESS_CLASSIFICATION_EVALUATOR_CONFIG.js.map