Skip to main content

Class: CorrectnessEvaluator

Correctness Evaluator

Extends

Implements

  • BaseEvaluator

Constructors

new CorrectnessEvaluator()

new CorrectnessEvaluator(params?): CorrectnessEvaluator

Parameters

params?: CorrectnessParams

Returns

CorrectnessEvaluator

Overrides

PromptMixin.constructor

Defined in

packages/llamaindex/src/evaluation/Correctness.ts:35

Methods

_getPromptModules()

protected _getPromptModules(): Record<string, any>

Returns

Record<string, any>

Inherited from

PromptMixin._getPromptModules

Defined in

packages/llamaindex/src/prompts/Mixin.ts:83


_getPrompts()

protected _getPrompts(): PromptsDict

Returns

PromptsDict

Inherited from

PromptMixin._getPrompts

Defined in

packages/llamaindex/src/prompts/Mixin.ts:79


_updatePrompts()

_updatePrompts(prompts): void

Parameters

prompts

prompts.correctnessPrompt

Returns

void

Overrides

PromptMixin._updatePrompts

Defined in

packages/llamaindex/src/evaluation/Correctness.ts:44


evaluate()

evaluate(__namedParameters): Promise<EvaluationResult>

Parameters

__namedParameters: EvaluatorParams

Returns

Promise<EvaluationResult>

Implementation of

BaseEvaluator.evaluate

Defined in

packages/llamaindex/src/evaluation/Correctness.ts:59


evaluateResponse()

evaluateResponse(__namedParameters): Promise<EvaluationResult>

Parameters

__namedParameters: EvaluatorResponseParams

Returns

Promise<EvaluationResult>

Implementation of

BaseEvaluator.evaluateResponse

Defined in

packages/llamaindex/src/evaluation/Correctness.ts:105


getPrompts()

getPrompts(): PromptsDict

Returns all prompts from the mixin and its modules

Returns

PromptsDict

Inherited from

PromptMixin.getPrompts

Defined in

packages/llamaindex/src/prompts/Mixin.ts:27


updatePrompts()

updatePrompts(promptsDict): void

Updates the prompts in the mixin and its modules

Parameters

promptsDict: PromptsDict

Returns

void

Inherited from

PromptMixin.updatePrompts

Defined in

packages/llamaindex/src/prompts/Mixin.ts:48


validatePrompts()

validatePrompts(promptsDict, moduleDict): void

Validates the prompt keys and module keys

Parameters

promptsDict: PromptsDict

moduleDict: ModuleDict

Returns

void

Inherited from

PromptMixin.validatePrompts

Defined in

packages/llamaindex/src/prompts/Mixin.ts:10