Skip to content

[BUG]: Behavior evidence drops final-answer text while reporting no truncation #234

Closed

Description

@Tomauskasz

What happened?

Behavior evidence drops grading-relevant text from the middle of a final answer, but reports omitted.truncated=false. The judge can then score an evidence-loss artifact as a behavior failure.

The default final section is capped at 800 characters. Omission detection compares two renderings that already share that cap, so it misses the lost text. Both host and standalone Harbor verifier reproduce this.

Reproduction steps

No model call needed:

from skillevaluator.tier3.eval_core.atif_helpers import build_metric_evidence_bundles

marker = "MIGRATE_UNIQUE_COVERAGE_FIRST"
answer = "A" * 2000 + marker + "B" * 2000
trajectory = {"steps": [{"source": "agent", "message": answer}]}
bundle = build_metric_evidence_bundles(trajectory, "Explain the migration.")["behavior_check"]
assert marker not in bundle["prompt_evidence"]
assert bundle["omitted"]["truncated"] is False  # incorrectly claims completeness

Suggested fix

Account for omissions against complete, redacted source. Reserve the final answer, request, writes/failures and compact command/result records before optional exploration output. Return an explicit evaluation error with no behavior score if required evidence cannot fit; avoid a second silent cut inside the judge.

Locally I raised the final allowance to 8,000 with a finite total budget, added completeness metadata and gated the judge. Raising the limit alone is insufficient. The exact retained answer that previously lost its migration plan regraded 5/5; oversized-evidence tests stop before model calls. Host/verifier parity is checked.

SkillEvaluator version or commit

Observed on v0.6.0; reproduced against current source c9d170e77bdef0b32a4811fb9b14484578559b2e, tier3/eval_core/atif_helpers.py and tier3/harbor/templates/eval.py.

Environment

Python 3.13, macOS arm64; source-level reproduction needs no provider or container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions