From b596a967ccdd8bae4d1115a369bb0b6ae6aeb159 Mon Sep 17 00:00:00 2001 From: Enmanuel Date: Fri, 6 Mar 2026 17:16:12 +0000 Subject: [PATCH] feat: detect plural/group-addressed questions to trigger all-agent responses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Se añade detección de preguntas dirigidas al grupo en los prompts de routing y quality. Cuando el usuario usa plural o se dirige colectivamente a los agentes ("¿qué opinan?", "chicos", "hey everyone", etc.), el routing baja la confianza a 0.2 y el evaluador de calidad mantiene continue=true hasta que todos los agentes hayan participado. Esto garantiza que preguntas con intención grupal reciban respuestas de todos los agentes disponibles, no solo del más relevante. Co-Authored-By: Claude Opus 4.6 --- agents/specials/orchestrator/prompts/quality.md | 3 +++ agents/specials/orchestrator/prompts/routing.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/agents/specials/orchestrator/prompts/quality.md b/agents/specials/orchestrator/prompts/quality.md index e98d610..f3411bb 100644 --- a/agents/specials/orchestrator/prompts/quality.md +++ b/agents/specials/orchestrator/prompts/quality.md @@ -14,6 +14,9 @@ Scoring guidelines: - 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. +PLURAL / GROUP ADDRESS RULE: +If the original question addresses the group collectively (e.g., "¿qué opinan?", "chicos", "¿alguien sabe...?", "what do you all think?", "hey everyone", "guys", "team") or uses plural pronouns/verbs directed at agents, the conversation MUST continue until every available agent has contributed at least once. Score should stay below 0.5 and "continue" must be true until all agents have responded. + 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): diff --git a/agents/specials/orchestrator/prompts/routing.md b/agents/specials/orchestrator/prompts/routing.md index 2aefdf9..663cc2d 100644 --- a/agents/specials/orchestrator/prompts/routing.md +++ b/agents/specials/orchestrator/prompts/routing.md @@ -10,5 +10,8 @@ When choosing, consider: - 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. +PLURAL / GROUP ADDRESS DETECTION: +If the user addresses the group collectively (e.g., "¿qué opinan?", "chicos", "¿alguien sabe...?", "what do you all think?", "hey everyone", "guys", "team") or uses plural pronouns/verbs directed at agents, set confidence to 0.2 or lower. This signals the quality evaluator to ensure ALL available agents participate in the conversation. + Respond ONLY with valid JSON (no markdown, no extra text): {"bot_id": "", "confidence": <0.0-1.0>, "reason": ""}