0
0
Agentic AIml~10 mins

Regression testing for agent changes 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 run a regression test on the agent's output.

Agentic AI
assert agent_output == [1]
Drag options to blanks, or click blank then click option'
Anew_output
Bagent_output
Ctest_result
Dexpected_output
Attempts:
3 left
💡 Hint
Common Mistakes
Comparing the output to itself instead of the expected result.
Using an undefined variable for comparison.
2fill in blank
medium

Complete the code to log the regression test result.

Agentic AI
logger.[1]('Regression test passed')
Drag options to blanks, or click blank then click option'
Ainfo
Bdebug
Cwarn
Derror
Attempts:
3 left
💡 Hint
Common Mistakes
Using error or warn logging for passing tests.
Using debug which might be too low level.
3fill in blank
hard

Fix the error in the regression test function call.

Agentic AI
def test_agent():
    result = agent.run(input_data)
    assert result [1] expected_output
Drag options to blanks, or click blank then click option'
A!=
B>=
C==
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '!=' which checks for inequality.
Using comparison operators like '>=' or '<=' which are not suitable.
4fill in blank
hard

Fill both blanks to create a dictionary of test results with agent names and pass status.

Agentic AI
test_results = {agent_name: [1] for agent_name in agents if agents[agent_name].active [2] True}
Drag options to blanks, or click blank then click option'
Aagents[agent_name].run(input_data) == expected_output
Bagent.run(input_data)
C==
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '!=' instead of '==' in the condition.
Using the agent.run(input_data) without comparison in the dictionary.
5fill in blank
hard

Fill all three blanks to filter agents, run tests, and store pass status in a dictionary.

Agentic AI
results = {agent: (output := agent.run(data)) [1] expected for agent, expected in [2] if agent.active == [3]
Drag options to blanks, or click blank then click option'
A==
Bitems()
CTrue
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '!=' instead of '==' for comparison.
Using keys() instead of items() for iteration.
Checking if agent.active is False instead of True.