0
0
Agentic AIml~10 mins

Debate and consensus patterns in Agentic AI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to initialize two agents for debate.

Agentic AI
agent1 = Agent(name='Agent1')
agent2 = Agent(name=[1])
Drag options to blanks, or click blank then click option'
A'ConsensusAgent'
B'AgentOne'
C'Debater'
D'Agent2'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the same name as the first agent.
Using unrelated names that confuse the roles.
2fill in blank
medium

Complete the code to start a debate round between two agents.

Agentic AI
debate = Debate(agents=[agent1, agent2])
debate.[1]()
Drag options to blanks, or click blank then click option'
Astart
Bconclude
Cpause
Dreset
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'conclude' which ends the debate instead of starting it.
Using 'pause' which temporarily stops the debate.
3fill in blank
hard

Fix the error in the code to collect consensus from agents.

Agentic AI
consensus = debate.collect_[1]()
Drag options to blanks, or click blank then click option'
Aresults
Bvotes
Cconsensus
Dopinions
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'votes' which may refer to individual preferences, not final consensus.
Using 'results' which is too generic.
4fill in blank
hard

Fill both blanks to define a function that runs debate and returns consensus.

Agentic AI
def run_debate(agents):
    debate = Debate(agents=agents)
    debate.[1]()
    return debate.collect_[2]()
Drag options to blanks, or click blank then click option'
Astart
Bpause
Cconsensus
Dvotes
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pause' instead of 'start' to begin the debate.
Using 'votes' instead of 'consensus' to collect results.
5fill in blank
hard

Fill all three blanks to create a consensus pattern with agents debating and agreeing.

Agentic AI
agents = [Agent(name='A1'), Agent(name='A2')]
debate = Debate(agents=[1])
debate.[2]()
final_consensus = debate.collect_[3]()
Drag options to blanks, or click blank then click option'
Aagents
Bstart
Cconsensus
Dparticipants
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'participants' instead of 'agents' for the debate constructor.
Using 'pause' or 'reset' instead of 'start' to begin.
Using 'votes' or 'results' instead of 'consensus' to collect.