fix(instructions): add CJK context detection for Chinese/Japanese/Korean conversations#335
Open
lg320531124 wants to merge 1 commit into
Open
fix(instructions): add CJK context detection for Chinese/Japanese/Korean conversations#335lg320531124 wants to merge 1 commit into
lg320531124 wants to merge 1 commit into
Conversation
Author
|
Gentle ping — open ~2 days. Small, focused fix (+22/-6): adds CJK context detection so Chinese/Japanese/Korean conversations aren't mangled by compression heuristics tuned for Latin text. No CI gating; ready when you have a moment. |
…ean conversations Ponytail's style rules are English-centric. In CJK contexts: - 'Drop articles' is misleading (Chinese has no articles) - 'Short synonyms' only works in English - Output brevity needs CJK-specific guidance Now detects CJK characters in user input and appends a CJK Context section that: - Warns not to strip English articles in mixed CJK text - Notes short synonyms are English-only - Adds Chinese brevity guidance (简短回答,不用敬语) - Confirms code rules (YAGNI, stdlib first) are language-agnostic Mirrors the approach in caveman PR #576 for CJK handling. Fixes DietrichGebert#333
b00d63d to
be833bd
Compare
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.
Problem
Ponytail's style rules are designed for English-only conversations. In CJK (Chinese/Japanese/Korean) contexts:
Fix
Add CJK detection to
getPonytailInstructions(). When CJK characters are detected in user input, append a CJK Context section:This mirrors the approach in caveman PR #576 which adds CJK detection to the compression engine.
The
inputTextparameter togetPonytailInstructions()is optional — when not provided, behavior is unchanged (backward compatible).Fixes #333