OptionalcriterionOptionalevaluationLLM Wrapper to use
OptionalllmKwargs to pass to LLM
OptionalmemoryKey to use for output, defaults to text
Prompt object to use
OptionalskipReturn the string type key uniquely identifying this class of chain.
Evaluate Chain or LLM output, based on optional input and label.
Optionalconfig: anyThe evaluation results containing the score or value. It is recommended that the dictionary contain the following keys:
Protected_Prepare the output of the evaluation.
Run the core logic of this chain and add to output if desired.
Wraps _call and handles memory.
Optionalconfig: anyEvaluate Chain or LLM output, based on optional input and label.
Optionalconfig: anyThe evaluation results containing the score or value. It is recommended that the dictionary contain the following keys:
Invoke the chain with the provided input and returns the output.
Input values for the chain run.
Optionaloptions: anyPromise that resolves with the output of the chain run.
StaticdeserializeLoad a chain from a json-like object describing it.
StaticfromCreate a new instance of the CriteriaEvalChain.
Optionalcriteria: CriteriaLikeOptionalchainOptions: Partial<Options to pass to the constructor of the LLMChain.
Staticlc_StaticresolveResolve the criteria to evaluate.
Optionalcriteria: CriteriaLikeThe criteria to evaluate the runs against. It can be:
- a mapping of a criterion name to its description
- a single criterion name present in one of the default criteria
- a single ConstitutionalPrinciple instance
A dictionary mapping criterion names to descriptions.
StaticresolveResolve the prompt to use for the evaluation.
Optionalprompt: any
The name of the evaluation.