Enable LLMs to solve complex problems through multi-turn agentic reasoning with tool-assisted verification and iterative refinement loops. Trigger: improve reasoning reliability on long-horizon tasks by combining RL with verification.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Enable LLMs to solve complex problems through multi-turn agentic reasoning with tool-assisted verification and iterative refinement loops. Trigger: improve reasoning reliability on long-horizon tasks by combining RL with verification.
AlphaApollo: Orchestrating Models and Tools for Reliable Reasoning
Core Concept
AlphaApollo frames complex problem-solving as a multi-turn agentic process with three integrated levels: reasoning (multi-turn interactions), learning (turn-level RL), and evolution (multi-round refinement with verification). By separating actions from tool responses during RL training and implementing a propose-judge-update loop, the system achieves reliable reasoning on tasks requiring tool use, verification, and iterative correction.
The key insight: Decoupling actions from responses and learning from turn-level feedback enables models to build strategies that outlast individual tool failures.
Architecture Overview
Multi-Turn Agentic Reasoning: Model reasons in turns, calling tools and receiving responses
Turn-Level RL Training: Optimize tool-use decisions at each turn, not just final outcome
Tool-Response Separation: Distinguish between model actions and external tool results
Propose-Judge-Update Loop: Generate solution → verify with tools → refine based on feedback
Long-Horizon Memory: Track prior attempts and insights across refinement rounds
Implementation Steps
1. Design the Agentic Interface
Define how the model interacts with tools and receives feedback.
classAgentAction:
"""Represents a single turn's action."""def__init__(self, action_type, content, tool_call=None):
self.action_type = action_type # "reason", "call_tool", "output"self.content = content # Text of reasoning or tool nameself.tool_call = tool_call # Tool parameters if applicabledefto_prompt(self):
ifself.action_type == "call_tool":
returnf"TOOL_CALL: ()"
:
:
():
.tool_name = tool_name
.status = status
.result = result
.error = error
():
.status == :
:
:
():
.problem = problem
.turns = []
.turn_rewards = []
.final_reward =
.solution =
():
.turns.append((action, response))
.turn_rewards.append(immediate_reward)
():
.final_reward = final_reward
.solution = solution
{self.tool_call['name']}
{self.tool_call['args']}
else
return
f"{self.action_type.upper()}: {self.content}"
class
ToolResponse
"""Represents tool execution result."""
def
__init__
self, tool_name, status, result, error=None
self
self
# "success", "error", "timeout"
self
self
def
to_prompt
self
if
self
"success"
return
f"Tool {self.tool_name} returned: {self.result}"
else
return
f"Tool {self.tool_name} error: {self.error}"
class
MultiTurnTrajectory
"""Tracks a complete problem-solving episode."""
def
__init__
self, problem
self
self
# List of (action, response) pairs
self
# Reward per turn
self
None
self
None
def
add_turn
self, action, response, immediate_reward=0
self
self
def
finalize
self, final_reward, solution
self
self
2. Implement Multi-Turn Reasoning Loop
The agent reasons iteratively, calling tools when needed and refining based on responses.