import type { ExpectedStep, Trajectory } from '@mastra/core/evals'; import type { MastraModelConfig } from '@mastra/core/llm'; export interface TrajectoryAccuracyLLMOptions { /** The LLM model to use as judge */ model: MastraModelConfig; /** Optional expected trajectory to compare against */ expectedTrajectory?: Trajectory | ExpectedStep[]; } /** * Creates an LLM-based trajectory accuracy scorer that evaluates the quality * of an agent's action sequence using an LLM judge. * * This scorer extracts the agent's tool call trajectory and asks an LLM to evaluate * whether the trajectory was appropriate, efficient, and complete. When an expected * trajectory is provided, it compares against it. Otherwise, it evaluates the trajectory * based on the task requirements. * * @param options - Configuration for the trajectory scorer * @returns A scorer that evaluates trajectory quality * * @example * ```ts * import { createTrajectoryAccuracyScorerLLM } from '@mastra/evals/scorers'; * * // Without expected trajectory (evaluates quality based on task) * const scorer = createTrajectoryAccuracyScorerLLM({ * model: { provider: 'openai', name: 'gpt-4o' }, * }); * * // With expected trajectory * const scorerWithExpected = createTrajectoryAccuracyScorerLLM({ * model: { provider: 'openai', name: 'gpt-4o' }, * expectedTrajectory: { * steps: [ * { stepType: 'tool_call', name: 'search' }, * { stepType: 'tool_call', name: 'summarize' }, * ], * }, * }); * ``` */ export declare function createTrajectoryAccuracyScorerLLM({ model, expectedTrajectory: staticExpectedTrajectory, }: TrajectoryAccuracyLLMOptions): import("@mastra/core/evals").MastraScorer<"llm-trajectory-accuracy-scorer", import("@mastra/core/evals").ScorerRunInputForAgent, Trajectory, Record<"preprocessStepResult", { actualTrajectory: Trajectory; actualTrajectoryFormatted: string; expectedTrajectoryFormatted: string | undefined; hasSteps: boolean; }> & Record<"analyzeStepResult", { stepEvaluations: { stepName: string; wasNecessary: boolean; wasInOrder: boolean; reasoning: string; }[]; overallAssessment: string; missingSteps?: string[] | undefined; extraSteps?: string[] | undefined; }> & Record<"generateScoreStepResult", number> & Record<"generateReasonStepResult", string>>; //# sourceMappingURL=index.d.ts.map