Inconsistent Output Formatting in Dify Agent When Using DeepSeek-R1 LLM #11168

Closed
opened 2026-02-21 18:56:19 -05:00 by yindo · 0 comments
Owner

Originally created by @CoquiLee on GitHub (Mar 15, 2025).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.0.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Configure a Dify agent with the DeepSeek-R1 model.

  2. Send the exact query:

Convert the following information into a format that can be directly copied into Excel:

Shipping Marks	ITEM	"DESCRIPTION & PART NO.
 ""  D.Y.  "" BRAND "" SPARE PART FOR  EXCAVATOR"			Q'ty	WEIGHT	TOTAL	 PRICE ( USD )	"Total   Amount
(USD)"	
					(PCS/SETS)	(Kg)	WEIGHT			
"C.R.H.E
BANGKOK
NO 1.&UP
MADE IN CHINA"								FOB  XIAMEN,CHINA		商编
	1	20Y-32-11390	TRACK SHOE 190*10*800	PC200-5	450	20.2	9090	105	 47,250.00 	8431.49
	2	9W9351	TRACK SHOE 190*10*800	CAT320	650	20.2	13130	105	 68,250.00 	8431.49
	3	2424 N 240D2	TRACK SHOE 171*8*700	SK120	250	11.9	2975	73	 18,250.00 	8431.49
	4	2022495	TRACK SHOE 175*8*800	EX200-1	150	16	2400	95	 14,250.00 	8431.49
									 -   	
TOTAL					1500		27595	FOB	 148,000.00 	
					FREIGHT CHARGE				4400.00 	
					INSURANCE				350.00 	
										
					CIF:BANGKOK				152750.00
  1. Observe the returned format from Dify.

✔️ Expected Behavior

Shipping Marks	ITEM	DESCRIPTION & PART NO. "D.Y." BRAND "SPARE PART FOR EXCAVATOR"	Q'ty (PCS/SETS)	WEIGHT (Kg)	TOTAL WEIGHT	PRICE (USD)	Total Amount (USD)	商编
C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA	1	20Y-32-11390 TRACK SHOE 190*10*800 PC200-5	450	20.2	9090	105	47,250.00	8431.49
C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA	2	9W9351 TRACK SHOE 190*10*800 CAT320	650	20.2	13130	105	68,250.00	8431.49
C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA	3	2424 N 240D2 TRACK SHOE 171*8*700 SK120	250	11.9	2975	73	18,250.00	8431.49
C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA	4	2022495 TRACK SHOE 175*8*800 EX200-1	150	16	2400	95	14,250.00	8431.49
										
TOTAL				1500		27595	FOB XIAMEN,CHINA	148,000.00	
FREIGHT CHARGE								4,400.00	
INSURANCE								350.00	
CIF:BANGKOK								152,750.00

Columns should be separated by tabs (not commas).
Numeric values (e.g., "47,250.00") should avoid commas to ensure Excel compatibility.
Consistent alignment with responses from ChatGPT/Chatbox (e.g., clean tab-delimited output with numeric values formatted as 47250.00).

Actual Behavior

