Skip to main content

builtin_debate

Function builtin_debate 

Source
pub async fn builtin_debate(
    args: &[DslValue],
    ctx: &ReasoningBuiltinContext,
) -> Result<DslValue>
Expand description

Execute the debate builtin: alternating two-agent critique with optional model routing and adaptive convergence.

Arguments (named via map):

  • writer_prompt: string — system prompt for the writer
  • critic_prompt: string — system prompt for the critic
  • topic: string — initial topic/content to debate
  • rounds: integer (optional, default 3)
  • writer_model: string (optional) — model for writer
  • critic_model: string (optional) — model for critic
  • convergence: string (optional) — “fixed” or “adaptive”

Returns a map with keys: final_answer, rounds_completed, history.