fix: harden Korean-only output lock (front+end, explicit script ban)
qwen2.5:7b leaked Chinese/Cyrillic mid-reply despite the OUTPUT_LANGUAGE lock, which was buried mid-prompt. Repeat the lock at the END of the system prompt (recency) and ban specific foreign scripts explicitly.
This commit is contained in:
@@ -133,8 +133,12 @@ def output_language_directive(language: Optional[str]) -> Optional[str]:
|
||||
f"CRITICAL OUTPUT RULE: write your ENTIRE reply only in {lang}. Even if "
|
||||
f"the user writes in English or any other language, you must still reply "
|
||||
f"only in {lang}. This rule overrides every other instruction about "
|
||||
f"matching or using the user's language. Never mix in words, characters, "
|
||||
f"or punctuation from any other language or script."
|
||||
f"matching or using the user's language. Do NOT output a single Chinese/"
|
||||
f"Hanja character, Japanese kana, Cyrillic letter, Arabic letter, or any "
|
||||
f"other non-{lang} script anywhere in the reply — not even one word or "
|
||||
f"clause. If a {lang} word exists, use it; never substitute or append a "
|
||||
f"foreign-language equivalent. (Numerals and unavoidable proper-noun "
|
||||
f"brand names are fine.)"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user