Skip to content

问题描述: 在多语言(特别是中文)开发环境下,即便在 Global Rules / System Instructions 中明确要求使用全中文思考链路(Strict Chinese Chain of Thought),模型在 <thought> 推理块中仍频繁退化为全英文思考 #222

Description

@pai-pixel

Problem Statement

Describe the problem this feature would solve.
Title: [Bug & Feature Request] Native Support for Reasoning Language & Strict Multilingual CoT (Preventing English Priming in Thinking Blocks)

Component: Antigravity IDE / Antigravity 2.0 / Agent Reasoning Engine
Severity: Medium (UX / Multilingual Developer Experience)

--- Description (中文说明) ---
问题描述:
在多语言(特别是中文)开发环境下,即便在 Global Rules / System Instructions 中明确要求使用全中文思考链路(Strict Chinese Chain of Thought),模型在 推理块中仍频繁退化为全英文思考。

根本原因分析:

  1. 语言启动偏置(Language Priming):系统级注入的英文 System Prompt 以及工具回传(终端输出、代码、API 响应)严重污染了 Attention 权重,导致首词预测偏向英文。
  2. 缺少采样级约束:当前系统仅依赖 Prompt 软约束,缺乏类似 reasoning_language 的强制解码前缀或采样约束。
  3. UI 状态条本地化缺失:Thinking 折叠组件与工具调用状态显示缺乏多语言本地化配置。

诉求与建议(Feature Request):

  1. 建议在 Settings 中提供 原生思考语言配置(e.g., "reasoningLanguage": "follow_ui" | "zh" | "en")。
  2. 在底座推理的 标签起始处,支持根据用户配置自动注入语言锚点(Prefix Injection),压制英文偏置。
  3. 优化上下文管理,降低系统级英文 Prompt 与工具输出对思考链语言的负面干扰。

--- English Version for Google Engineering Team ---
Issue Summary:
In non-English (specifically Chinese) programming environments, the reasoning model frequently defaults back to English within the (Chain of Thought) block, despite explicit and strict system instructions / global rules enforcing Chinese reasoning.

Root Cause Analysis:

  1. Contextual Priming: The heavy presence of English in base system instructions, MCP schemas, and tool outputs (compiler logs, stdout/stderr, docs) introduces a strong English priming bias into the attention window.
  2. Lack of Decoding-Level Constraint: Relying solely on soft prompt guidance fails against the model's base RLHF distribution. There is no decoding-level enforcement (such as prefix forcing or logit biasing) for reasoning tokens.
  3. UI Localization Gaps: The Thinking accordion and tool action displays lack seamless locale-aware integration.

Requested Features / Solutions:

  1. Dedicated Reasoning Language Setting: Introduce an explicit configuration option (e.g., agent.reasoningLanguage: "zh" | "auto" | "en").
  2. First-Token / Anchor Forcing: Allow the engine to inject an initial native-language thought anchor immediately after <thought> to guide subsequent token probability.
  3. Decouple System Prompt Priming: Mitigate the English priming effect introduced by underlying runtime injection.

Proposed Solution

Describe the solution you'd like.

Alternatives Considered

Any alternative approaches you've considered.

Additional Context

Any other relevant information.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions