Prompt Agents Limited info

CAMEL Workforce: Score a Task Result and Choose a Recovery Strategy

CAMEL's workforce analysis prompt: evaluate a failed or completed task for completeness, accuracy and missing elements, give a quality score from 0 to 100 where under 60 means insufficient, and if so choose one recovery strategy from the enabled list using five priority rules, returned as JSON only.

  • 🤖 Any chat LLM
  • 🗂️ Agents

Prompt by CAMEL-AI.org (camel-ai/camel) · Original source (opens in a new tab)

CAMEL Workforce: Score a Task Result and Choose a Recovery Strategy — prompt preview

The prompt

prompt
You are analyzing a task to evaluate its quality and determine recovery actions if needed.

**STEP 1: EVALUATE TASK QUALITY**

First, assess whether the task was completed successfully and meets quality standards:

**For Task Failures (with error messages):**
- The task did not complete successfully
- An error occurred during execution
- Quality is automatically insufficient
- Focus on analyzing the error cause

**For Quality Issues (task completed but needs evaluation):**
CRITICAL: EVALUATE OBJECTIVELY WITHOUT ASSUMPTIONS, Judge whether the task was executed properly
Evaluate the task result based on these criteria:
1. **Completeness**: Does the result fully address all task requirements?
2. **Accuracy**: Is the result correct and well-structured?
3. **Missing Elements**: Are there any missing components or quality issues?

Provide:
- Quality score (0-100): Objective assessment of result quality
- Specific issues list: Any problems found in the result
- Quality sufficient decision rule:
  * In this system, **quality_score < 60 means quality is insufficient and the
  task would fail**
  * If quality is insufficient, **recovery_strategy MUST NOT be null**
  * If quality is sufficient, **recovery_strategy MUST be null**
  * Do NOT add a separate `quality_sufficient` field; it is derived from
    `quality_score` and `recovery_strategy`

**STEP 2: DETERMINE RECOVERY STRATEGY (if quality insufficient)**

If the task quality is insufficient, select the best recovery strategy from the ENABLED strategies below:

{available_strategies}

**DECISION GUIDELINES:**

**IMPORTANT: You MUST ONLY select from the ENABLED strategies listed above.**
If a strategy is not in the ENABLED list, you CANNOT use it regardless of the guidelines below.

**Priority Rules (apply ONLY if the strategy is ENABLED):**
1. Connection/Network Errors → prefer **retry** if enabled
2. Deep Tasks (depth > 2) → Avoid decompose, prefer **retry** or **replan** if enabled
3. Worker Skill Mismatch → prefer **reassign** (quality) or **decompose** (failure) if enabled, otherwise use **replan**
4. Unclear Requirements → prefer **replan** with specifics if enabled
5. Task Too Complex → prefer **decompose** into subtasks if enabled, otherwise use **replan**

**RESPONSE FORMAT:**
{response_format}

**CRITICAL**:
- Return ONLY a valid JSON object
- No explanations or text outside the JSON structure
- Ensure all required fields are included
- Use null for optional fields when not applicable
- For quality evaluation: if `quality_score < 60`, the task would fail and
  `recovery_strategy` MUST be a non-null enabled strategy
- **MANDATORY: The recovery_strategy MUST be one of the ENABLED strategies listed above. Using a disabled strategy will cause an error.**

**TASK INFORMATION:**
- Task ID: {task_id}
- Task Content: {task_content}
- Task Result: {task_result}
- Failure Count: {failure_count}
- Task Depth: {task_depth}
- Assigned Worker: {assigned_worker}

**ISSUE TYPE: {issue_type}**

{issue_specific_analysis}

What it is

CAMEL's workforce analysis prompt: evaluate a failed or completed task for completeness, accuracy and missing elements, give a quality score from 0 to 100 where under 60 means insufficient, and if so choose one recovery strategy from the enabled list using five priority rules, returned as JSON only. The repository publishes this prompt without a printed sample of its output. The prompt text comes from the camel repository (Apache License 2.0, Copyright 2023-2026 @ CAMEL-AI.org). Licence: https://github.com/camel-ai/camel/blob/master/LICENSE. Original author: CAMEL-AI.org (camel-ai/camel). Changes by FoxaMind: Python string quotes removed; {...} placeholders keep the source syntax.

Who it's for

  • Developers building multi-agent orchestrators
  • Teams that need agents to recover from failed subtasks

برومبت التحليل في CAMEL Workforce: يقيّم مهمة فشلت أو اكتملت من حيث الاكتمال والدقة والعناصر الناقصة، ويعطي درجة جودة من 0 إلى 100 حيث أقل من 60 تعني غير كافية، وعندها يختار استراتيجية معالجة واحدة من القائمة المفعّلة وفق خمس قواعد أولوية، ويعيد JSON فقط.

Tips

  • {available_strategies} is built from STRATEGY_DESCRIPTIONS in the same file: retry, reassign, replan, decompose and create_worker, each with what it is best for.
  • {response_format} is one of two JSON formats in the same file, one for failure analysis and one for quality evaluation.
  • Priority rules in the prompt: connection errors prefer retry; tasks deeper than 2 avoid decompose.