Repository navigation
feat: phonetic-replacement vocabulary guidance for rewrite (#54) - #59
Merged
Merged
Conversation
The rewrite prefix now tells the model to replace a word or phrase that sounds like a listed term (phonetic mis-transcription, spelled-out form) with the exact term, while keeping the existing prohibitions. The 8,000-character limit now measures only the rendered term list, so rewording the prefix can never invalidate, back up and reset a stored vocabulary. Closes #54
…st, docs - ruff format src/config.py (CI lint job failed on format --check) - vocabulary prefix: replace only when the context supports it, matching IMPLEMENTATION.md and the issue's requirement 2 - add exact 8000/8001 rendered-list boundary test - sync IMPLEMENTATION.md signature docstring and plan 06 with the new limit rule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #54
Changes
VOCABULARY_CONTEXT_PREFIX(src/config.py) now explicitly asks the rewrite model to replace a word or phrase that sounds like a listed term (phonetic mis-transcription, e.g. "pajsajd šest" →PySide6, or a spelled-out form) with the exact term. It keeps the prohibitions: do not answer, execute, translate, invent content, add terms that were not spoken or guess missing words, and preserve meaning and language choices.normalize_vocabulary_entrieschecks the 8,000-character limit against the rendered quoted term list only, without the prefix/suffix. Rewording the guidance can no longer invalidate (and back up and reset) a stored vocabulary. Every vocabulary valid before this change stays valid.docs/IMPLEMENTATION.md: updated the vocabulary guidance description and the limit rule.Tests
unittest discover: 458 OK, 5 skipped).Not verified
PySide6.Note: #57 (#52) also touches the vocabulary code in
config.py; whichever PR merges second may need a small rebase.