Action:
Shipping Marks,ITEM,DESCRIPTION & PART NO.,Q'ty,WEIGHT,TOTAL WEIGHT,PRICE (USD),Total Amount (USD)
C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA,1,20Y-32-11390 TRACK SHOE 19010800 PC200-5,450,20.2,9090,105,"47,250.00"
C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA,2,9W9351 TRACK SHOE 19010800 CAT320,650,20.2,13130,105,"68,250.00"
C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA,3,2424 N 240D2 TRACK SHOE 1718700 SK120,250,11.9,2975,73,"18,250.00"
C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA,4,2022495 TRACK SHOE 1758800 EX200-1,150,16,2400,95,"14,250.00"
TOTAL,,,1500,,27595,FOB,"148,000.00"
FREIGHT CHARGE,,,,,,,"4,400.00"
INSURANCE,,,,,,,"350.00"
CIF:BANGKOK,,,,,,,"152,750.00"
Originally created by @CoquiLee on GitHub (Mar 15, 2025). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.0.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Configure a Dify agent with the DeepSeek-R1 model. 2. Send the exact query: ``` Convert the following information into a format that can be directly copied into Excel: Shipping Marks ITEM "DESCRIPTION & PART NO. "" D.Y. "" BRAND "" SPARE PART FOR EXCAVATOR" Q'ty WEIGHT TOTAL PRICE ( USD ) "Total Amount (USD)" (PCS/SETS) (Kg) WEIGHT "C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA" FOB XIAMEN,CHINA 商编 1 20Y-32-11390 TRACK SHOE 190*10*800 PC200-5 450 20.2 9090 105 47,250.00 8431.49 2 9W9351 TRACK SHOE 190*10*800 CAT320 650 20.2 13130 105 68,250.00 8431.49 3 2424 N 240D2 TRACK SHOE 171*8*700 SK120 250 11.9 2975 73 18,250.00 8431.49 4 2022495 TRACK SHOE 175*8*800 EX200-1 150 16 2400 95 14,250.00 8431.49 - TOTAL 1500 27595 FOB 148,000.00 FREIGHT CHARGE 4400.00 INSURANCE 350.00 CIF:BANGKOK 152750.00 ``` 3. Observe the returned format from Dify. ### ✔️ Expected Behavior ``` Shipping Marks ITEM DESCRIPTION & PART NO. "D.Y." BRAND "SPARE PART FOR EXCAVATOR" Q'ty (PCS/SETS) WEIGHT (Kg) TOTAL WEIGHT PRICE (USD) Total Amount (USD) 商编 C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA 1 20Y-32-11390 TRACK SHOE 190*10*800 PC200-5 450 20.2 9090 105 47,250.00 8431.49 C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA 2 9W9351 TRACK SHOE 190*10*800 CAT320 650 20.2 13130 105 68,250.00 8431.49 C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA 3 2424 N 240D2 TRACK SHOE 171*8*700 SK120 250 11.9 2975 73 18,250.00 8431.49 C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA 4 2022495 TRACK SHOE 175*8*800 EX200-1 150 16 2400 95 14,250.00 8431.49 TOTAL 1500 27595 FOB XIAMEN,CHINA 148,000.00 FREIGHT CHARGE 4,400.00 INSURANCE 350.00 CIF:BANGKOK 152,750.00 ``` Columns should be separated by tabs (not commas). Numeric values (e.g., "47,250.00") should avoid commas to ensure Excel compatibility. Consistent alignment with responses from ChatGPT/Chatbox (e.g., clean tab-delimited output with numeric values formatted as 47250.00). ### ❌ Actual Behavior ``` Action: Shipping Marks,ITEM,DESCRIPTION & PART NO.,Q'ty,WEIGHT,TOTAL WEIGHT,PRICE (USD),Total Amount (USD) C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA,1,20Y-32-11390 TRACK SHOE 19010800 PC200-5,450,20.2,9090,105,"47,250.00" C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA,2,9W9351 TRACK SHOE 19010800 CAT320,650,20.2,13130,105,"68,250.00" C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA,3,2424 N 240D2 TRACK SHOE 1718700 SK120,250,11.9,2975,73,"18,250.00" C.R.H.E BANGKOK NO 1.&UP MADE IN CHINA,4,2022495 TRACK SHOE 1758800 EX200-1,150,16,2400,95,"14,250.00" TOTAL,,,1500,,27595,FOB,"148,000.00" FREIGHT CHARGE,,,,,,,"4,400.00" INSURANCE,,,,,,,"350.00" CIF:BANGKOK,,,,,,,"152,750.00" ```
yindo added the 🐞 bug label 2026-02-21 18:56:19 -05:00
yindo closed this issue 2026-02-21 18:56:19 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#11168