AI Hints
Home›Agentic AI Tutorial›Team Design
Agentic AI · Lesson 50 of 100

Critics and Debate

Better answers through disagreement.

⏱ 2 min read▶ Video at 1:26:50🎓 Free
Watch this lesson in the Agentic AI courseWatch on YouTube ↗Full Agentic AI course

Ask one person, and you get their blind spots. Good decisions come from people who push back. Courts have two sides and a judge. Science has peer review. You can give your agents the same structure, cheaply.

Critics and Debate
From the video: Critics and Debate
  • One person has blind spots
  • Courts have two sides
  • Science has peer review

Two sides and a judge

Should Velo Supply offer free returns on everything? We ask for the best argument for, and the best argument against. Then a judge sees both, and has to name a condition. Run it. Models tend to agree with whatever they're asked. Forcing them to take sides brings out the trade offs. And that judge often lands on something more nuanced than either side.

debate.pypython
from llm import ask

question = "Should Velo Supply offer free returns on all orders?"

pro = ask(f"Argue FOR in one sentence: {question}")
con = ask(f"Argue AGAINST in one sentence: {question}")
verdict = ask(f"Question: {question}\nFor: {pro}\nAgainst: {con}\n"
              "As the judge, decide in one sentence, naming a condition.")

print("For:    ", pro)
print("Against:", con)
print("Verdict:", verdict)
Output
For:     Velo Supply should offer free returns on all orders because eliminating purchase risk and sizing hesitation will significantly boost conversion rates, build customer trust, and drive long-term brand loyalty.
Against: Velo Supply should not offer free returns on all orders because absorbing the steep freight and restocking costs associated with bulky cycling equipment would severely erode profit margins while encouraging wasteful over-ordering.
Verdict: Velo Supply should not offer free returns on all orders unless the policy excludes heavy, bulky equipment like bicycles and trainers, thereby limiting free reverse logistics to fit-sensitive, lightweight items like apparel and shoes where sizing hesitation actively hurts conversion.
Also uses llm.py
from google import genai
from google.genai import types

client = genai.Client()

def ask(prompt, system=None, schema=None):
    config = types.GenerateContentConfig(temperature=0.2, system_instruction=system)
    if schema:
        config.response_mime_type = "application/json"
        config.response_schema = schema
    r = client.models.generate_content(model="gemini-flash-latest",
                                       config=config, contents=prompt)
    return r.parsed if schema else r.text

Roles change behaviour

The same model acts differently when it has a different role. Here, a copywriter makes a claim, a strict legal reviewer finds problems with it, and then the copywriter fixes them. Run it. The final version is safer than the first draft, as a different point of view was brought in. Role prompts are the cheapest way to get a second opinion.

roles.pypython
from llm import ask

draft = ask("Write one sentence selling a 12-speed chain.", system="You are a copywriter.")
problems = ask(f"List any claim here that can't be proven, in one short line:\n{draft}",
               system="You are a strict legal reviewer.")
final = ask(f"Fix this copy.\nCopy: {draft}\nProblems: {problems}\nReturn one sentence only.",
            system="You are a copywriter.")

print("Draft:   ", draft)
print("Reviewer:", problems)
print("Final:   ", final)
Output
Draft:    Engineered for relentless power transfer and whisper-quiet precision, this 12-speed chain turns every shift into effortless, instant speed.
Reviewer: "Relentless power transfer," "whisper-quiet precision," and "effortless, instant speed."
Final:    Built for smooth, silent engagement, this 12-speed chain delivers crisp, immediate shifts that put every watt of power straight to the ground.
Also uses llm.py
from google import genai
from google.genai import types

client = genai.Client()

def ask(prompt, system=None, schema=None):
    config = types.GenerateContentConfig(temperature=0.2, system_instruction=system)
    if schema:
        config.response_mime_type = "application/json"
        config.response_schema = schema
    r = client.models.generate_content(model="gemini-flash-latest",
                                       config=config, contents=prompt)
    return r.parsed if schema else r.text

When debate is worth it

This costs several times more than a single answer, so keep it for decisions that matter. Strategy questions, risky changes, and code reviews are good uses. Simple lookups aren't. And don't expect the debaters to always find the truth. If they share the same wrong facts, then they'll simply agree with each other more confidently.

Use forstrategy, risky changes
Skip forsimple lookups
Costseveral times more
Limitshared wrong facts

Summary

Disagreement improves decisions. But teams also fail in unique ways. Next, the classic ways that multi agent systems go wrong.

Key takeaways
  • Force opposing views
  • Roles change behaviour
  • Keep it for big decisions
Next up: How Agent Teams Fail — and how to stop it