Skip to content

fix: distinguish simplified and traditional chinese prompts#568

Open
qinxuye wants to merge 2 commits into
xorbitsai:mainfrom
qinxuye:fix/chinese-script-language
Open

fix: distinguish simplified and traditional chinese prompts#568
qinxuye wants to merge 2 commits into
xorbitsai:mainfrom
qinxuye:fix/chinese-script-language

Conversation

@qinxuye
Copy link
Copy Markdown
Contributor

@qinxuye qinxuye commented May 29, 2026

Summary

  • clarify language prompts so Chinese requests preserve Simplified vs Traditional script
  • update Auto and DAG response_language schema examples to use Simplified Chinese / Traditional Chinese instead of generic Chinese
  • add tests covering the prompt/schema wording

Tests

  • ruff check src/xagent/core/agent/language.py src/xagent/core/agent/pattern/auto/auto.py src/xagent/core/agent/pattern/dag/plan_generator.py tests/core/agent/test_context.py tests/core/agent/test_auto.py tests/core/agent/test_dag.py
  • PYTHONPATH=src pytest tests/core/agent/test_context.py tests/core/agent/test_auto.py tests/core/agent/test_dag.py

@XprobeBot XprobeBot added the bug Something isn't working label May 29, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the language policies, prompts, and tool schemas across the agent core to explicitly distinguish between Simplified Chinese and Traditional Chinese, preventing them from being collapsed into generic Chinese. Unit tests are also updated to verify these new language rules. The review feedback suggests refining the prompt in language.py to handle cases where generic Chinese is specified by falling back to the script of the user request to avoid LLM confusion.

Comment thread src/xagent/core/agent/language.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants