Member Junction
    Preparing search index...

    Interface RubricEvaluationStore

    Persistence the engine needs. Tests pass fakes. Production wraps the entity server. submit must call the entity server's submit, which calls RubricScoring.

    interface RubricEvaluationStore {
        createDraft(
            input: {
                aiAgentRunId?: string;
                aiPromptRunId?: string;
                contextEntityId?: string;
                contextRecordId?: string;
                evaluatorName?: string;
                evaluatorType:
                    | "AIPrompt"
                    | "Agent"
                    | "Deterministic"
                    | "External"
                    | "Human"
                    | "Self";
                metadata?: unknown;
                passThreshold?: number;
                rubricId: string;
                subjectEntityId: string;
                subjectRecordId: string;
                versionId: string;
            },
        ): Promise<RubricEvaluationRecord>;
        fail(
            evaluationId: string,
            errorMessage: string,
        ): Promise<RubricEvaluationRecord>;
        submit(
            evaluationId: string,
            answers: RubricAnswer[],
        ): Promise<RubricScoreResult>;
    }
    Index

    Methods

    • Parameters

      • input: {
            aiAgentRunId?: string;
            aiPromptRunId?: string;
            contextEntityId?: string;
            contextRecordId?: string;
            evaluatorName?: string;
            evaluatorType:
                | "AIPrompt"
                | "Agent"
                | "Deterministic"
                | "External"
                | "Human"
                | "Self";
            metadata?: unknown;
            passThreshold?: number;
            rubricId: string;
            subjectEntityId: string;
            subjectRecordId: string;
            versionId: string;
        }
        • OptionalaiAgentRunId?: string

          The agent run that produced the evaluation.

        • OptionalaiPromptRunId?: string

          The prompt run that produced the evaluation.

        • OptionalcontextEntityId?: string
        • OptionalcontextRecordId?: string
        • OptionalevaluatorName?: string
        • evaluatorType: "AIPrompt" | "Agent" | "Deterministic" | "External" | "Human" | "Self"

          The evaluator's EvaluatorType, stored as RubricEvaluation.EvaluatorType.

        • Optionalmetadata?: unknown
        • OptionalpassThreshold?: number
        • rubricId: string
        • subjectEntityId: string
        • subjectRecordId: string
        • versionId: string

      Returns Promise<RubricEvaluationRecord>