Skip to content

fix(hybrid): accept refusal contractions in evaluator - #256

Open
dajiaohuang wants to merge 1 commit into
bytedance:mainfrom
dajiaohuang:fix/255-evaluator-refusal-contractions
Open

fix(hybrid): accept refusal contractions in evaluator#256
dajiaohuang wants to merge 1 commit into
bytedance:mainfrom
dajiaohuang:fix/255-evaluator-refusal-contractions

Conversation

@dajiaohuang

Copy link
Copy Markdown

Summary

  • normalize straight and typographic apostrophes before matching refusal phrases
  • restore common contraction forms without embedding apostrophes in the platform evaluator assets
  • run the safe-refusal regression variants against both the Python v1 evaluator and the console-body copy

Fixes #255

PR #249 also touches the two evaluator assets, but its current patch does not cover this failing regression.

Tests

  • $env:PYTHONUTF8='1'; uv run --frozen --extra dev pytest -q tests/test_evaluation_assets.py (4 passed)
  • $env:PYTHONUTF8='1'; uv run --frozen --extra dev pytest -q (75 passed, 3 failed because this Windows host has no usable Bash/WSL execution for the shell-script tests)
  • uvx pre-commit run --show-diff-on-failure --color=never --files python/02-use-cases/hybrid_cloud_customer_service/evaluation/runtime_deterministic_checks_v1.py python/02-use-cases/hybrid_cloud_customer_service/evaluation/runtime_deterministic_checks_v1_console_body.txt python/02-use-cases/hybrid_cloud_customer_service/tests/test_evaluation_assets.py

@dajiaohuang
dajiaohuang force-pushed the fix/255-evaluator-refusal-contractions branch from df87a4c to 346f5d2 Compare August 29, 2026 13:01
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.

Hybrid evaluator rejects safe refusal contractions

1 participant