Add prompt improvement button in drawer

This commit is contained in:
Xin Wang
2026-08-26 12:18:18 +08:00
parent 239b9027ca
commit ab409ba9c0
13 changed files with 2067 additions and 39 deletions
+16
View File
@@ -126,6 +126,22 @@ export type BatchRunSnapshot = {
stopReason: "manual" | "assertion_failure" | "execution_error" | null;
};
export type PromptImprovementResult = {
diagnosis: string;
promptChange: {
before: string;
after: string;
reason: string;
evidence: string[];
} | null;
manualRecommendations: Array<{
category: "tool" | "test_case" | "other";
title: string;
detail: string;
}>;
evaluatorName: string;
};
export function firstEvaluationFailureReason(item: BatchRunCase): string {
const evaluations = [
...item.turns.flatMap((turn) => turn.evaluations),