Skip to content

fix(tier3): keep LLM suggestions grounded, distinct and requirement-preserving - #380

Merged
chrisknvidia merged 6 commits into
mainfrom
fix/christopherk/grounded-suggestions
Nov 10, 2026
Merged

chrisknvidia merged 6 commits into
mainfrom
fix/christopherk/grounded-suggestions

Conversation

@chrisknvidia

Copy link
Copy Markdown
Collaborator

Summary

LLM-written Tier 3 advice could cite evidence that the run never recorded, repeat the same fix, or suggest weakening a requirement so a failing agent passes. This keeps that advice grounded and distinct, without changing the deterministic fallbacks used when no LLM is available.

Findings suggestions (src/skillevaluator/tier3/harbor/report.py, _generate_suggestions_structured):

  • Cited evidence references that are not in the run's recorded evidence are dropped, instead of being turned into a minimal kind: "evidence" entry that points nowhere. Repeated references are kept once.
  • A suggestion that repeats an earlier one (case- and whitespace-insensitive) is kept once.
  • The prompt asks for distinct suggestions, says not to loosen, remove or rewrite an eval expectation just so the agent passes, and asks for a Hypothesis: prefix plus a way to test it when the evidence does not establish a cause (for example, that a different model would do better).

Insights recommendations (src/skillevaluator/evaluation/insights_judge.py):

  • Recommendations that restate a deterministic recommendation or an earlier LLM recommendation are dropped.
  • Recommendations that loosen, relax, lower, weaken or soften an expectation, assertion, ground truth, pass threshold, requirement or criteria are dropped. Clarifying advice such as "make the expected output explicit" is kept, and the existing negative-control and case-removal checks are unchanged.
  • The system prompt asks for distinct actions, forbids weakening advice, and allows a different agent or model only when the trials compare agents; otherwise it must be phrased as an experiment.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests (tests/tier3/test_suggestion_grounding.py, tests/evaluation/test_judges.py). The old test asserting the unresolved-reference fallback now asserts that such references are dropped.
  • Updated documentation for user-visible changes (docs/reports.mdx)
  • Ran make lint
  • Ran make test. The only failures are environment-dependent git-remote, same-inode and Ctrl-C tests, which also fail on a clean main checkout on the same machine.
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

…reserving

Drop LLM-cited evidence references the run did not record instead of
rendering them as evidence, and keep one copy of a repeated suggestion.
Drop insight recommendations that restate a deterministic one or that
loosen, relax or lower an expectation, assertion, ground truth or pass
threshold. Both prompts now ask for distinct actions and phrase untested
causes, such as a different model, as hypotheses or experiments.

Signed-off-by: Christopher Kevin <[email protected]>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review: 2 findings (0 P1, 0 P2, 2 P3); 2 posted inline.

Checked the suggestion grounding in tier3/harbor/report.py (recorded-ref filtering, dedup, prompt) and the insights recommendation filters in evaluation/insights_judge.py against the description, CHANGELOG and docs/reports.mdx, with probes run on both this head and origin/main.
Tests run on the head: tests/tier3/test_suggestion_grounding.py plus tests/evaluation/test_judges.py, 92 passed (the 7 new RecommendationQuality tests included). The related report and judge suites (collector truth, rich markup escaping, skill activation reporting, judge parse robustness, report refs) gave 361 passed and 4 skipped. ruff check and format --check are clean on the 4 touched Python files.
Merges onto current main without conflicts. Against other open PRs it conflicts in CHANGELOG.md only (#376, #379), and no semantic overlap with another PR was found.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Evaluation run

SkillEvaluator CI results

Required gate: Skipped

Only Tier 1 blocks CI; Tier 2 and Tier 3 are advisory.

Skill Tier 1: Static and Security Validation Tier 2: Deduplication Tier 3: Live Agent Evaluation Report
No skills evaluated SKIPPED · issues unknown · No selected skills changed; Tier 1 evaluation did not run. INCOMPLETE · issues unknown · The tier did not produce retained evidence; inspect its failed or cancelled CI job. INCOMPLETE · issues unknown · The tier did not produce retained evidence; inspect its failed or cancelled CI job. Report

Commit: f56df28f7e3ef168754db1efbd260c1c4c2860af · Environment: docker

…nded-suggestions

Signed-off-by: Christopher Kevin <[email protected]>

# Conflicts:
#	CHANGELOG.md
…nded-suggestions

Signed-off-by: Christopher Kevin <[email protected]>

# Conflicts:
#	CHANGELOG.md
@chrisknvidia
chrisknvidia merged commit 1a40f52 into main Nov 10, 2026
22 checks passed
@chrisknvidia
chrisknvidia deleted the fix/christopherk/grounded-suggestions branch November 10, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants