[GH-ISSUE #533] think 思维链死循环问题 #421

Closed
opened 2026-10-26 21:21:05 +00:00 by bsakaguchi · 3 comments
Owner

Originally created by @MarsonShine on GitHub (Mar 4, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-R1/issues/533

我发现在调用 deepseek api 的时候,一直在等待服务器响应。
查看think思维链的结果,发现当它发现prompt里面的内容有些矛盾之处,它就会一直反复回到最初思考的点重新再次思考,如此反复。

我同时拿腾讯元宝的DeepSeek-R1和azure的DeepSeek-R1,同样如此。
下面是提示词,在下面这段提示词下,思维链一直在反复思考停止不下来,由于思维链的过程是算token的,这样会造成不必要的损失。


核心指令

现在你的任务是根据用户提供的知识点(核心句型),生成符合英国 Key Stage 1-2 教学标准的书面英语组合选择题。要求如下:

  1. 语言:英式英语(拼写、词汇、语法),禁止口语化表达。
  2. 结构:基于句型模板拆分出隐含的变量部分,生成两个逻辑关联的选项组。
  3. 输入依赖:题目必须完全基于用户提供的固定句型对生成(例如:Q: "What colour is it?" → A: "It's [颜色].")。

输入格式

用户将提供以下内容:

[知识点(句型模板)] 如:

-What colour is it/are they? -It's/They're+颜色.  

生成规则

请严格遵循以下规则生成组合选择题:

  1. 题干设计:基于知识点句型,转成疑问句。例如:

    示例:  
    输入句型: "-What colour is it/are they? -It's/They're+颜色.  "  
    输出题干: "-What colour is it?"
    
  2. 选项组设计:

    • 若句型只有一个变量(如颜色):

      • group1: 主变量选项(如颜色) ,固定3个选项。

      • group2: 固定补充项(如物品名称,仅用于语法完整性) ,固定四个选项。

        // 示例  
        "group1": ["red", "blue", "green"],  
        "group2": ["hat", "clothe", "skirt", "shoes"] 
        
    • 若句型需两个变量(如所有格+物品):

      • group1: 变量1(如所有格)
      • group2: 变量2(如物品)
  3. 答案逻辑:

    1. 若选择组合是唯一正确答案,则必须提供答案:

      // 示例:颜色+固定项  
      "answer": ["blue"],  
      
    2. 若组合都有效的,则答案留空(空数组),由业务逻辑判定:

      // 示例:任意组合都有效
      "answer": [],  
      

输出格式

以json格式输出:

案例1:多变量自由组合(无固定答案)

示例:必须是json格式
{  
  "knowledgepoint": "-What colour is it/are they? -It's/They're ..."
  "questionText": "What colour is it?",
  "group1": ["red", "blue", "green"],
  "group2": ["hat", "clothe", "skirt", "shoes"],  // 前端隐藏此组
  "answer": []
} 

案例2:唯一答案

示例:必须是json格式
{  
  "knowledgepoint": "-What colour is it/are they? -It's/They're+颜色."
  "questionText": "What colour is it?",
  "group1": ["red", "blue", "green"],
  "group2": ["hat", "clothe", "skirt", "shoes"],  // 前端隐藏此组  
  "answer": ["blue", "shoes"]
} 

知识点:They are ... .

Originally created by @MarsonShine on GitHub (Mar 4, 2025). Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-R1/issues/533 我发现在调用 deepseek api 的时候,一直在等待服务器响应。 查看think思维链的结果,发现当它发现prompt里面的内容有些矛盾之处,它就会一直反复回到最初思考的点重新再次思考,如此反复。 我同时拿腾讯元宝的DeepSeek-R1和azure的DeepSeek-R1,同样如此。 下面是提示词,在下面这段提示词下,思维链一直在反复思考停止不下来,由于思维链的过程是算token的,这样会造成不必要的损失。 ---------------------------------------------------------------------------------------------------------------------------------------------------- ### 核心指令 现在你的任务是根据用户提供的**知识点(核心句型)**,生成符合英国 Key Stage 1-2 教学标准的书面英语组合选择题。要求如下: 1. **语言**:英式英语(拼写、词汇、语法),禁止口语化表达。 2. **结构**:基于句型模板拆分出**隐含的变量部分**,生成两个逻辑关联的选项组。 3. **输入依赖**:题目必须完全基于用户提供的**固定句型对**生成(例如:Q: "What colour is it?" → A: "It's [颜色].")。 ### 输入格式 用户将提供以下内容: [知识点(句型模板)] 如: ``` -What colour is it/are they? -It's/They're+颜色. ``` ### 生成规则 请严格遵循以下规则生成组合选择题: 1. 题干设计:基于知识点句型,转成疑问句。例如: ``` 示例: 输入句型: "-What colour is it/are they? -It's/They're+颜色. " 输出题干: "-What colour is it?" ``` 2. 选项组设计: - 若句型只有一个变量(如颜色): - `group1`: 主变量选项(如颜色) ,固定3个选项。 - `group2`: 固定补充项(如物品名称,仅用于语法完整性) ,固定四个选项。 ``` // 示例 "group1": ["red", "blue", "green"], "group2": ["hat", "clothe", "skirt", "shoes"] ``` - 若句型需两个变量(如所有格+物品): - `group1`: 变量1(如所有格) - `group2`: 变量2(如物品) 3. 答案逻辑: 1. 若选择组合是唯一正确答案,则必须提供答案: ``` // 示例:颜色+固定项 "answer": ["blue"], ``` 2. 若组合都有效的,则答案留空(空数组),由业务逻辑判定: ``` // 示例:任意组合都有效 "answer": [], ``` ### 输出格式 以json格式输出: 案例1:多变量自由组合(无固定答案) ``` 示例:必须是json格式 { "knowledgepoint": "-What colour is it/are they? -It's/They're ..." "questionText": "What colour is it?", "group1": ["red", "blue", "green"], "group2": ["hat", "clothe", "skirt", "shoes"], // 前端隐藏此组 "answer": [] } ``` 案例2:唯一答案 ``` 示例:必须是json格式 { "knowledgepoint": "-What colour is it/are they? -It's/They're+颜色." "questionText": "What colour is it?", "group1": ["red", "blue", "green"], "group2": ["hat", "clothe", "skirt", "shoes"], // 前端隐藏此组 "answer": ["blue", "shoes"] } ``` 知识点:They are ... .
bsakaguchi 2026-10-26 21:21:05 +00:00
Author
Owner

@zhuqinghua commented on GitHub (Mar 23, 2025):

我让deepseek r1 32b int4模型设计一个排班,它就循环思考到地老天荒

<!-- gh-comment-id:2746060831 --> @zhuqinghua commented on GitHub (Mar 23, 2025): 我让deepseek r1 32b int4模型设计一个排班,它就循环思考到地老天荒
Author
Owner

@github-actions[bot] commented on GitHub (May 21, 2025):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this issue is still relevant, please leave a comment to keep it open. Thank you for your contributions!

<!-- gh-comment-id:2896104038 --> @github-actions[bot] commented on GitHub (May 21, 2025): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this issue is still relevant, please leave a comment to keep it open. Thank you for your contributions!
Author
Owner

@github-actions[bot] commented on GitHub (Jun 12, 2025):

false

<!-- gh-comment-id:2964592492 --> @github-actions[bot] commented on GitHub (Jun 12, 2025): false
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepSeek-R1#421
No description provided.