Class: CorrectnessEvaluator
Correctness Evaluator
Hierarchy
-
↳
CorrectnessEvaluator
Implements
BaseEvaluator
Constructors
constructor
• new CorrectnessEvaluator(params?
): CorrectnessEvaluator
Parameters
Name | Type |
---|---|
params? | CorrectnessParams |
Returns
Overrides
Defined in
packages/core/src/evaluation/Correctness.ts:34
Properties
correctnessPrompt
• Private
correctnessPrompt: () => string
= defaultCorrectnessSystemPrompt
Type declaration
▸ (): string
Returns
string
Defined in
packages/core/src/evaluation/Correctness.ts:31
llm
• Private
llm: LLM
Defined in
packages/core/src/evaluation/Correctness.ts:29
parserFunction
• Private
parserFunction: (str
: string
) => [number
, string
]
Type declaration
▸ (str
): [number
, string
]
Parameters
Name | Type |
---|---|
str | string |
Returns
[number
, string
]
Defined in
packages/core/src/evaluation/Correctness.ts:28
scoreThreshold
• Private
scoreThreshold: number
Defined in
packages/core/src/evaluation/Correctness.ts:27
Methods
_getPromptModules
▸ _getPromptModules(): Record
<string
, any
>
Returns
Record
<string
, any
>
Inherited from
Defined in
packages/core/src/prompts/Mixin.ts:82
_getPrompts
▸ _getPrompts(): PromptsDict
Returns
PromptsDict
Inherited from
Defined in
packages/core/src/prompts/Mixin.ts:78
_updatePrompts
▸ _updatePrompts(prompts
): void
Parameters
Name | Type |
---|---|
prompts | Object |
prompts.correctnessPrompt | () => string |
Returns
void
Overrides
Defined in
packages/core/src/evaluation/Correctness.ts:43
evaluate
▸ evaluate(«destructured»
): Promise
<EvaluationResult
>
Parameters
Name | Type |
---|---|
«destructured» | EvaluatorParams |
Returns
Promise
<EvaluationResult
>
Implementation of
BaseEvaluator.evaluate
Defined in
packages/core/src/evaluation/Correctness.ts:58
evaluateResponse
▸ evaluateResponse(«destructured»
): Promise
<EvaluationResult
>
Parameters
Name | Type |
---|---|
«destructured» | EvaluatorResponseParams |
Returns
Promise
<EvaluationResult
>
Implementation of
BaseEvaluator.evaluateResponse
Defined in
packages/core/src/evaluation/Correctness.ts:104
getPrompts
▸ getPrompts(): PromptsDict
Returns all prompts from the mixin and its modules
Returns
PromptsDict
Inherited from
Defined in
packages/core/src/prompts/Mixin.ts:27