All files / api/src/connectors/evaluations/knowledge-retention knowledge-retention.ts

100% Statements 16/16
100% Branches 1/1
100% Functions 1/1
100% Lines 16/16

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 281x         1x       1x     1x 1x 1x 1x 1x 1x     1x 1x 1x 1x 1x 1x 1x  
import {
  KnowledgeRetentionEvaluationAIParameters,
  KnowledgeRetentionEvaluationParameters,
} from '@api/connectors/evaluations/knowledge-retention/types';
import type { EvaluationMethodConnector } from '@api/types/connector';
import {
  type EvaluationMethodDetails,
  EvaluationMethodName,
} from '@shared/types/evaluations';
import { evaluateLog } from './service/evaluate';
 
// Simplified method configuration constant - only essential fields for standardization
const knowledgeRetentionMethodConfig: EvaluationMethodDetails = {
  method: EvaluationMethodName.KNOWLEDGE_RETENTION,
  name: 'Knowledge Retention',
  description:
    'Evaluates how well an AI system retains and recalls information from provided context',
} as const;
 
// Evaluation connector constant
export const knowledgeRetentionEvaluationConnector: EvaluationMethodConnector =
  {
    getDetails: () => knowledgeRetentionMethodConfig,
    evaluateLog,
    getParameterSchema: KnowledgeRetentionEvaluationParameters,
    getAIParameterSchema: KnowledgeRetentionEvaluationAIParameters,
  };