-
-
Notifications
You must be signed in to change notification settings - Fork 35
Implement Advanced Multi-Agent Fact-Checking & Arbitration Engine #229
Description
Description
Currently, the ArbitrationLayer in the AI Council Orchestrator relies on simple confidence scoring and basic text similarity checks to resolve discrepancies when multiple agents return conflicting data. In high-stakes environments (e.g., executing complex coding or reasoning workflows), naive similarity checks fail to detect nuanced, logical contradictions (e.g., an LLM citing a deprecated API versus an LLM citing a correct, modern API).
We need to implement an advanced Multi-Agent Fact-Checking & Arbitration Engine that actively debates conflicting responses, searches for grounding evidence, and uses a specialized "Judge" model to synthesize a verifiable truth.
Objectives & Acceptance Criteria
- Cross-Examination Prompting: Update the
ConflictDetectorso that if< 0.8textual similarity is found, agents cross-examine each other's responses to point out factual errors. - Evidence Grounding: Integrate an optional grounding/search step (if enabled via config) where the
ArbitrationLayercan query a vectorized knowledge base or search tool to verify claims. - Judge Model Delegation: If cross-examination results in a stalemate, route the conflicting statements and evidence to a high-tier Judge model (e.g., GPT-4 / Claude 3) whose sole role in this orchestrator is Arbitration.
- Structured Arbitration Log: Store an explanation trail (the "Why") inside
FinalResponse.arbitration_decisionsdetailing exactly why Agent B was chosen over Agent A (e.g., "Agent B used Python 3.11 syntax, Agent A used deprecated Python 3.7 syntax").
Implementation Hints
- Refer to ai_council/orchestration/layer.py within the _stage_arbitrate method. You will need to extract the existing simple 6-step arbitration process into a dedicated engine inside
utils/or expand theArbitrationLayerimplementation class. - Consider utilizing the
model_context_protocolto fetch the designated Judge model via theModelRegistry.
Skills Required
- Python (Async IO)
- Prompt Engineering & Multi-Agent Debate patterns
- System Design (Refactoring layers)
Constraints
- The fact-checking loop must strictly respect the adaptive timeouts already present in the orchestrator so it does not permanently hang the pipeline.
- The Engine must gracefully fallback to the highest-confidence answer if the Judge model fails or times out.
Difficulty: 🔴 Hard / Advanced
Estimated Time: 12-18 hours
Labels: enhancement, hard, OSCG, multi-agent-logic