Variable Aggregator Produces Empty Output When Aggregating Other Aggregators and Knowledge Base Results #6953

Closed
opened 2026-02-21 18:18:06 -05:00 by yindo · 2 comments
Owner

Originally created by @Angelxiaotao on GitHub (Nov 26, 2024).

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

0.11.0

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

In Dify, when using a variable aggregator to aggregate the results of another variable aggregator and two knowledge bases simultaneously, the output is empty. All input data formats are consistent, so the issue does not appear to be caused by mismatched input structures. This results in incomplete or incorrect aggregation behavior, impacting normal usage.

  1. Deploy Dify version 0.11.0 using the source code.
  2. Configure a variable aggregator to aggregate the results of another variable aggregator and two knowledge bases.
  3. Check the output of the aggregation process, which turns out to be empty.

✔️ Expected Behavior

The variable aggregator should correctly aggregate results from other variable aggregators and knowledge bases, providing complete and accurate output.

Actual Behavior

The aggregation output is empty, and the expected results are not returned.
image

Originally created by @Angelxiaotao on GitHub (Nov 26, 2024). ### 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 0.11.0 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce In Dify, when using a variable aggregator to aggregate the results of another variable aggregator and two knowledge bases simultaneously, the output is empty. All input data formats are consistent, so the issue does not appear to be caused by mismatched input structures. This results in incomplete or incorrect aggregation behavior, impacting normal usage. 1. Deploy Dify version 0.11.0 using the source code. 2. Configure a variable aggregator to aggregate the results of another variable aggregator and two knowledge bases. 3. Check the output of the aggregation process, which turns out to be empty. ### ✔️ Expected Behavior The variable aggregator should correctly aggregate results from other variable aggregators and knowledge bases, providing complete and accurate output. ### ❌ Actual Behavior The aggregation output is empty, and the expected results are not returned. ![image](https://github.com/user-attachments/assets/00df04de-e3ef-4b77-844e-da09b08b62af)
yindo added the 🐞 bug label 2026-02-21 18:18:06 -05:00
yindo closed this issue 2026-02-21 18:18:06 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 26, 2024):

I found a similar closed issue where the suggested solution was to remove the Variable Aggregator, which then allowed the system to merge things automatically [1]. This might be relevant to your situation if the issue is related to how the Variable Aggregator is configured or used in your setup.

Additionally, it's important to ensure that all variables being aggregated are of the same data type, as the Variable Aggregator can only handle variables of the same type [2]. If the data types are inconsistent, it could lead to issues like empty outputs.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Nov 26, 2024): <!-- Answer --> I found a similar closed issue where the suggested solution was to remove the Variable Aggregator, which then allowed the system to merge things automatically <sup>[[1]](https://github.com/langgenius/dify/issues/10569)</sup>. This might be relevant to your situation if the issue is related to how the Variable Aggregator is configured or used in your setup. Additionally, it's important to ensure that all variables being aggregated are of the same data type, as the Variable Aggregator can only handle variables of the same type <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/workflow/node/variable-aggregator.md)</sup>. If the data types are inconsistent, it could lead to issues like empty outputs. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Nov 26, 2024):

Please see the docs. https://docs.dify.ai/guides/workflow/node/variable-aggregator

Aggregate variables from multiple branches into a single variable to achieve unified configuration for downstream nodes.
The variable aggregation node (formerly the variable assignment node) is a key node in the workflow. It is responsible for integrating the output results from different branches, ensuring that regardless of which branch is executed, its results can be referenced and accessed through a unified variable. This is particularly useful in multi-branch scenarios, as it maps variables with the same function from different branches into a single output variable, avoiding the need for repeated definitions in downstream nodes.

It does not aggregate results from multiple branches, treat it as choose 1 from n.

@crazywoola commented on GitHub (Nov 26, 2024): Please see the docs. https://docs.dify.ai/guides/workflow/node/variable-aggregator > Aggregate variables from multiple branches into a single variable to achieve unified configuration for downstream nodes. The variable aggregation node (formerly the variable assignment node) is a key node in the workflow. It is responsible for integrating the output results from different branches, ensuring that regardless of which branch is executed, its results can be referenced and accessed through a unified variable. This is particularly useful in multi-branch scenarios, as it maps variables with the same function from different branches into a single output variable, avoiding the need for repeated definitions in downstream nodes. It does not aggregate results from multiple branches, treat it as choose 1 from n.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6953