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
Overrides
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
Overrides
Defined in
packages/llamaindex/src/evaluation/Faithfulness.ts:46
_getPrompts()
protected
_getPrompts():object
Returns
object
Overrides
Defined in
packages/llamaindex/src/evaluation/Faithfulness.ts:50
_updatePrompts()
protected
_updatePrompts(promptsDict
):void
Parameters
• promptsDict
• promptsDict.faithFulnessRefinePrompt: FaithfulnessRefinePrompt
• promptsDict.faithfulnessSystemPrompt: FaithfulnessTextQAPrompt
Returns
void
Overrides
Defined in
packages/llamaindex/src/evaluation/Faithfulness.ts:57
evaluate()
evaluate(
__namedParameters
):Promise
<EvaluationResult
>
Parameters
• __namedParameters: EvaluatorParams
Returns
Promise
<EvaluationResult
>
Implementation of
BaseEvaluator.evaluate
Defined in
packages/llamaindex/src/evaluation/Faithfulness.ts:77
evaluateResponse()
evaluateResponse(
__namedParameters
):Promise
<EvaluationResult
>
Parameters
• __namedParameters: EvaluatorResponseParams
Returns
Promise
<EvaluationResult
>
Implementation of
BaseEvaluator.evaluateResponse
Defined in
packages/llamaindex/src/evaluation/Faithfulness.ts:137
getPrompts()
getPrompts():
PromptsRecord
Returns
Inherited from
Defined in
packages/core/prompts/dist/prompts/index.d.ts:58
updatePrompts()
updatePrompts(
prompts
):void
Parameters
• prompts: PromptsRecord
Returns
void
Inherited from
Defined in
packages/core/prompts/dist/prompts/index.d.ts:59
validatePrompts()
validatePrompts(
promptsDict
,moduleDict
):void
Parameters
• promptsDict: PromptsRecord
• moduleDict: ModuleRecord
Returns
void
Inherited from
Defined in
packages/core/prompts/dist/prompts/index.d.ts:57