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:31

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

_getPrompts(): object

Returns

object

evalTemplate()

evalTemplate: (__namedParameters) => string

Parameters

__namedParameters

__namedParameters.context: string

__namedParameters.query: string

Returns

string

refineTemplate()

refineTemplate: (__namedParameters) => string

Parameters

__namedParameters

__namedParameters.contextMsg: string

__namedParameters.existingAnswer: string

__namedParameters.query: string

Returns

string

Overrides

PromptMixin._getPrompts

Defined in

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


_updatePrompts()

_updatePrompts(prompts): void

Parameters

prompts

prompts.evalTemplate

prompts.refineTemplate

Returns

void

Overrides

PromptMixin._updatePrompts

Defined in

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


evaluate()

evaluate(__namedParameters): Promise<EvaluationResult>

Parameters

__namedParameters: EvaluatorParams

Returns

Promise<EvaluationResult>

Implementation of

BaseEvaluator.evaluate

Defined in

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


evaluateResponse()

evaluateResponse(__namedParameters): Promise<EvaluationResult>

Parameters

__namedParameters: EvaluatorResponseParams

Returns

Promise<EvaluationResult>

Implementation of

BaseEvaluator.evaluateResponse

Defined in

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


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