🐛 Bug Report: Citations & Attributions not displayed in Chatbot despite being enabled #22252

Open
opened 2026-02-21 20:16:19 -05:00 by yindo · 1 comment
Owner

Originally created by @pablomart on GitHub (Feb 19, 2026).

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.13.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Description

When the Citations & Attributions feature is enabled in the Chatbot configuration, the source references are not rendered in the chat interface. The answer is returned correctly, but the "Sources" section with the attributed document does not appear as expected.

Steps to Reproduce

  1. Go to your Chatbot application settings.
  2. Enable Citations & Attributions (Citas y Atribuciones) toggle.
  3. Ask a question that is answered using a knowledge base document.
  4. Observe the response — the answer is shown, but no citation/source section appears.

✔️ Expected Behavior

After enabling Citations & Attributions, the chatbot response should display the source document(s) used to generate the answer (e.g., Failure Mode and Effects Analysis (FMEA)_(HighLevelDoc-CAPStandard).pdf).

Actual Behavior

The "Sources" label and referenced document appear only in the internal/debug view (e.g., the preview panel), but not in the end-user chat interface.

Image Image

Additional Context

The feature toggle is clearly ON as shown in the settings panel. The knowledge base retrieval is working (answers are grounded in the document), but the citation rendering seems to be broken or not propagated to the frontend chat widget.

Originally created by @pablomart on GitHub (Feb 19, 2026). ### 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.13.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ### Description When the **Citations & Attributions** feature is enabled in the Chatbot configuration, the source references are **not rendered in the chat interface**. The answer is returned correctly, but the "Sources" section with the attributed document does not appear as expected. ### Steps to Reproduce 1. Go to your Chatbot application settings. 2. Enable **Citations & Attributions** (Citas y Atribuciones) toggle. 3. Ask a question that is answered using a knowledge base document. 4. Observe the response — the answer is shown, but **no citation/source section appears**. ### ✔️ Expected Behavior After enabling Citations & Attributions, the chatbot response should display the source document(s) used to generate the answer (e.g., `Failure Mode and Effects Analysis (FMEA)_(HighLevelDoc-CAPStandard).pdf`). ### ❌ Actual Behavior The "Sources" label and referenced document appear only in the **internal/debug view** (e.g., the preview panel), but **not in the end-user chat interface**. <img width="391" height="103" alt="Image" src="https://github.com/user-attachments/assets/87151d6f-4e63-425f-b9b5-ce0643edba02" /> <img width="1201" height="449" alt="Image" src="https://github.com/user-attachments/assets/0140e2af-6e17-4ac1-a351-c06a50f7898c" /> ### Additional Context The feature toggle is clearly ON as shown in the settings panel. The knowledge base retrieval is working (answers are grounded in the document), but the citation rendering seems to be broken or not propagated to the frontend chat widget.
yindo added the 🐞 bug label 2026-02-21 20:16:19 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 19, 2026):

This is a known issue affecting Dify versions through 1.13.0. The root cause is that debug/preview mode forces citations to be enabled through hardcoded logic, while the end-user chat interface relies on proper data persistence that wasn't working correctly.

Why it works in debug but not production:

Good news: Several fixes have been merged since 1.13.0:

  • PR #31573 (Jan 2026) - Most comprehensive fix for the citation data pipeline
  • PR #27405 - Fixed event handling for workflow citations
  • PR #27799 - Fixed citations being lost with multiple LLM nodes

