Class: RelevancyEvaluator
Hierarchy
-
↳
RelevancyEvaluator
Implements
BaseEvaluator
Constructors
constructor
• new RelevancyEvaluator(params?
): RelevancyEvaluator
Parameters
Name | Type |
---|---|
params? | RelevancyParams |
Returns
Overrides
Defined in
packages/core/src/evaluation/Relevancy.ts:31
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/Relevancy.ts:28
raiseError
• Private
raiseError: boolean
Defined in
packages/core/src/evaluation/Relevancy.ts:26
refineTemplate
• Private
refineTemplate: (__namedParameters
: { contextMsg
: string
; existingAnswer
: string
; query
: string
}) => string
Type declaration
▸ («destructured»
): string
Parameters
Name | Type |
---|---|
«destructured» | Object |
› contextMsg | string |
› existingAnswer | string |
› query | string |
Returns
string
Defined in
packages/core/src/evaluation/Relevancy.ts:29
serviceContext
• Private
Optional
serviceContext: ServiceContext
Defined in
packages/core/src/evaluation/Relevancy.ts:25
Methods
_getPromptModules
▸ _getPromptModules(): Record
<string
, any
>
Returns
Record
<string
, any
>
Inherited from
Defined in
packages/core/src/prompts/Mixin.ts:82
_getPrompts
▸ _getPrompts(): Object
Returns
Object
Name | Type |
---|---|
evalTemplate | (__namedParameters : { context : string ; query : string }) => string |
refineTemplate | (__namedParameters : { contextMsg : string ; existingAnswer : string ; query : string }) => string |
Overrides
Defined in
packages/core/src/evaluation/Relevancy.ts:41
_updatePrompts
▸ _updatePrompts(prompts
): void
Parameters
Name | Type |
---|---|
prompts | Object |
prompts.evalTemplate | (__namedParameters : { context : string ; query : string }) => string |
prompts.refineTemplate | (__namedParameters : { contextMsg : string ; existingAnswer : string ; query : string }) => string |