Skip to main content

Class: FaithfulnessEvaluator

Extends

Implements

  • BaseEvaluator

Constructors

new FaithfulnessEvaluator()

new FaithfulnessEvaluator(params?): FaithfulnessEvaluator

Parameters

params?

params.faithFulnessRefinePrompt?

params.faithfulnessSystemPrompt?

params.raiseError?: boolean

params.serviceContext?: ServiceContext

Returns

FaithfulnessEvaluator

Overrides

PromptMixin.constructor

Defined in

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

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(): object

Returns

object

Overrides

PromptMixin._getPrompts

Defined in

packages/llamaindex/src/evaluation/Faithfulness.ts:46


_updatePrompts()

protected _updatePrompts(promptsDict): void

Parameters

promptsDict

promptsDict.faithFulnessRefinePrompt

promptsDict.faithfulnessSystemPrompt

Returns

void

Overrides

PromptMixin._updatePrompts

Defined in

packages/llamaindex/src/evaluation/Faithfulness.ts:53


evaluate()

evaluate(__namedParameters): Promise<EvaluationResult>

Parameters

__namedParameters: EvaluatorParams

Returns

Promise<EvaluationResult>

Implementation of

BaseEvaluator.evaluate

Defined in

packages/llamaindex/src/evaluation/Faithfulness.ts:73


evaluateResponse()

evaluateResponse(__namedParameters): Promise<EvaluationResult>

Parameters

__namedParameters: EvaluatorResponseParams

Returns

Promise<EvaluationResult>

Implementation of

BaseEvaluator.evaluateResponse

Defined in

packages/llamaindex/src/evaluation/Faithfulness.ts:132


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