Skip to main content

Class: RelevancyEvaluator

Extends

Implements

  • BaseEvaluator

Constructors

new RelevancyEvaluator()

new RelevancyEvaluator(params?): RelevancyEvaluator

Parameters

params?: RelevancyParams

Returns

RelevancyEvaluator

Overrides

PromptMixin.constructor

Defined in

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

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/Relevancy.ts:42


_getPrompts()

_getPrompts(): object

Returns

object

evalTemplate

evalTemplate: RelevancyEvalPrompt

refineTemplate

refineTemplate: RelevancyRefinePrompt

Overrides

PromptMixin._getPrompts

Defined in

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


_updatePrompts()

_updatePrompts(prompts): void

Parameters

prompts

prompts.evalTemplate: RelevancyEvalPrompt

prompts.refineTemplate: RelevancyRefinePrompt

Returns

void

Overrides

PromptMixin._updatePrompts

Defined in

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


evaluate()

evaluate(__namedParameters): Promise<EvaluationResult>

Parameters

__namedParameters: EvaluatorParams

Returns

Promise<EvaluationResult>

Implementation of

BaseEvaluator.evaluate

Defined in

packages/llamaindex/src/evaluation/Relevancy.ts:65


evaluateResponse()

evaluateResponse(__namedParameters): Promise<EvaluationResult>

Parameters

__namedParameters: EvaluatorResponseParams

Returns

Promise<EvaluationResult>

Implementation of

BaseEvaluator.evaluateResponse

Defined in

packages/llamaindex/src/evaluation/Relevancy.ts:125


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