Class: FaithfulnessEvaluator
Hierarchy
-
↳
FaithfulnessEvaluator
Implements
BaseEvaluator
Constructors
constructor
• new FaithfulnessEvaluator(params?
): FaithfulnessEvaluator
Parameters
Name | Type |
---|---|
params? | Object |
params.faithFulnessRefinePrompt? | (__namedParameters : { context : string ; existingAnswer : string ; query : string }) => string |
params.faithfulnessSystemPrompt? | (__namedParameters : { context : string ; query : string }) => string |
params.raiseError? | boolean |
params.serviceContext? | ServiceContext |
Returns
Overrides
Defined in
packages/core/src/evaluation/Faithfulness.ts:29
Properties
evalTemplate
• Private
evalTemplate: (__namedParameters
: { context
: string
; query
: string
}) => string
Type declaration
▸ («destructured»
): string
Parameters
Name | Type |
---|---|
«destructured» | Object |
› context | string |
› query | string |
Returns
string
Defined in
packages/core/src/evaluation/Faithfulness.ts:26
raiseError
• Private
raiseError: boolean
Defined in
packages/core/src/evaluation/Faithfulness.ts:25
refineTemplate
• Private
refineTemplate: (__namedParameters
: { context
: string
; existingAnswer
: string
; query
: string
}) => string
Type declaration
▸ («destructured»
): string
Parameters
Name | Type |
---|---|
«destructured» | Object |
› context | string |
› existingAnswer | string |
› query | string |
Returns
string
Defined in
packages/core/src/evaluation/Faithfulness.ts:27
serviceContext
• Private
Optional
serviceContext: ServiceContext