Skip to content

[Feature Request] Enhance Workforce for duplicated task handling #3332

@Wendong-Fan

Description

@Wendong-Fan

Required prerequisites

Motivation

The Workforce system is designed to execute non-dependent tasks in parallel for efficiency. However, this creates a challenge for tasks that "scatter" a single goal across multiple agents, such as "search for 5 research papers." The parallel agents may independently find and return duplicate content.

Currently, the system lacks a built-in mechanism to detect this redundancy and ensure the final, aggregated result is unique.

Proposed Solution: Validation and Iterative Refinement A potential solution is to implement a final validation check managed by TaskAgent in workforce.

Aggregation and Validation: When the last parallel sub-task is completed, the TaskAgent gathers all the results. It then performs a final check to deduplicate the content and validate it against the original requirements (e.g., "Do we have 5 unique papers?").

Iterative Refinement: If the agent detects a mismatch (e.g., only 3 unique papers were found), it will generate new, targeted sub-tasks (e.g., "Find 2 new papers, excluding the 3 already found") and dispatch them back to the Workforce.

This approach ensures the final output meets the user's precise requirements by adding a validation loop, while still leveraging the speed of parallel processing for the initial work.

Solution

No response

Alternatives

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

P1Task with middle level priority

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions