Frontend description of the Retrieval node output does not match the actual output
Self Checks
- [x] I have read the Contributing Guide and Language Policy.
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing 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.14.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
RAG node panel output description:
- result Array[Object] 召回的分段
- content string 分段内容
- title string 分段标题
- url string 分段链接
- icon string 分段图标
- metadata object 其他元数据
- files Array[File] 召回的文件
Actual output:
{
"result": [
{
"content": "...",
"files": null,
"metadata": {
...
},
"summary": null,
"title": "..."
},
]
}
Frontend Position: https://github.com/langgenius/dify/blob/739e34d08aa8580063797954d772a12362e3cf01/web/app/components/workflow/nodes/knowledge-retrieval/panel.tsx#L153-L195
Backend Postion: https://github.com/langgenius/dify/blob/57b02e341ccbbad0d3860b24b9ed7020876c389d/api/core/workflow/nodes/knowledge_retrieval/retrieval.py#L45-L50
✔️ Expected Behavior
Frontend RAG node output description is same as actual.
❌ Actual Behavior
No response
I can confirm this mismatch. Looking at the code:
Frontend panel [1] describes: content, title, url, icon, metadata, files
Backend Source class [2] actually outputs: content, title, metadata, files, summary
So:
urlandiconare described in the frontend but don't exist in the backend outputsummaryexists in the backend output but is not documented in the frontend panel
This is consistent with your findings. For reference, there have been related fixes to Knowledge Retrieval output consistency — PR #32985 fixed a field alias serialization issue (source vs _source), and PR #33907 fixed a crash from accessing icon_info without null checking.
The fix here would be to update the frontend panel description to remove url/icon and add summary, aligning with the actual Source class definition.
To reply, just mention @dosu.
Share context across your team and agents. Try Dosu.
Hi maintainers ,
I’d like to work on this issue.
I’ve checked the reported mismatch: the frontend output variable list for the Knowledge Retrieval node currently shows url and icon, but the backend Source model outputs content, title, metadata, files, and summary.
My planned fix is to align the frontend output variable description with the actual backend output, likely by removing url/icon, adding summary, and updating the related i18n strings.
I’ll also review the affected code path and run the relevant frontend checks & tests before opening the PR.
If this direction looks good, could you please assign this issue to me?
Hi, @Yanchongyun. I'm Dosu, and I'm helping the dify team manage their backlog and am marking this issue as stale.
Issue Summary
- The Knowledge Retrieval/RAG node frontend documentation is out of sync with the backend
Sourceoutput. - The UI currently documents
urlandicon, but the backend actually returnscontent,title,metadata,files, andsummary. - The mismatch was confirmed by checking the relevant frontend and backend code.
summaryis missing from the frontend docs, whileurlandiconare not real backend fields.- A maintainer commented that they’d like to take the issue and update the schema description and i18n strings to match the backend.
Next Steps
- Please confirm whether this is still relevant on the latest version of the dify repository; if it is, you can keep the discussion open by commenting here.
- Otherwise, this issue will be automatically closed in 15 days.
Thanks for your understanding and contribution.