Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ All notable changes to SkillEvaluator are documented in this file.

### Fixed

- Tier 3 reports an inconclusive result when every observed positive with-skill
trial has zero activation, and omits skill-lift comparisons for that agent.
Activation counts are reported separately; negative controls and missing
evidence do not imply that the skill was never loaded. The skill-execution
score is zero when positive activation fails, so unrelated successful checks
cannot inflate it to 0.5 (fixes #208).
- Tier 3 now uses one versioned, equal-weight five-dimension overall-score
policy across Harbor rewards, pass@k, Skill Lift, reports, comparisons, and
best-agent selection. Previously, some paths averaged all six evaluators
Expand Down
9 changes: 9 additions & 0 deletions docs/tier3-live-evaluation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ human-readable dimensions:
In `custom_only` mode, your own grader defines the score instead — see
[Custom Graders & Tasks](custom-graders.mdx).

If every positive with-skill trial has a confirmed activation score of zero,
the result is **INCONCLUSIVE: skill never activated**. Tier 3 keeps the arm
scores for inspection but omits lift comparisons and skill-quality advice for
that agent. A positive case with failed activation receives a `skill_execution`
score of zero, even if unrelated commands succeeded. Activation counts exclude
negative controls; missing or unsupported activation evidence remains unknown.
When at least one positive trial activates the skill, the usual lift calculation
applies. This also makes activation failures visible with `--skip-baseline`.

## Before you start

Every row below is checkable in seconds; the linked guide covers setup in
Expand Down
78 changes: 72 additions & 6 deletions src/skillevaluator/evaluation/tier3_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,26 @@
VERDICT_PASS = "pass"
VERDICT_FAIL = "fail"
VERDICT_NEUTRAL = "neutral"
VERDICT_INCONCLUSIVE = "inconclusive"


def _never_activated(agent: dict[str, Any]) -> bool:
activation = agent.get("skill_activation")
return isinstance(activation, dict) and activation.get("status") == "never_activated"


def _activation_summary(info: dict[str, Any]) -> dict[str, Any]:
from skillevaluator.tier3.harbor.activation import summarize_skill_activation

# A retained summary covers all trials even when report loading is bounded.
summary = info.get("skill_activation")
if isinstance(summary, dict):
return dict(summary)
summary = summarize_skill_activation(info.get("rewards") or [])
if info.get("rewards_complete") is False and summary.get("status") == "never_activated":
summary = dict(summary, status="unknown", reason="Activation evidence is incomplete.")
return summary


_AGENT_EVAL_VALIDATOR = "AGENT_EVAL"
_AGENT_EVAL_DESCRIPTION = "Tier 3: Live Agent Evaluation (Harbor)"
Expand Down Expand Up @@ -792,6 +812,7 @@ def build_agent_eval_payload(
summary = {
"schema_version": _SCHEMA_VERSION,
"verdict": verdict,
"skill_activation": best.get("skill_activation", {}),
"skill_name": skill_name,
"best_agent": best_agent,
"agents_run": list(agent_payloads.keys()),
Expand Down Expand Up @@ -830,9 +851,20 @@ def build_agent_eval_payload(
failure_message = "; ".join(execution_errors) or "Tier 3 evaluation did not produce a complete scored run"
deterministic_conclusions = [{"severity": "fail", "title": "Evaluation incomplete", "message": failure_message}]
deterministic_suggestions = [failure_message]
elif verdict == VERDICT_INCONCLUSIVE:
deterministic_conclusions = [
{
"severity": "warn",
"title": "Inconclusive: skill never activated",
"message": "The skill was never activated in any positive with-skill trial. Scores are diagnostic only; no lift verdict was computed.",
}
]
deterministic_suggestions = ["Check skill loading and agent support, then rerun the evaluation."]
else:
deterministic_conclusions = _build_conclusions(
agent_payloads, best_dimensions, pass_threshold=_pass_threshold_from_policy(policy)
{name: agent for name, agent in agent_payloads.items() if not _never_activated(agent)},
best_dimensions,
pass_threshold=_pass_threshold_from_policy(policy),
)
deterministic_suggestions = _suggestions_for_dimensions(best_dimensions)
recommendations = _attach_harbor_evidence_to_recommendations(
Expand All @@ -854,6 +886,7 @@ def build_agent_eval_payload(
"summary": summary,
"skill_name": skill_name,
"verdict": verdict,
"skill_activation": summary["skill_activation"],
"best_agent": best_agent,
"agents_run": list(agent_payloads.keys()),
"environment": env_mode,
Expand Down Expand Up @@ -888,7 +921,10 @@ def build_agent_eval_payload(
"conclusions": list(deterministic_conclusions),
"recommendations": recommendations,
"suggestions": list(deterministic_suggestions),
"suggestions_v2": _attach_harbor_evidence_to_suggestions_v2(suggestions_v2 or [], evidence_links),
"suggestions_v2": _attach_harbor_evidence_to_suggestions_v2(
[] if any(_never_activated(agent) for agent in agent_payloads.values()) else (suggestions_v2 or []),
Comment thread
chrisknvidia marked this conversation as resolved.
Resolved
evidence_links,
),
"metric_ids": metric_ids,
"supported_metric_ids": list(AGENT_EVAL_EVALUATORS),
"metric_labels": metric_labels,
Expand All @@ -912,7 +948,9 @@ def build_agent_eval_payload(
payload,
deterministic_conclusions=deterministic_conclusions,
deterministic_suggestions=deterministic_suggestions,
use_llm_judge=use_llm_judge and overall_score is not None,
use_llm_judge=use_llm_judge
and overall_score is not None
and not any(_never_activated(agent) for agent in agent_payloads.values()),
)
if evidence_links:
payload["conclusions"] = _attach_harbor_evidence_to_conclusions(
Expand Down Expand Up @@ -1509,11 +1547,15 @@ def _build_agent(

with_scores = info.get("with_skill") or {}
without_scores = info.get("without_skill") or {}
skill_activation = _activation_summary(info)
never_activated = skill_activation.get("status") == "never_activated"
condition_policies = {
value.strip() if isinstance(value, str) and value.strip() else score_policy
for value in (info.get("score_policy_with_skill"), info.get("score_policy_without_skill"))
}
comparable_scores = set(with_metrics) == set(baseline_metrics) and len(condition_policies) == 1
comparable_scores = (
not never_activated and set(with_metrics) == set(baseline_metrics) and len(condition_policies) == 1
)
lift_data = info.get("lift") or {}
with_quality_available = _condition_quality_available(info, "with_skill")
baseline_quality_available = _condition_quality_available(info, "without_skill")
Expand All @@ -1529,6 +1571,16 @@ def _build_agent(
info.get("dimensions_with_skill") or {},
info.get("dimensions_without_skill") or {},
)
if never_activated:
for evaluator in evaluators.values():
evaluator["lift"] = None
for dimension in dimensions:
dimension.update(
lift=None,
verdict=VERDICT_INCONCLUSIVE,
explanation="Skill never activated; scores are diagnostic only.",
reasoning_bullets=["Skill never activated; no skill-effectiveness verdict was computed."],
)
with_dimension_values = [d["with_skill"] for d in dimensions]
baseline_dimension_values = [d["baseline"] for d in dimensions]
overall_ws = None
Expand Down Expand Up @@ -1601,7 +1653,8 @@ def _build_agent(

trials = _normalize_trials(info.get("rewards") or [], with_metrics)
baseline_trials = _normalize_trials(info.get("rewards_baseline") or [], baseline_metrics)
_attach_baseline_pairs(trials, baseline_trials, with_metrics, comparable_overall=comparable_scores)
if not never_activated:
_attach_baseline_pairs(trials, baseline_trials, with_metrics, comparable_overall=comparable_scores)
from skillevaluator.tier3.harbor.resource_usage import resource_comparison

resources = resource_comparison(
Expand All @@ -1620,6 +1673,8 @@ def _build_agent(

return {
"name": name,
"skill_activation": skill_activation,
"verdict": VERDICT_INCONCLUSIVE if never_activated else None,
Comment thread
chrisknvidia marked this conversation as resolved.
Resolved
"model": model,
"execution_status": (
info.get("execution_status")
Expand Down Expand Up @@ -1676,6 +1731,9 @@ def _attach_agent_report_details(
custom_lift=custom_lift if isinstance(custom_lift, dict) else {},
report_budget=report_budget,
)
if _never_activated(agent_payload):
for card in agent_payload["evaluator_cards"]:
card["lift"] = None


def _build_evaluators(
Expand Down Expand Up @@ -2958,6 +3016,8 @@ def _agent_quality_verdict(agent: dict[str, Any]) -> str:
"""Classify one supported agent by the canonical dimension gate."""
if agent.get("execution_status") != "succeeded":
return VERDICT_NEUTRAL
if _never_activated(agent):
return VERDICT_INCONCLUSIVE

dimensions = {
str(dimension.get("id")): dimension
Expand Down Expand Up @@ -2989,6 +3049,8 @@ def _overall_verdict_from_agents(agents: dict[str, dict[str, Any]]) -> str:
return VERDICT_PASS
if any(verdict == VERDICT_NEUTRAL for verdict in verdicts) or not verdicts:
return VERDICT_NEUTRAL
if all(verdict == VERDICT_INCONCLUSIVE for verdict in verdicts):
return VERDICT_INCONCLUSIVE
return VERDICT_FAIL


Expand Down Expand Up @@ -3038,6 +3100,8 @@ def _canonical_agent_rank_from_info(

def _pick_best_agent(agents: dict[str, dict[str, Any]]) -> str:
eligible = {name: rank for name, agent in agents.items() if (rank := _canonical_agent_rank(agent)) is not None}
activated = {name: rank for name, rank in eligible.items() if not _never_activated(agents[name])}
eligible = activated or eligible
if not eligible:
return ""
if len(eligible) == 1:
Expand Down Expand Up @@ -3200,7 +3264,9 @@ def _evaluated_at_from_run(run_dir: Path, engine_result: dict[str, Any] | None)
def _load_suggestions_v2(run_dir: Path, agents: dict[str, dict[str, Any]]) -> list[dict[str, Any]]:
"""Read evidence-backed suggestions from the best agent's findings.json."""
suggestions: list[dict[str, Any]] = []
for agent_name in agents:
for agent_name, info in agents.items():
if _activation_summary(info).get("status") == "never_activated":
continue
findings_file = run_dir / agent_name / "findings.json"
if not findings_file.exists():
continue
Expand Down
36 changes: 33 additions & 3 deletions src/skillevaluator/reporting/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,8 @@ def collect(key: str, allowed: frozenset[str], rank: dict[str, int]) -> tuple[st

verdict, verdict_consistent = collect(
"verdict",
frozenset({"pass", "neutral", "fail", "skipped", "incomplete"}),
{"pass": 0, "skipped": 1, "neutral": 2, "incomplete": 3, "fail": 4},
frozenset({"pass", "neutral", "fail", "skipped", "incomplete", "inconclusive"}),
{"pass": 0, "skipped": 1, "neutral": 2, "inconclusive": 3, "incomplete": 3, "fail": 4},
)
execution_status, execution_consistent = collect(
"execution_status",
Expand Down Expand Up @@ -1222,6 +1222,10 @@ def agent_eval_dimension_verdict(
verdicts: list[str] = []
has_partial_evidence = False
for agent in supported_agents:
activation = agent.get("skill_activation")
if isinstance(activation, dict) and activation.get("status") == "never_activated":
verdicts.append("inconclusive")
continue
scores = _agent_eval_dimension_scores(agent, require_baseline=require_baseline)
if scores is None:
has_partial_evidence = True
Expand All @@ -1239,6 +1243,8 @@ def agent_eval_dimension_verdict(
return None
if "neutral" in verdicts:
return "neutral"
if all(verdict == "inconclusive" for verdict in verdicts):
return "inconclusive"
return "fail"


Expand Down Expand Up @@ -1293,8 +1299,23 @@ def _agent_eval_publication_aggregates_consistent(
return False

eligible_agents: list[tuple[str, float, float]] = []
has_activation_eligible_agent = any(
not (
isinstance(agent.get("skill_activation"), dict)
and agent["skill_activation"].get("status") == "never_activated"
)
and _agent_eval_safe_text(agent.get("execution_status")).casefold() == "succeeded"
and _agent_eval_finite_score(agent.get("with_skill")) is not None
for agent in agents.values()
)
for name in canonical_agent_names:
agent = agents[name]
if (
has_activation_eligible_agent
and isinstance(agent.get("skill_activation"), dict)
and agent["skill_activation"].get("status") == "never_activated"
):
continue
if _agent_eval_safe_text(agent.get("execution_status")).casefold() != "succeeded":
continue
score = _agent_eval_finite_score(agent.get("with_skill"))
Expand Down Expand Up @@ -1653,7 +1674,7 @@ def _agent_eval_candidate_rank(
if max(payload_attempts, _agent_eval_count(agent.get("scored_attempts"))) > 0:
strong_agent_evidence = True

valid_verdict = truth_consistent and verdict in {"pass", "neutral", "fail"}
valid_verdict = truth_consistent and verdict in {"pass", "neutral", "fail", "inconclusive"}
dimension_verdict = agent_eval_dimension_verdict(payload)
conservative_outcome_rank = max(
({"pass": 0, "neutral": 1, "fail": 3}.get(candidate, -1) for candidate in (verdict, dimension_verdict)),
Expand Down Expand Up @@ -2156,6 +2177,15 @@ def assess_tier3_evidence(
selected_payload,
"Tier 3 evidence records a failing verdict.",
)
if raw_verdict == "inconclusive" and dimension_verdict == "inconclusive" and execution_status == "succeeded":
return Tier3EvidenceAssessment(
"inconclusive",
False,
execution_status,
raw_verdict,
selected_payload,
"Inconclusive: skill never activated. Scores are diagnostic only; no lift verdict was computed.",
)
if execution_status == "incomplete":
return Tier3EvidenceAssessment(
"incomplete",
Expand Down
2 changes: 2 additions & 0 deletions src/skillevaluator/reporting/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,8 @@ def _tier_status(
tier3 = assess_tier3_evidence(results, ae, expected_skill_name=expected_skill_name)
if tier3.status == "fail":
return "FAIL", f"{len(_agents(ae))} agent(s); {_dataset_summary(ae)['total_tasks']} task(s)"
if tier3.status == "inconclusive":
return "INCONCLUSIVE", tier3.reason or "Skill never activated."
Comment thread
chrisknvidia marked this conversation as resolved.
Resolved
if not tier3.evidence_complete:
evidence = tier3.reason or (
"Required Tier 3 evidence is missing"
Expand Down
12 changes: 10 additions & 2 deletions src/skillevaluator/reporting/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@ def _print_agent_eval_tables(agent_eval: dict, console: Console) -> None:
composite_text = f"{composite:+.2f}" if isinstance(composite, int | float) else "N/A"
verdict_text = escape_markup(str(verdict).upper())
console.print(f"\n [{vc}]Verdict: {verdict_text} (composite lift = {composite_text})[/{vc}]")
if verdict == "inconclusive":
console.print(
" [yellow]Skill never activated. Scores are diagnostic only; no lift verdict was computed.[/yellow]"
)
if runtime:
console.print(f" [dim]Runtime: {runtime:.1f}s[/dim]")
harbor_viewer = normalize_harbor_viewer_for_display(agent_eval)
Expand Down Expand Up @@ -377,12 +381,16 @@ def _print_agent_eval_tables(agent_eval: dict, console: Console) -> None:
ws = scores.get("with_skill", 0.0)
bl = scores.get("baseline", 0.0)
lift = scores.get("lift", 0.0)
lc = "green" if lift > 0.01 else ("red" if lift < -0.01 else "dim")
lc = (
"green"
if lift is not None and lift > 0.01
else ("red" if lift is not None and lift < -0.01 else "dim")
)
table.add_row(
escape_markup(str(name).replace("_", " ").title()),
f"{ws:.2f}",
f"{bl:.2f}",
f"[{lc}]{lift:+.2f}[/{lc}]",
f"[{lc}]{lift:+.2f}[/{lc}]" if lift is not None else "N/A",
)

console.print(table)
Expand Down
2 changes: 2 additions & 0 deletions src/skillevaluator/reporting/console_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,8 @@ def summarize_tier3(result: ValidationResult) -> tuple[bool, bool, list[TierRow]
# a fabricated N/N ratio here would overstate what we measured.
agent_segments.append((f" eval cases {len(case_list)}", MUTED))
rows = [TierRow("agent", agent_segments)]
if payload.get("verdict") == "inconclusive" or summary.get("verdict") == "inconclusive":
rows.append(TierRow("verdict", [("INCONCLUSIVE: skill never activated", TEXT)]))
lift = _tier3_finite_number(summary.get("overall_lift"))
with_score = _tier3_finite_number(summary.get("overall_score"))
if (
Expand Down
4 changes: 3 additions & 1 deletion src/skillevaluator/reporting/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,8 @@ def _sanitize_tier3_evaluator_card(value: dict[str, Any]) -> dict[str, Any] | No

def _sanitize_tier3_agent(value: dict[str, Any]) -> dict[str, Any]:
agent = dict(value)
activation = agent.get("skill_activation")
agent["skill_activation"] = dict(activation) if isinstance(activation, dict) else {}
for key in ("model", "model_name", "llm_model", "display_name", "label"):
if key not in agent:
continue
Expand Down Expand Up @@ -2203,7 +2205,7 @@ def payload_has_execution_evidence(
) -> bool:
if agent_eval_publication_evidence_complete(candidate):
return True
if payload_verdict(candidate) not in {"pass", "neutral", "fail"}:
if payload_verdict(candidate) not in {"pass", "neutral", "fail", "inconclusive"}:
return False
execution_status = payload_execution_status(candidate)
if execution_status == "succeeded":
Expand Down
2 changes: 2 additions & 0 deletions src/skillevaluator/reporting/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ def render_all(self, results: list[ValidationResult]) -> str:
lines.append("")
composite_text = _format_report_number(composite, signed=True)
lines.append(f"**Verdict:** {verdict} (composite lift = {composite_text})")
if verdict == "INCONCLUSIVE":
lines.append("Skill never activated. Scores are diagnostic only; no lift verdict was computed.")
runtime_number = _finite_report_number(runtime)
runtime_text = f"{runtime_number:.1f}s" if runtime_number is not None else "N/A"
lines.append(f"**Runtime:** {runtime_text}")
Expand Down
Loading
Loading