Skip to content

[good first issue] fix(scene): adapt memory prompts to dialogue language#147

Open
sirenexcelsior wants to merge 1 commit into
TencentCloud:mainfrom
sirenexcelsior:fix-122-language-adaptive-prompts
Open

[good first issue] fix(scene): adapt memory prompts to dialogue language#147
sirenexcelsior wants to merge 1 commit into
TencentCloud:mainfrom
sirenexcelsior:fix-122-language-adaptive-prompts

Conversation

@sirenexcelsior
Copy link
Copy Markdown
Contributor

@sirenexcelsior sirenexcelsior commented Jun 4, 2026

Summary

Closes #122.

This PR removes hardcoded Chinese output headings from the scene/persona prompt templates and replaces them with an explicit dialogue-language contract.

What changed

  • Added a scene extraction output language contract for scene file names, Markdown headings, and body text.
  • Replaced copyable Chinese scene section headings with English fallback headings.
  • Added an English-memory rule requiring English memory titles and English section headings.
  • Updated persona generation headings to avoid reintroducing Chinese headings into persona.md for non-Chinese scene content.
  • Aligned the filename normalizer comments and prompt filename guidance around Unicode letters for multilingual filenames.

Root cause

The scene extraction template included hardcoded Chinese Markdown section headings. LLMs may copy those headings into persisted scene/persona memory files even when the dialogue language is English, German, Russian, French, or another non-Chinese language.

Validation

  • Static search for the target Chinese output headings in prompt source files returned no matches.
  • npm run build passed.
  • Manual LLM smoke tests with deepseek-v4-flash passed for English, German, Russian, and French scene extraction prompts: no Chinese heading leakage and no unintended English fallback headings for non-English cases.

@Maxwell-Code07 Maxwell-Code07 changed the title fix(scene): adapt memory prompts to dialogue language [good first issue] fix(scene): adapt memory prompts to dialogue language Jun 4, 2026
@Maxwell-Code07
Copy link
Copy Markdown
Collaborator

Thank you for participating in our good first issue event, we will complete the review internally as soon as possible!

@Maxwell-Code07 Maxwell-Code07 added the good first issue Good for newcomers label Jun 4, 2026
@sirenexcelsior sirenexcelsior marked this pull request as ready for review June 4, 2026 16:32
Signed-off-by: Siren.W <sirenexcelsior@gmail.com>
@sirenexcelsior sirenexcelsior force-pushed the fix-122-language-adaptive-prompts branch from 3965c99 to 049357b Compare June 5, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[good first issue]🎯 [Bug] Hardcoded Chinese Headers in Persona/Scene Extraction Prompts Cause Language Leakage

2 participants