diff --git a/report-app/src/app/pages/report-list/report-list.html b/report-app/src/app/pages/report-list/report-list.html index 2093eca0..4856aa5d 100644 --- a/report-app/src/app/pages/report-list/report-list.html +++ b/report-app/src/app/pages/report-list/report-list.html @@ -37,6 +37,13 @@ } + @if (group.promptNames.length) { + + }
diff --git a/report-app/src/app/pages/report-list/report-list.scss b/report-app/src/app/pages/report-list/report-list.scss index d8ccf521..bc8bbd36 100644 --- a/report-app/src/app/pages/report-list/report-list.scss +++ b/report-app/src/app/pages/report-list/report-list.scss @@ -106,6 +106,15 @@ h1, h2 { padding: 0 20px; } +.prompt-names { + margin-top: 0.4rem; + + .status-badge { + font-size: 0.75rem; + font-weight: 400; + } +} + .select-for-comparison input[type='checkbox'] { width: 20px; height: 20px; diff --git a/runner/orchestration/grouping.ts b/runner/orchestration/grouping.ts index 0135cf70..054c17c6 100644 --- a/runner/orchestration/grouping.ts +++ b/runner/orchestration/grouping.ts @@ -55,6 +55,7 @@ export function groupSimilarReports(inputRuns: RunInfo[]): RunGroup[] { const groupResults: AssessmentResult[] = []; const firstRun = groupRuns[0]; const labels = new Set(); + const promptNames = new Set(); let totalForGroup = 0; let maxForGroup = 0; let appsCount = 0; @@ -70,6 +71,7 @@ export function groupSimilarReports(inputRuns: RunInfo[]): RunGroup[] { totalForRun += result.score.totalPoints; maxForRun += result.score.maxOverallPoints; groupResults.push(result); + promptNames.add(result.promptDef.name); } // `|| 0` in case there are no results, otherwise we'll get NaN. @@ -90,6 +92,7 @@ export function groupSimilarReports(inputRuns: RunInfo[]): RunGroup[] { maxOverallPoints: maxForGroup / groupRuns.length || 0, appsCount, labels: Array.from(labels), + promptNames: Array.from(promptNames), environmentId: firstRun.details.summary.environmentId, framework: firstRun.details.summary.framework, model: firstRun.details.summary.model, diff --git a/runner/reporting/report-local-disk.ts b/runner/reporting/report-local-disk.ts index 1d3b8039..b695c364 100644 --- a/runner/reporting/report-local-disk.ts +++ b/runner/reporting/report-local-disk.ts @@ -37,6 +37,11 @@ export async function fetchReportsFromDisk(directory: string): Promise r.promptDef.name); + data.set(group.id, {group, run}); }), ); diff --git a/runner/shared-interfaces.ts b/runner/shared-interfaces.ts index b08c8980..9a61c19f 100644 --- a/runner/shared-interfaces.ts +++ b/runner/shared-interfaces.ts @@ -637,6 +637,8 @@ export interface RunGroup { }; /** Runner used to generate code for the runs in the group. */ runner?: CodegenRunnerInfo; + /** Names of prompts that were evaluated in this group. */ + promptNames: string[]; } /** Request information for a file generation. */