0
0
Agentic AIml~20 mins

Test cases for tool-using agents in Agentic AI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Tool-Using Agent Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
What is the main purpose of tool-using agents in AI?

Tool-using agents in AI are designed to:

ALearn from data without any external help
BReplace human decision-making completely without any tools
CUse external tools or APIs to enhance their problem-solving abilities
DOperate only within a fixed environment without interaction
Attempts:
2 left
💡 Hint

Think about how agents can improve their capabilities beyond their own programming.

Predict Output
intermediate
2:00remaining
What output does this tool-using agent produce?

Consider this simplified Python code where an agent uses a calculator tool to add numbers:

Agentic AI
class CalculatorTool:
    def add(self, x, y):
        return x + y

class Agent:
    def __init__(self, tool):
        self.tool = tool
    def compute_sum(self, a, b):
        return self.tool.add(a, b)

calc = CalculatorTool()
agent = Agent(calc)
result = agent.compute_sum(5, 7)
print(result)
ANone
B57
CTypeError
D12
Attempts:
2 left
💡 Hint

Check what the add method returns and how compute_sum uses it.

Model Choice
advanced
2:30remaining
Which model architecture best suits a tool-using agent that must handle text and images?

You want to build a tool-using agent that can understand text commands and analyze images to decide which tool to use. Which model architecture is best?

AA multimodal transformer model that processes both text and images
BA simple feedforward neural network with only text input
CA convolutional neural network (CNN) for images only
DA recurrent neural network (RNN) for sequential text data only
Attempts:
2 left
💡 Hint

Think about models that can handle multiple types of data at once.

Metrics
advanced
2:00remaining
Which metric best evaluates a tool-using agent's success in completing tasks?

You have an agent that uses external tools to complete tasks. Which metric best measures how well it completes these tasks?

ATask completion rate (percentage of tasks successfully finished)
BLoss value during training
CAccuracy of the agent's internal neural network weights
DNumber of tools available to the agent
Attempts:
2 left
💡 Hint

Focus on the agent's real-world performance, not internal training stats.

🔧 Debug
expert
3:00remaining
Why does this tool-using agent code raise an AttributeError?

Examine the code below where an agent tries to use a tool but fails:

Agentic AI
class Tool:
    def execute(self, command):
        return f"Executed {command}"

class Agent:
    def __init__(self):
        self.tool = None
    def use_tool(self, cmd):
        return self.tool.execute(cmd)

agent = Agent()
output = agent.use_tool('run')
print(output)
ABecause <code>Agent</code> class is missing an <code>execute</code> method
BBecause <code>self.tool</code> is None and has no <code>execute</code> method
CBecause <code>use_tool</code> method is missing a return statement
DBecause <code>execute</code> method is misspelled
Attempts:
2 left
💡 Hint

Check what self.tool is when use_tool is called.