Skip to main content

Class: FaithfulnessEvaluator

Extends

Implements

  • BaseEvaluator

Constructors

new FaithfulnessEvaluator()

new FaithfulnessEvaluator(params?): FaithfulnessEvaluator

Parameters

params?

params.faithFulnessRefinePrompt?: FaithfulnessRefinePrompt

params.faithfulnessSystemPrompt?: FaithfulnessTextQAPrompt

params.raiseError?: boolean

params.serviceContext?: ServiceContext

Returns

FaithfulnessEvaluator

Overrides

PromptMixin.constructor

Defined in

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

Methods

_getPromptModules()

protected _getPromptModules(): ModuleRecord

Return a dictionary of sub-modules within the current module that also implement PromptMixin (so that their prompts can also be get/set).

Can be blank if no sub-modules.

Returns

ModuleRecord

Overrides

PromptMixin._getPromptModules

Defined in

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


_getPrompts()

protected _getPrompts(): object

Returns

object

Overrides

PromptMixin._getPrompts

Defined in

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


_updatePrompts()

protected _updatePrompts(promptsDict): void

Parameters

promptsDict

promptsDict.faithFulnessRefinePrompt: FaithfulnessRefinePrompt

promptsDict.faithfulnessSystemPrompt: FaithfulnessTextQAPrompt

Returns

void

Overrides

PromptMixin._updatePrompts

Defined in

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


evaluate()

evaluate(__namedParameters): Promise<EvaluationResult>

Parameters

__namedParameters: EvaluatorParams

Returns

Promise<EvaluationResult>

Implementation of

BaseEvaluator.evaluate

Defined in

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


evaluateResponse()

evaluateResponse(__namedParameters): Promise<EvaluationResult>

Parameters

__namedParameters: EvaluatorResponseParams

Returns

Promise<EvaluationResult>

Implementation of

BaseEvaluator.evaluateResponse

Defined in

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


getPrompts()

getPrompts(): PromptsRecord

Returns

PromptsRecord

Inherited from

PromptMixin.getPrompts

Defined in

packages/core/prompts/dist/index.d.ts:66


updatePrompts()

updatePrompts(prompts): void

Parameters

prompts: PromptsRecord

Returns

void

Inherited from

PromptMixin.updatePrompts

Defined in

packages/core/prompts/dist/index.d.ts:67


validatePrompts()

validatePrompts(promptsDict, moduleDict): void

Parameters

promptsDict: PromptsRecord

moduleDict: ModuleRecord

Returns

void

Inherited from

PromptMixin.validatePrompts

Defined in

packages/core/prompts/dist/index.d.ts:65