Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ All notable changes to SkillEvaluator are documented in this file.

### Added

- Tier 3 reports list up to three run-level **Next steps** under the per-case
fixes in the terminal, `report.html` and the Markdown report: re-run an
incomplete run, add attempts for inconsistent cases, add cases or negative
controls, or compare agents and models. Each step names its target
(evaluation, dataset or agent), the observed problem and evidence, the action,
and the check that would show improvement. Steps about agents or models are
marked as hypotheses to test, steps from incomplete runs as limited, and none
suggest removing cases or loosening expectations. The rules need no LLM; the
Tier 3 payload carries them as `next_steps`.

- `skills/skillevaluator/` is an agent skill for operating SkillEvaluator: it
routes requests to the right tier, readiness check, dataset, report, or CI
command, and ships Tier 3 evaluation cases for itself. A test keeps every
Expand Down
33 changes: 33 additions & 0 deletions docs/reports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,39 @@ Artifacts panel shows the HTML report path, the output directory, and — only
when a retained Harbor jobs directory exists — a ready-to-paste `harbor-view`
command.

### Next steps for the run

Below the per-case fixes, the case summary in the terminal, `report.html`,
and the Markdown report list up to three **Next steps** for the run as a
whole: what a single case cannot show. The steps come from fixed rules, so
they also appear when no LLM is configured. Each step names:

- the **target** to change: the `evaluation` settings (re-run, more
attempts), the `dataset` (more cases, negative controls), or the `agent`
(compare agents or models);
- the **problem** observed in this run and the **evidence** behind it (case
ids, attempt marks, or per-agent pass-rate changes);
- the **action** to take, with the flag or file to change;
- the **check** that would show the change worked.

| Step | Shown when |
|------|------------|
| Incomplete run | Attempts did not produce a score and no per-case run error already says so |
| Inconsistent results | A case passed on some attempts and failed on others (more `--n-attempts`) |
| Single attempt | Every case ran once |
| Agent-dependent effect | Two or more agents differ by 20 or more points in pass-rate change |
| More cases | Fewer than five skill cases ran, unless the case fixes already ask for new cases |
| Negative controls | The dataset snapshot has no case with `expected_skill: null` or `should_trigger: false` |
| Agent experiment | Only one agent ran and the skill showed no clear gain |

A step marked `hypothesis` is a cause or remedy to test, not a finding: for
example, that one agent follows the skill differently. A step marked
`limited` rests on an incomplete run, so re-run first. Steps never suggest
removing cases or loosening expectations to raise a score. Baseline-only runs
and runs where the skill never activated get no next steps. The Tier 3 payload
carries them as `next_steps`, with the `kind`, `target`, `problem`,
`evidence`, `action`, `check` and `strength` fields.

### The five dimensions

With `default` or `default_plus_custom` grading, reports lead with five
Expand Down
4 changes: 4 additions & 0 deletions src/skillevaluator/evaluation/tier3_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -3566,6 +3566,10 @@ def _apply_case_findings(
for fix in fixes
]
payload["suggestions"] = [fix["action"] for fix in fixes if fix.get("action")]
from skillevaluator.tier3.next_steps import next_steps

with contextlib.suppress(Exception): # advisory, like the fixes above
payload["next_steps"] = next_steps(source, run_dir=run_dir, fixes=fixes)
Comment thread
chrisknvidia marked this conversation as resolved.
Resolved


def _recommendation_title_from(text: str) -> str:
Expand Down
7 changes: 7 additions & 0 deletions src/skillevaluator/reporting/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,13 @@ def _sanitize_tier3_display_payload(value: dict[str, Any]) -> dict[str, Any]:
]
for key in ("conclusions", "recommendations", "suggestions_v2"):
payload[key] = _sanitize_tier3_insight_items(payload.get(key))
payload["next_steps"] = [
{
key: str(step.get(key) or "")
for key in ("kind", "target", "problem", "evidence", "action", "check", "strength")
}
for step in _dict_list(payload.get("next_steps"))
]
payload["dataset"] = [_sanitize_tier3_dataset_case(item) for item in _dict_list(payload.get("dataset"))]
payload["trials"] = [_sanitize_tier3_trial(item) for item in _dict_list(payload.get("trials"))]
timing: list[dict[str, Any]] = []
Expand Down
18 changes: 18 additions & 0 deletions src/skillevaluator/reporting/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,24 @@ def render_all(self, results: list[ValidationResult]) -> str:
lines.append(f" - Evidence: [{label}]({url})")
lines.append("")

if next_steps := _dict_items(ae.get("next_steps")):
lines.append("### Next Steps")
lines.append("")
for idx, step in enumerate(next_steps, start=1):
problem = _markdown_inline_text(step.get("problem"))
action = _markdown_inline_text(step.get("action"))
if not problem or not action:
continue
target = _markdown_inline_text(step.get("target")) or "evaluation"
strength = _markdown_inline_text(step.get("strength"))
label = target if strength in ("", "supported") else f"{target} · {strength}"
lines.append(f"{idx}. **{problem}** [{label}]: {action}")
if check := _markdown_inline_text(step.get("check")):
lines.append(f" - Check: {check}")
if evidence := _markdown_inline_text(step.get("evidence")):
lines.append(f" - Evidence: {evidence}")
lines.append("")

# Results per validator
lines.append("## Results")
lines.append("")
Expand Down
12 changes: 12 additions & 0 deletions src/skillevaluator/reporting/templates/report.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2588,6 +2588,18 @@
<p class="t3-next-steps-conclusion">No recommendations were generated for this evaluation.</p>
{% endif %}
{% endif %}
{% set t3_run_next_steps = tier3.next_steps or [] %}
{% if t3_run_next_steps %}
<p class="t3-next-steps-conclusion" id="tier3-run-next-steps">Next steps for the run:</p>
<ol class="t3-next-steps-list">
{% for step in t3_run_next_steps %}
<li>
<strong>{{ step.problem }}</strong> [{{ step.target }}{% if step.strength and step.strength != 'supported' %} · {{ step.strength }}{% endif %}]:
{{ step.action }} Check: {{ step.check }}{% if step.evidence %} Evidence: {{ step.evidence }}{% endif %}
</li>
{% endfor %}
</ol>
{% endif %}
{% if (t3_source_errors | length) == 1 %}
<p class="t3-next-steps-conclusion">
Source validation error: {% if t3_source_errors[0].path %}{{ t3_source_errors[0].path }}: {% endif %}{{ t3_source_errors[0].message }}
Expand Down
Loading
Loading