Optional
criterionOptional
evaluationLLM Wrapper to use
Optional
llmKwargs to pass to LLM
Optional
memoryKey to use for output, defaults to text
Prompt object to use
Optional
skipReturn the string type key uniquely identifying this class of chain.
Evaluate Chain or LLM output, based on optional input and label.
Optional
config: 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.
Optional
config: anyEvaluate Chain or LLM output, based on optional input and label.
Optional
config: 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.
Optional
options: anyPromise that resolves with the output of the chain run.
Static
deserializeLoad a chain from a json-like object describing it.
Static
fromCreate a new instance of the CriteriaEvalChain.
Optional
criteria: CriteriaLikeOptional
chainOptions: Partial<Options to pass to the constructor of the LLMChain.
Static
lc_Static
resolveResolve the criteria to evaluate.
Optional
criteria: 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.
Static
resolveResolve the prompt to use for the evaluation.
Optional
prompt: any
The name of the evaluation.