0
0
Agentic AIml~20 mins

Building custom tools in Agentic AI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Agentic AI Custom Tools Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Tool Integration in Agentic AI

Which of the following best describes the primary purpose of building custom tools in an agentic AI system?

ATo replace the AI's core reasoning engine with simpler rules
BTo increase the AI's training dataset size automatically
CTo reduce the AI model's size for faster inference
DTo enable the AI to perform specific tasks by interacting with external systems or APIs
Attempts:
2 left
💡 Hint

Think about why an AI would need to connect to outside services or perform actions beyond just generating text.

Predict Output
intermediate
2:00remaining
Output of a Custom Tool Invocation

Given the following Python code snippet for a custom tool in an agentic AI framework, what will be the output when the tool is called with input '5'?

Agentic AI
def multiply_by_two(input_value):
    return f"Result: {int(input_value) * 2}"

output = multiply_by_two('5')
print(output)
AResult: 10
BResult: 25
CResult: 5
DTypeError
Attempts:
2 left
💡 Hint

Check how the input string is converted and multiplied.

Hyperparameter
advanced
2:00remaining
Choosing Timeout for External Tool Calls

When building a custom tool that calls an external API within an agentic AI system, which timeout setting is most appropriate to balance responsiveness and reliability?

ASet timeout to 0.1 seconds to ensure the AI never waits long
BSet timeout to 5 seconds to allow reasonable wait but avoid long delays
CSet timeout to 30 seconds to allow slow responses without blocking
DDo not set a timeout to wait indefinitely for the API response
Attempts:
2 left
💡 Hint

Consider user experience and network variability.

Metrics
advanced
2:00remaining
Evaluating Custom Tool Effectiveness

Which metric is most suitable to evaluate the success of a custom tool integrated into an agentic AI that performs data retrieval tasks?

AAccuracy of the AI's language generation
BLatency of the tool's response time
CPrecision and recall of the retrieved data matching user queries
DNumber of parameters in the AI model
Attempts:
2 left
💡 Hint

Think about how well the tool returns relevant information.

🔧 Debug
expert
3:00remaining
Debugging a Custom Tool Integration Failure

Consider this Python code snippet for a custom tool in an agentic AI system that queries a weather API. The tool always returns 'None' instead of the expected temperature string. What is the most likely cause?

import requests

def get_temperature(city):
    response = requests.get(f"https://api.weather.com/temp?city={city}")
    if response.status_code == 200:
        data = response.json()
        return data['temperature']

print(get_temperature('London'))
AThe API URL is incorrect or missing required parameters, causing no valid data returned
BThe function does not convert the temperature to string before returning
CThe requests library is not imported correctly
DThe function should use POST instead of GET method
Attempts:
2 left
💡 Hint

Check if the API URL and parameters match the expected API specification.