0
0
Agentic AIml~10 mins

Why evaluation ensures agent reliability in Agentic AI - Test Your Understanding

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

Complete the code to calculate the accuracy of an agent's predictions.

Agentic AI
accuracy = sum(predictions == [1]) / len(predictions)
Drag options to blanks, or click blank then click option'
Alabels
Bpredictions
Coutputs
Dresults
Attempts:
3 left
💡 Hint
Common Mistakes
Using predictions instead of labels for comparison.
2fill in blank
medium

Complete the code to split data into training and testing sets.

Agentic AI
train_data, test_data = data[:[1]], data[[1]:]
Drag options to blanks, or click blank then click option'
A0.7
B0.3
Cint(len(data) * 0.7)
Dlen(data)
Attempts:
3 left
💡 Hint
Common Mistakes
Using float 0.7 directly as index causes error.
3fill in blank
hard

Fix the error in the code that calculates the mean squared error (MSE).

Agentic AI
mse = sum((predictions - [1]) ** 2) / len(predictions)
Drag options to blanks, or click blank then click option'
Alabels
Bpredictions
Coutputs
Dresults
Attempts:
3 left
💡 Hint
Common Mistakes
Subtracting predictions from predictions results in zero error.
4fill in blank
hard

Fill both blanks to create a dictionary of word lengths for words longer than 3 letters.

Agentic AI
{word: [1] for word in words if len(word) [2] 3}
Drag options to blanks, or click blank then click option'
Alen(word)
Bword.upper()
C>
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using word.upper() instead of length.
Using '<=' instead of '>'.
5fill in blank
hard

Fill all three blanks to create a filtered dictionary with uppercase keys and values greater than 0.

Agentic AI
result = { [1]: [2] for k, v in data.items() if v [3] 0 }
Drag options to blanks, or click blank then click option'
Ak.upper()
Bv
C>
Dk.lower()
Attempts:
3 left
💡 Hint
Common Mistakes
Using k.lower() instead of k.upper().
Using '<' instead of '>'.