Recommended action: Upgrade to a version newer than 1.13.0 that includes these fixes. If you're using a workflow-type application, this fix is especially important since workflows were more affected than chatbot-mode applications.

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 (Feb 19, 2026): <!-- Answer --> This is a [known issue affecting Dify versions through 1.13.0](https://github.com/langgenius/dify/issues/15166). The root cause is that **debug/preview mode forces citations to be enabled through hardcoded logic**, while the end-user chat interface relies on proper data persistence that wasn't working correctly. **Why it works in debug but not production:** - In debug mode, [`retriever_resource` is always set to `{\"enabled\": True}`](https://github.com/langgenius/dify/issues/26884#issuecomment-3445850965) regardless of your settings - In production/web-app mode, citations depend on data being [properly written to the `dataset_retriever_resources` table](https://github.com/langgenius/dify/issues/18287#issuecomment-2812203295), which had bugs **Good news:** Several fixes have been merged since 1.13.0: - [PR #31573](https://github.com/langgenius/dify/pull/31573) (Jan 2026) - Most comprehensive fix for the citation data pipeline - [PR #27405](https://github.com/langgenius/dify/pull/27405) - Fixed event handling for workflow citations - [PR #27799](https://github.com/langgenius/dify/pull/27799) - Fixed citations being lost with multiple LLM nodes **Recommended action:** Upgrade to a version newer than 1.13.0 that includes these fixes. If you're using a workflow-type application, this fix is especially important since workflows were more affected than chatbot-mode applications. <!-- 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/f53ac7c5-6a84-4f09-af60-4f7770cb52d4?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/f53ac7c5-6a84-4f09-af60-4f7770cb52d4?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/f53ac7c5-6a84-4f09-af60-4f7770cb52d4?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/f53ac7c5-6a84-4f09-af60-4f7770cb52d4?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f53ac7c5-6a84-4f09-af60-4f7770cb52d4?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/f53ac7c5-6a84-4f09-af60-4f7770cb52d4?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f53ac7c5-6a84-4f09-af60-4f7770cb52d4?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%20%5Bknown%20issue%20affecting%20Dify%20versions%20through%201.13.0%5D%28https%3A//github.com/langgenius/dify/issues/15166%29.%20The%20root%20cause%20is%20that%20%2A%2Adebug/preview%20mode%20forces%20citations%20to%20be%20enabled%20through%20hardcoded%20logic%2A%2A%2C%20while%20the%20end-user%20chat%20interface%20relies%20on%20proper%20data%20persistence%20that%20wasn%27t%20working%20correctly.%0A%0A%2A%2AWhy%20it%20works%20in%20debug%20but%20not%20production%3A%2A%2A%0A-%20In%20debug%20mode%2C%20%5B%60retriever_resource%60%20is%20always%20set%20to%20%60%7B%5C%22enabled%5C%22%3A%20True%7D%60%5D%28https%3A//github.com/langgenius/dify/issues/26884%23issuecomment-3445850965%29%20regardless%20of%20your%20settings%0A-%20In%20production/web-app%20mode%2C%20citations%20depend%20on%20data%20being%20%5Bproperly%20written%20to%20the%20%60dataset_retriever_resources%60%20table%5D%28https%3A//github.com/langgenius/dify/issues/18287%23issuecomment-2812203295%29%2C%20which%20had%20bugs%0A%0A%2A%2AGood%20news%3A%2A%2A%20Several%20fixes%20have%20been%20merged%20since%201.13.0%3A%0A-%20%5BPR%20%2331573%5D%28https%3A//github.com/langgenius/dify/pull/31573%29%20%28Jan%202026%29%20-%20Most%20comprehensive%20fix%20for%20the%20citation%20data%20pipeline%0A-%20%5BPR%20%2327405%5D%28https%3A//github.com/langgenius/dify/pull/27405%29%20-%20Fixed%20event%20handling%20for%20workflow%20citations%0A-%20%5BPR%20%2327799%5D%28https%3A//github.com/langgenius/dify/pull/27799%29%20-%20Fixed%20citations%20being%20lost%20with%20multiple%20LLM%20nodes%0A%0A%2A%2ARecommended%20action%3A%2A%2A%20Upgrade%20to%20a%20version%20newer%20than%201.13.0%20that%20includes%20these%20fixes.%20If%20you%27re%20using%20a%20workflow-type%20application%2C%20this%20fix%20is%20especially%20important%20since%20workflows%20were%20more%20affected%20than%20chatbot-mode%20applications.)&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/32420)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22252