1
0
Fork 0
mirror of https://github.com/p-e-w/heretic.git synced 2026-12-03 18:42:57 +07:00

[PR #45] [MERGED] Guard against refusals in broken English #253

Closed
opened 2026-11-01 04:19:15 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/p-e-w/heretic/pull/45
Author: @spikymoth
Created: 11/24/2025
Status: ✅ Merged
Merged: 11/26/2025
Merged by: @p-e-w

Base: master ← Head: detect-broken-english


📝 Commits (2)

  • cd88684 Guard against refusals in broken English
  • 9acbad6 Normalize whitespace between words

📊 Changes

3 files changed (+27 additions, -4 deletions)

View changed files

📝 config.default.toml (+12 -2)
📝 src/heretic/config.py (+12 -2)
📝 src/heretic/evaluator.py (+3 -0)

📄 Description

While chatting with an abliterated model I noticed that it would sometimes omit the t in contractions like won't, can't etc., turning them into won', can' and so on. I think what's happening is that in some of the trials, it stops producing the ts and this causes the refusals to not be detected as refusals, boosting the score.

This change adds a bunch of broken English variants to the default refusal markers to catch this behavior. I added the ones that seem somewhat likely to happen, but let me know if I was too thorough. Technically "wont" and "cant" are valid English words, but they're pretty rare and I wouldn't normally expect them to come up near the start of a response.

We could go further and use a tool that uses the Levenshtein distance or does some other form of fuzzy matching, but that would require some careful tuning to avoid matching too much.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/p-e-w/heretic/pull/45 **Author:** [@spikymoth](https://github.com/spikymoth) **Created:** 11/24/2025 **Status:** ✅ Merged **Merged:** 11/26/2025 **Merged by:** [@p-e-w](https://github.com/p-e-w) **Base:** `master` ← **Head:** `detect-broken-english` --- ### 📝 Commits (2) - [`cd88684`](https://github.com/p-e-w/heretic/commit/cd886842617f6a235711bc30a1b588191c0e116d) Guard against refusals in broken English - [`9acbad6`](https://github.com/p-e-w/heretic/commit/9acbad6790ab108c52f069a0d678410ee4e26f87) Normalize whitespace between words ### 📊 Changes **3 files changed** (+27 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `config.default.toml` (+12 -2) 📝 `src/heretic/config.py` (+12 -2) 📝 `src/heretic/evaluator.py` (+3 -0) </details> ### 📄 Description While chatting with an abliterated model I noticed that it would sometimes omit the `t` in contractions like `won't`, `can't` etc., turning them into `won'`, `can'` and so on. I think what's happening is that in some of the trials, it stops producing the `t`s and this causes the refusals to not be detected as refusals, boosting the score. This change adds a bunch of broken English variants to the default refusal markers to catch this behavior. I added the ones that seem somewhat likely to happen, but let me know if I was too thorough. Technically "wont" and "cant" are valid English words, but they're pretty rare and I wouldn't normally expect them to come up near the start of a response. We could go further and use a tool that uses the Levenshtein distance or does some other form of fuzzy matching, but that would require some careful tuning to avoid matching too much. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 04:19:15 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
p-e-w/heretic#253
No description provided.