rageval - v0.1.1
    Preparing search index...

    Variable ragevalMatchersConst

    ragevalMatchers: {
        toHaveScoreAbove: (
            this: { isNot: boolean },
            received: {
                scores: {
                    faithfulness?: number;
                    contextRelevance?: number;
                    answerRelevance?: number;
                    contextRecall?: number;
                    contextPrecision?: number;
                    overall: number;
                    [key: string]: unknown;
                };
                samples: {
                    id?: string;
                    question: string;
                    scores: Record<string, number>;
                    reasoning?: Record<string, string>;
                    tenantId?: string;
                    metadata?: Record<string, unknown>;
                }[];
                stats?: Record<
                    string,
                    {
                        mean: number;
                        min: number;
                        max: number;
                        stddev: number;
                        count: number;
                    },
                >;
                meta: {
                    totalSamples: number;
                    metrics: string[];
                    provider: string;
                    model: string;
                    startedAt: string;
                    completedAt: string;
                    durationMs: number;
                };
            },
            metric: string,
            minScore: number,
        ) => MatcherResult;
        toPassThresholds: (
            this: { isNot: boolean },
            received: {
                scores: {
                    faithfulness?: number;
                    contextRelevance?: number;
                    answerRelevance?: number;
                    contextRecall?: number;
                    contextPrecision?: number;
                    overall: number;
                    [key: string]: unknown;
                };
                samples: {
                    id?: string;
                    question: string;
                    scores: Record<string, number>;
                    reasoning?: Record<string, string>;
                    tenantId?: string;
                    metadata?: Record<string, unknown>;
                }[];
                stats?: Record<
                    string,
                    {
                        mean: number;
                        min: number;
                        max: number;
                        stddev: number;
                        count: number;
                    },
                >;
                meta: {
                    totalSamples: number;
                    metrics: string[];
                    provider: string;
                    model: string;
                    startedAt: string;
                    completedAt: string;
                    durationMs: number;
                };
            },
            thresholds: Partial<Record<string, number>>,
        ) => MatcherResult;
    } = ...

    All rageval matchers — pass this object to expect.extend().

    Type Declaration

    • toHaveScoreAbove: (
          this: { isNot: boolean },
          received: {
              scores: {
                  faithfulness?: number;
                  contextRelevance?: number;
                  answerRelevance?: number;
                  contextRecall?: number;
                  contextPrecision?: number;
                  overall: number;
                  [key: string]: unknown;
              };
              samples: {
                  id?: string;
                  question: string;
                  scores: Record<string, number>;
                  reasoning?: Record<string, string>;
                  tenantId?: string;
                  metadata?: Record<string, unknown>;
              }[];
              stats?: Record<
                  string,
                  { mean: number; min: number; max: number; stddev: number; count: number },
              >;
              meta: {
                  totalSamples: number;
                  metrics: string[];
                  provider: string;
                  model: string;
                  startedAt: string;
                  completedAt: string;
                  durationMs: number;
              };
          },
          metric: string,
          minScore: number,
      ) => MatcherResult
    • toPassThresholds: (
          this: { isNot: boolean },
          received: {
              scores: {
                  faithfulness?: number;
                  contextRelevance?: number;
                  answerRelevance?: number;
                  contextRecall?: number;
                  contextPrecision?: number;
                  overall: number;
                  [key: string]: unknown;
              };
              samples: {
                  id?: string;
                  question: string;
                  scores: Record<string, number>;
                  reasoning?: Record<string, string>;
                  tenantId?: string;
                  metadata?: Record<string, unknown>;
              }[];
              stats?: Record<
                  string,
                  { mean: number; min: number; max: number; stddev: number; count: number },
              >;
              meta: {
                  totalSamples: number;
                  metrics: string[];
                  provider: string;
                  model: string;
                  startedAt: string;
                  completedAt: string;
                  durationMs: number;
              };
          },
          thresholds: Partial<Record<string, number>>,
      ) => MatcherResult
    import { ragevalMatchers } from 'rageval/matchers'
    expect.extend(ragevalMatchers)