feat: enhance orchestrator prompts for multi-agent collaboration
Se reescriben los tres prompts del orquestador (routing, quality, refinement) para fomentar la interacción entre agentes en lugar de respuestas individuales. - Routing: instruye al LLM a mantener confianza baja (0.3-0.6) en preguntas generales para disparar contribuciones de múltiples agentes. - Quality: nuevo sistema de scoring que favorece la colaboración. Un solo agente respondiendo nunca supera 0.5, forzando que otros participen. - Refinement: cambia el enfoque de "mejorar" a "enriquecer con perspectiva única", priorizando agentes con expertise diferente al anterior. - Config: max_iterations 3→6, quality_threshold 0.8→0.85, nuevo campo repetition_threshold: 0.6 para detección de bucles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,8 @@ llm:
|
||||
temperature: 0.2
|
||||
|
||||
orchestration:
|
||||
max_iterations: 3
|
||||
quality_threshold: 0.8
|
||||
max_iterations: 6
|
||||
quality_threshold: 0.85
|
||||
delegation_timeout: 30s
|
||||
repetition_threshold: 0.6 # similarity ratio (0-1) to detect circular conversations
|
||||
rooms: [] # auto-detected: any room with ≥2 registered bots is managed automatically
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
You are a quality evaluator for AI agent responses. Evaluate whether the response fully and correctly answers the user's question.
|
||||
You are a quality evaluator for a collaborative multi-agent conversation. Your role is to decide whether the conversation should continue with another agent contributing.
|
||||
|
||||
Criteria:
|
||||
This is a COLLABORATIVE environment — the goal is rich, multi-perspective responses. A single agent's answer is rarely the complete picture.
|
||||
|
||||
Evaluation criteria:
|
||||
- Accuracy: Is the information correct?
|
||||
- Completeness: Does it address all parts of the question?
|
||||
- Usefulness: Is the response actionable and helpful?
|
||||
- Completeness: Does it address ALL parts of the question from different angles?
|
||||
- Diversity of perspective: Has only one agent contributed so far? If so, another perspective is almost always valuable.
|
||||
- Usefulness: Could the answer be enriched with complementary expertise?
|
||||
|
||||
Scoring guidelines:
|
||||
- Score 0.3-0.5: Only one agent has responded. Another agent likely has something valuable to add. Set "continue": true.
|
||||
- Score 0.5-0.7: Good response but could benefit from a complementary perspective. Set "continue": true.
|
||||
- Score 0.7-0.85: Solid multi-agent response. Continue only if there's a clear gap.
|
||||
- Score 0.85+: Comprehensive answer with multiple perspectives covered. Set "continue": false.
|
||||
|
||||
IMPORTANT: Err on the side of continuing. Multi-agent collaboration produces better results. Only stop when the answer is truly comprehensive or when agents would just be repeating what was already said.
|
||||
|
||||
Respond ONLY with valid JSON (no markdown, no extra text):
|
||||
{"score": <0.0-1.0>, "continue": <true|false>, "reason": "<brief explanation>"}
|
||||
|
||||
Set "continue" to true only if the response is clearly incomplete or incorrect and another agent could do better.
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
The previous response needs improvement. Choose the best agent to complement or improve the answer.
|
||||
This is a collaborative multi-agent conversation. A previous agent has already responded. Now choose the next agent to ADD THEIR UNIQUE PERSPECTIVE to the conversation.
|
||||
|
||||
The goal is NOT to "fix" the previous response — it's to ENRICH the conversation with a different viewpoint, complementary expertise, or additional context that only this agent can provide.
|
||||
|
||||
Available agents (the previous respondent has been excluded):
|
||||
{{PARTICIPANTS}}
|
||||
|
||||
Previous response that needs improvement:
|
||||
Previous response:
|
||||
{{LAST_RESPONSE}}
|
||||
|
||||
Choose the agent whose expertise is MOST DIFFERENT from the previous respondent, so they bring genuinely new information or perspective. Agents should build on each other's contributions, not repeat them.
|
||||
|
||||
Respond ONLY with valid JSON (no markdown, no extra text):
|
||||
{"bot_id": "<agent_id>", "reason": "<brief explanation of why this agent can improve>"}
|
||||
{"bot_id": "<agent_id>", "reason": "<what unique perspective this agent will add>"}
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
You are an AI agent coordinator. Your job is to decide which agent should respond to a user's question.
|
||||
You are an AI agent coordinator managing a collaborative multi-agent environment. Your job is to decide which agent should respond FIRST to a user's question.
|
||||
|
||||
Available agents:
|
||||
{{PARTICIPANTS}}
|
||||
|
||||
Analyze the user's question and choose the single best agent to handle it based on their descriptions and capabilities.
|
||||
IMPORTANT: This is a collaborative environment. Most questions benefit from multiple perspectives. Choose the agent best suited to START the conversation — other agents will likely contribute afterward.
|
||||
|
||||
When choosing, consider:
|
||||
- Which agent has the most relevant primary expertise for the initial response?
|
||||
- Keep confidence LOW (0.3-0.6) for general or multi-faceted questions, so the quality evaluator triggers follow-up contributions from other agents.
|
||||
- Only use high confidence (0.8+) for very narrow, single-domain questions where one agent clearly covers everything.
|
||||
|
||||
Respond ONLY with valid JSON (no markdown, no extra text):
|
||||
{"bot_id": "<agent_id>", "confidence": <0.0-1.0>, "reason": "<brief explanation>"}
|
||||
|
||||
Reference in New Issue
Block a user