0
0
Agentic AIml~10 mins

Defining success criteria for agents 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 define a success criterion function that returns True if the agent's score is above 80.

Agentic AI
def success_criterion(score):
    return score [1] 80
Drag options to blanks, or click blank then click option'
A<
B>
C==
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' instead of '>' will mark low scores as success.
Using '==' is too strict and only accepts exactly 80.
2fill in blank
medium

Complete the code to define a function that returns True if the agent's task completion time is less than the allowed time.

Agentic AI
def success_criterion(completion_time, allowed_time):
    return completion_time [1] allowed_time
Drag options to blanks, or click blank then click option'
A<
B>
C>=
D==
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>' would mean finishing after the allowed time is success.
Using '==' is too strict and only accepts exact matches.
3fill in blank
hard

Fix the error in the success check that should return True if the agent's accuracy is at least 90%.

Agentic AI
def success_criterion(accuracy):
    return accuracy [1] 0.9
Drag options to blanks, or click blank then click option'
A>=
B<
C<=
D==
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' or '<=' would mark low accuracy as success.
Using '==' only accepts exactly 0.9 accuracy.
4fill in blank
hard

Fill both blanks to create a success criterion that returns True if the agent's reward is greater than 50 and the error is less than 0.1.

Agentic AI
def success_criterion(reward, error):
    return reward [1] 50 and error [2] 0.1
Drag options to blanks, or click blank then click option'
A>
B<
C>=
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>=' or '<=' changes the strictness of the condition.
Mixing up the operators reverses the logic.
5fill in blank
hard

Fill all three blanks to define a success criterion that returns True if the agent's score is at least 75, time is less than 120, and errors are at most 5.

Agentic AI
def success_criterion(score, time, errors):
    return score [1] 75 and time [2] 120 and errors [3] 5
Drag options to blanks, or click blank then click option'
A>=
B<
C<=
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>' instead of '>=' excludes exact 75 score.
Using '>' or '>=' for time or errors reverses the logic.