MCPcopy Create free account
hub / github.com/openai/plugins / createEvaluationNextAction

Function createEvaluationNextAction

plugins/plugin-eval/src/core/presentation.js:49–94  ·  view source on GitHub ↗
(result)

Source from the content-addressed store, hash-verified

47}
48
49export function createEvaluationNextAction(result) {
50 const labelName = targetLabel(result.target);
51
52 if (hasStructuralFailures(result)) {
53 return {
54 label: "Fix structural issues first",
55 why: "Failing manifest or skill structure issues reduce trust and can invalidate later measurements.",
56 command: buildStartCommand(result.target, "What should I fix first?"),
57 chatPrompt: "What should I fix first?",
58 };
59 }
60
61 if (!result.observedUsage?.sampleCount && hasBudgetPressure(result)) {
62 return {
63 label: "Measure real token usage next",
64 why: "The static budget looks heavy, so live usage is the fastest way to confirm whether the cost is acceptable.",
65 command: buildStartCommand(result.target, `Measure the real token usage of this ${labelName}.`),
66 chatPrompt: `Measure the real token usage of this ${labelName}.`,
67 };
68 }
69
70 if (result.observedUsage?.sampleCount) {
71 return {
72 label: "Review the measurement plan",
73 why: "You already have observed usage, so the highest-value next step is deciding what to instrument or improve.",
74 command: buildStartCommand(result.target, "What should I run next?"),
75 chatPrompt: "What should I run next?",
76 };
77 }
78
79 if (hasWarningsOrFailures(result)) {
80 return {
81 label: "Fix the top findings and rerun the report",
82 why: "A short pass on the highest-value findings will improve trust, readability, and the signal quality of future benchmarks.",
83 command: buildStartCommand(result.target, "What should I fix first?"),
84 chatPrompt: "What should I fix first?",
85 };
86 }
87
88 return {
89 label: "Choose the next workflow from chat",
90 why: "The report is clean enough that the best next step depends on whether you want budgets, benchmarks, or comparisons.",
91 command: buildStartCommand(result.target, "What should I run next?"),
92 chatPrompt: "What should I run next?",
93 };
94}
95
96export function applyEvaluationPresentation(result) {
97 result.summary = enrichSummary(result, result.summary);

Callers 2

ensureEvaluationPayloadFunction · 0.90

Calls 5

hasStructuralFailuresFunction · 0.85
buildStartCommandFunction · 0.85
hasBudgetPressureFunction · 0.85
hasWarningsOrFailuresFunction · 0.85
targetLabelFunction · 0.70

Tested by

no test coverage detected