Dify LLM Node (DeepSeek-V3.1、V3.2): Unintended Irrelevant Output #20999

Closed
opened 2026-02-21 20:10:12 -05:00 by yindo · 2 comments
Owner

Originally created by @caocaort on GitHub (Dec 12, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.0.0、1.9.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

deepseek V3.1、V3.2 .

The system prompt clearly requires "Directly output 1" (only a single character output), but the actual output is completely irrelevant to the prompt—it’s a lengthy analysis text about "the sequence of the sum of squares of each digit of a function." The content deviates from the prompt’s intent, resulting in chaotic output that fails to follow the prompt constraints. This issue does not occur on other platforms.

  1. Create a workflow in Dify and add an LLM node
  2. Select the model "deepseek-ai/DeepSeek-V3"
  3. Input the SYSTEM prompt: "Directly output 1"
  4. Execute the workflow

✔️ Expected Behavior

<html> The LLM node should output the content "1" --  


</html>

Actual Behavior

<html>
It outputs a long text analysis about "the sequence of the sum of squares of each digit of a function" (as shown in the screenshot), which deviates from the prompt’s requirement -- Image Image

</html>
Originally created by @caocaort on GitHub (Dec 12, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.0.0、1.9.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce deepseek V3.1、V3.2 . The system prompt clearly requires "Directly output 1" (only a single character output), but the actual output is completely irrelevant to the prompt—it’s a lengthy analysis text about "the sequence of the sum of squares of each digit of a function." The content deviates from the prompt’s intent, resulting in chaotic output that fails to follow the prompt constraints. This issue does not occur on other platforms. 1. Create a workflow in Dify and add an LLM node 2. Select the model "deepseek-ai/DeepSeek-V3" 3. Input the SYSTEM prompt: "Directly output 1" 4. Execute the workflow ### ✔️ Expected Behavior <html> <body> <!--StartFragment--> The LLM node should output the content "1" --   <br class="Apple-interchange-newline"><!--EndFragment--> </body> </html> ### ❌ Actual Behavior <html> <body> <!--StartFragment--><div class="auto-hide-last-sibling-br mdbox-table-root table-container-cYf_5N" data-scroll-inline-overflow="true" data-scroll-inline-at-start="true" data-scroll-inline-start-overflow="false" data-scroll-inline-at-end="false" data-scroll-inline-end-overflow="true" style="outline: none; -webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); border: 0px solid; margin: 0px 0px 8px; padding: 0px; --desktop-home-page-background-color: #f4f4f4; --desktop-home-card-background-color: #fdfdfd; --desktop-home-card-background-color-hover: #fff; --desktop-home-popup-background-color: #f6f5f5; max-width: 100%; width: fit-content; overflow-anchor: auto; color: rgb(0, 0, 0); font-family: Inter, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div class="table-scroll-container-Gyf4hQ mdbox-table-scroll-container" style="outline: none; -webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); border: 0px solid; margin: 0px; padding: 0px; --desktop-home-page-background-color: #f4f4f4; --desktop-home-card-background-color: #fdfdfd; --desktop-home-card-background-color-hover: #fff; --desktop-home-popup-background-color: #f6f5f5; max-width: 100%; width: fit-content; overflow: auto; scrollbar-color: rgb(204, 204, 204) rgba(0, 0, 0, 0); overflow-anchor: auto;"> It outputs a long text analysis about "the sequence of the sum of squares of each digit of a function" (as shown in the screenshot), which deviates from the prompt’s requirement -- <img width="1315" height="913" alt="Image" src="https://github.com/user-attachments/assets/1cd0d58e-c4f9-4751-b6cc-414c0fefad8b" /> <img width="1666" height="947" alt="Image" src="https://github.com/user-attachments/assets/7865e27e-b4dc-4be8-9c5f-f10a5c83da18" /> </div></div><div class="container-Uxvbjy md-box-line-break wrapper-GYqxgQ undefined" style="outline: none; -webkit-font-smoothing: antialiased; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); border: 0px solid; margin: 20px 0px 0px; padding: 0px; --desktop-home-page-background-color: #f4f4f4; --desktop-home-card-background-color: #fdfdfd; --desktop-home-card-background-color-hover: #fff; --desktop-home-popup-background-color: #f6f5f5; display: block; user-select: none; visibility: hidden; overflow-anchor: auto; color: rgb(0, 0, 0); font-family: Inter, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"></div><br class="Apple-interchange-newline"><!--EndFragment--> </body> </html>
yindo added the 🐞 bug label 2026-02-21 20:10:12 -05:00
yindo closed this issue 2026-02-21 20:10:12 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 12, 2025):

Hi @caocaort! I'm Dosu and I’m helping the dify team.

This is a known issue with DeepSeek models in Dify: prompt adherence can fail, especially for simple instructions like "Directly output 1", resulting in irrelevant or verbose outputs instead of the expected response. This behavior is not unique to your setup—other users have reported similar problems with DeepSeek models not following prompt constraints or ignoring system prompts in Dify workflows. Some DeepSeek models (like R1) do not support a separate "system" role, and combining system and user prompts into a single user prompt sometimes improves adherence. There is no DeepSeek-specific prompt transformation in Dify; prompt handling is generic, but if structured output mode is enabled, Dify may rewrite the system prompt or inject schema instructions, which can alter the prompt before it reaches the model and cause unexpected outputs example.

Workarounds include: combining system and user prompts, experimenting with model parameters (temperature, max_tokens), and switching to a non-reasoning model version if available example. If the issue persists, try disabling structured output mode and test with a minimal workflow to isolate the problem. There are no recent fixes or documentation updates addressing this specific bug, so monitoring for future updates is recommended.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 12, 2025): <!-- Greeting --> Hi @caocaort! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify team. <!-- Answer --> This is a known issue with DeepSeek models in Dify: prompt adherence can fail, especially for simple instructions like "Directly output 1", resulting in irrelevant or verbose outputs instead of the expected response. This behavior is not unique to your setup—other users have reported similar problems with DeepSeek models not following prompt constraints or ignoring system prompts in Dify workflows. Some DeepSeek models (like R1) do not support a separate "system" role, and combining system and user prompts into a single user prompt sometimes improves adherence. There is no DeepSeek-specific prompt transformation in Dify; prompt handling is generic, but if structured output mode is enabled, Dify may rewrite the system prompt or inject schema instructions, which can alter the prompt before it reaches the model and cause unexpected outputs [example](https://github.com/langgenius/dify/issues/14234). Workarounds include: combining system and user prompts, experimenting with model parameters (temperature, max_tokens), and switching to a non-reasoning model version if available [example](https://github.com/langgenius/dify/issues/14630). If the issue persists, try disabling structured output mode and test with a minimal workflow to isolate the problem. There are no recent fixes or documentation updates addressing this specific bug, so monitoring for future updates is recommended. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/9e831bc4-674c-46c9-b8a7-c18ec48dcf9d?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/9e831bc4-674c-46c9-b8a7-c18ec48dcf9d?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/9e831bc4-674c-46c9-b8a7-c18ec48dcf9d?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/9e831bc4-674c-46c9-b8a7-c18ec48dcf9d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9e831bc4-674c-46c9-b8a7-c18ec48dcf9d?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/9e831bc4-674c-46c9-b8a7-c18ec48dcf9d?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/9e831bc4-674c-46c9-b8a7-c18ec48dcf9d?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20known%20issue%20with%20DeepSeek%20models%20in%20Dify%3A%20prompt%20adherence%20can%20fail%2C%20especially%20for%20simple%20instructions%20like%20%22Directly%20output%201%22%2C%20resulting%20in%20irrelevant%20or%20verbose%20outputs%20instead%20of%20the%20expected%20response.%20This%20behavior%20is%20not%20unique%20to%20your%20setup%E2%80%94other%20users%20have%20reported%20similar%20problems%20with%20DeepSeek%20models%20not%20following%20prompt%20constraints%20or%20ignoring%20system%20prompts%20in%20Dify%20workflows.%20Some%20DeepSeek%20models%20%28like%20R1%29%20do%20not%20support%20a%20separate%20%22system%22%20role%2C%20and%20combining%20system%20and%20user%20prompts%20into%20a%20single%20user%20prompt%20sometimes%20improves%20adherence.%20There%20is%20no%20DeepSeek-specific%20prompt%20transformation%20in%20Dify%3B%20prompt%20handling%20is%20generic%2C%20but%20if%20structured%20output%20mode%20is%20enabled%2C%20Dify%20may%20rewrite%20the%20system%20prompt%20or%20inject%20schema%20instructions%2C%20which%20can%20alter%20the%20prompt%20before%20it%20reaches%20the%20model%20and%20cause%20unexpected%20outputs%C2%A0%5Bexample%5D%28https%3A//github.com/langgenius/dify/issues/14234%29.%0A%0AWorkarounds%20include%3A%20combining%20system%20and%20user%20prompts%2C%20experimenting%20with%20model%20parameters%20%28temperature%2C%20max_tokens%29%2C%20and%20switching%20to%20a%20non-reasoning%20model%20version%20if%20available%C2%A0%5Bexample%5D%28https%3A//github.com/langgenius/dify/issues/14630%29.%20If%20the%20issue%20persists%2C%20try%20disabling%20structured%20output%20mode%20and%20test%20with%20a%20minimal%20workflow%20to%20isolate%20the%20problem.%20There%20are%20no%20recent%20fixes%20or%20documentation%20updates%20addressing%20this%20specific%20bug%2C%20so%20monitoring%20for%20future%20updates%20is%20recommended.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/29561)
Author
Owner

@crazywoola commented on GitHub (Dec 12, 2025):

Issues related to the plugin should not be submitted to this repo.

@crazywoola commented on GitHub (Dec 12, 2025): Issues related to the plugin should not be submitted to this repo.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20999