Support for Looping or Batch Processing in LLM Nodes for Array Inputs in Workflows #3082

Closed
opened 2026-02-21 17:53:34 -05:00 by yindo · 0 comments
Owner

Originally created by @shelltea on GitHub (May 9, 2024).

Self Checks

  • 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).
  • Pleas do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing?

When utilizing the LLM nodes within workflows, I often find myself needing to process array inputs iteratively or in batches. Currently, handling each element of an array requires manual node duplication or external scripting, which is inefficient and error-prone. This limitation makes the workflow cumbersome, especially when dealing with large datasets that need consistent processing.

2. Describe the feature you'd like to see

I propose adding functionality to the LLM nodes that allows for automatic looping or batch processing when the input variable is of an array type. This feature should include configuration options for the loop collection variable and the number of iterations. Ideally, the output after processing should also be in an array format, retaining the order and structure of the input array.

3. How will this feature improve your workflow or experience?

This enhancement will streamline the process of applying LLM capabilities to array inputs by automating repetitive tasks, reducing the risk of human error, and saving time. It will allow users to focus more on strategic aspects of workflow design rather than on mechanical implementation details. It also enables more complex data processing tasks to be handled directly within the Dify platform.

4. Additional context or comments

This feature could be particularly useful for applications that require consistent operations across multiple data points, such as data augmentation, batch predictions, or iterative data analysis. It aligns with common data processing patterns seen in other programming and workflow environments, thus enhancing the usability and flexibility of Dify.

5. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @shelltea on GitHub (May 9, 2024). ### Self Checks - [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] Pleas do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? When utilizing the LLM nodes within workflows, I often find myself needing to process array inputs iteratively or in batches. Currently, handling each element of an array requires manual node duplication or external scripting, which is inefficient and error-prone. This limitation makes the workflow cumbersome, especially when dealing with large datasets that need consistent processing. ### 2. Describe the feature you'd like to see I propose adding functionality to the LLM nodes that allows for automatic looping or batch processing when the input variable is of an array type. This feature should include configuration options for the loop collection variable and the number of iterations. Ideally, the output after processing should also be in an array format, retaining the order and structure of the input array. ### 3. How will this feature improve your workflow or experience? This enhancement will streamline the process of applying LLM capabilities to array inputs by automating repetitive tasks, reducing the risk of human error, and saving time. It will allow users to focus more on strategic aspects of workflow design rather than on mechanical implementation details. It also enables more complex data processing tasks to be handled directly within the Dify platform. ### 4. Additional context or comments This feature could be particularly useful for applications that require consistent operations across multiple data points, such as data augmentation, batch predictions, or iterative data analysis. It aligns with common data processing patterns seen in other programming and workflow environments, thus enhancing the usability and flexibility of Dify. ### 5. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 17:53:34 -05:00
yindo closed this issue 2026-02-21 17:53:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#3082