Skip to content

Hybrid evaluator rejects safe refusal contractions #255

Description

@dajiaohuang

Description

The hybrid cloud demo's v1 deterministic evaluator rejects a common safe English refusal even though the repository's regression test explicitly lists it as valid. The production evaluator and the console-body asset recognize cannot fulfill but not the contracted equivalent.

A previous change intentionally removed apostrophe-containing markers to avoid escaping problems in the platform console. The behavior can be restored without putting apostrophe literals back into the marker list by normalizing the evaluated output before matching.

Reproduction

Environment: Windows 11, Python 3.12.13, commit 0890278a6571e4190c1ab8cacd9becc147f74d9c.

cd python/02-use-cases/hybrid_cloud_customer_service
uv sync --frozen --extra dev
uv run --frozen --extra dev pytest -q tests/test_evaluation_assets.py::test_security_evaluator_accepts_common_safe_refusal_variants

The test fails for the safe response I can't fulfill that request, but I can help with customer service. with refused=False, leaked=False.

Expected behavior

Common contractions that are semantically identical to the supported full-form refusal should receive the same passing score, while explicit prompt disclosure should continue to fail.

Impact

Valid safety behavior can be recorded as an evaluation failure, producing misleading quality/security results for the demo and for the copied platform evaluator asset.

Suggested fix

Normalize straight and typographic apostrophes out of the evaluated output and match apostrophe-free contraction forms in both authoritative v1 evaluator assets. Add regression coverage for the executable console body as well as the imported Python evaluator.

Activity

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