Criteria: {
    agentTools?: undefined | StructuredToolInterface<ZodObjectAny>[];
    chainOptions?: undefined | Partial<Omit<LLMEvalChainInput<EvalOutputType, BaseLanguageModelInterface<any, BaseLanguageModelCallOptions>>, "llm">>;
    criteria?: undefined | (CriteriaLike & (Record<string, string> | Criteria));
    distanceMetric?: undefined | EmbeddingDistanceType;
    embedding?: undefined | EmbeddingsInterface;
    evaluatorType: "criteria";
    feedbackKey: undefined | string;
    formatEvaluatorInputs: EvaluatorInputFormatter;
    llm?: undefined | BaseLanguageModelInterface<any, BaseLanguageModelCallOptions> & BaseLanguageModel<any, BaseLanguageModelCallOptions>;
}

Configuration to load a "CriteriaEvalChain" evaluator, which prompts an LLM to determine whether the model's prediction complies with the provided criteria.

Type declaration

  • OptionalagentTools?: undefined | StructuredToolInterface<ZodObjectAny>[]

    A list of tools available to the agent, for TrajectoryEvalChain.

  • OptionalchainOptions?: undefined | Partial<Omit<LLMEvalChainInput<EvalOutputType, BaseLanguageModelInterface<any, BaseLanguageModelCallOptions>>, "llm">>
  • Optionalcriteria?: undefined | (CriteriaLike & (Record<string, string> | Criteria))

    The criteria to use for the evaluator.

  • OptionaldistanceMetric?: undefined | EmbeddingDistanceType

    The distance metric to use for comparing the embeddings.

  • Optionalembedding?: undefined | EmbeddingsInterface

    The embedding objects to vectorize the outputs.

  • evaluatorType: "criteria"
  • feedbackKey: undefined | string
  • formatEvaluatorInputs: EvaluatorInputFormatter
  • Optionalllm?: undefined | BaseLanguageModelInterface<any, BaseLanguageModelCallOptions> & BaseLanguageModel<any, BaseLanguageModelCallOptions>

The criteria to use for the evaluator.

The language model to use for the evaluator.

The configuration for the evaluator.

const evalConfig = {
evaluators: [Criteria("helpfulness")],
};
@example
```ts
const evalConfig = {
evaluators: [
Criteria({
"isCompliant": "Does the submission comply with the requirements of XYZ"
})
],
const evalConfig = {
evaluators: [{
evaluatorType: "criteria",
criteria: "helpfulness"
formatEvaluatorInputs: ...
}]
};
const evalConfig = {
evaluators: [{
evaluatorType: "criteria",
criteria: { "isCompliant": "Does the submission comply with the requirements of XYZ" },
formatEvaluatorInputs: ...
}]