Aller au contenu principal

Class: CorrectnessEvaluator

Correctness Evaluator

Extends

Implements

  • BaseEvaluator

Constructors

new CorrectnessEvaluator()

new CorrectnessEvaluator(params?): CorrectnessEvaluator

Parameters

params?: CorrectnessParams

Returns

CorrectnessEvaluator

Overrides

PromptMixin . constructor

Source

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

Properties

correctnessPrompt()

private correctnessPrompt: () => string = defaultCorrectnessSystemPrompt

Returns

string

Source

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


llm

private llm: LLM<object, object>

Source

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


parserFunction()

private parserFunction: (str) => [number, string]

Parameters

str: string

Returns

[number, string]

Source

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


scoreThreshold

private scoreThreshold: number

Source

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

Methods

_getPromptModules()

protected _getPromptModules(): Record<string, any>

Returns

Record<string, any>

Inherited from

PromptMixin . _getPromptModules

Source

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


_getPrompts()

protected _getPrompts(): PromptsDict

Returns

PromptsDict

Inherited from

PromptMixin . _getPrompts

Source

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


_updatePrompts()

_updatePrompts(prompts): void

Parameters

prompts

prompts.correctnessPrompt

Returns

void

Overrides

PromptMixin . _updatePrompts

Source

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


evaluate()

evaluate(__namedParameters): Promise<EvaluationResult>

Parameters

__namedParameters: EvaluatorParams

Returns

Promise<EvaluationResult>

Implementation of

BaseEvaluator.evaluate

Source

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


evaluateResponse()

evaluateResponse(__namedParameters): Promise<EvaluationResult>

Parameters

__namedParameters: EvaluatorResponseParams

Returns

Promise<EvaluationResult>

Implementation of

BaseEvaluator.evaluateResponse

Source

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

Source

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

Source

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

Source

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