Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to initialize the agent with the correct tool.
Agentic AI
agent = Agent(tools=[[1]]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'train_model' instead of a tool for searching.
Confusing data loader with a tool for the agent.
✗ Incorrect
The agent needs a search tool to perform queries, so 'search_tool' is the correct initialization.
2fill in blank
mediumComplete the code to run the agent with the input query.
Agentic AI
response = agent.[1](input_query) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'train' which is for model training, not running the agent.
Using 'load' which is for loading data or models.
✗ Incorrect
The method to execute the agent on an input is 'run', so 'agent.run(input_query)' is correct.
3fill in blank
hardFix the error in the agent's tool usage by completing the code.
Agentic AI
result = agent.tools[0].[1](query)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Calling 'execute' which is not defined for the tool.
Using 'train' which is for model training.
✗ Incorrect
The tool is a search tool, so the correct method to call is 'search' to get results.
4fill in blank
hardFill both blanks to correctly define the agent's tool and method call.
Agentic AI
agent = Agent(tools=[[1]]) output = agent.tools[0].[2](input_text)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'train_model' as a tool when the agent needs a search tool.
Calling 'compile' which is not a valid method for the tool.
✗ Incorrect
The agent uses 'search_tool' and calls its 'search' method to process input_text.
5fill in blank
hardFill all three blanks to correctly initialize the agent, run it, and get the result.
Agentic AI
agent = Agent(tools=[[1]]) response = agent.[2](query) result = response.[3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'train_model' instead of 'search_tool'.
Calling 'train' instead of 'run' to execute the agent.
Accessing a wrong attribute instead of 'output'.
✗ Incorrect
The agent is initialized with 'search_tool', run with 'run', and the result is accessed via 'output'.