Model Pipeline - Tool selection by the agent
This pipeline shows how an AI agent chooses the right tool to solve a task. The agent looks at the input, thinks about available tools, picks one, and uses it to get the answer.
Jump into concepts and practice - no test required
This pipeline shows how an AI agent chooses the right tool to solve a task. The agent looks at the input, thinks about available tools, picks one, and uses it to get the answer.
Loss
1.0 |****
0.8 |***
0.6 |**
0.4 |*
0.2 |*
0.0 +----
1 2 3 4 5 Epochs| Epoch | Loss ↓ | Accuracy ↑ | Observation |
|---|---|---|---|
| 1 | 0.85 | 0.60 | Initial tool selection is random, accuracy is low. |
| 2 | 0.65 | 0.75 | Agent learns to better match tools to tasks. |
| 3 | 0.45 | 0.85 | Tool scoring improves, selection accuracy rises. |
| 4 | 0.30 | 0.92 | Agent reliably picks correct tool. |
| 5 | 0.20 | 0.95 | Training converges with high accuracy. |
calculator should be used for a task containing the word 'math'?'math' in task_description.tools = ['calculator', 'translator', 'weather']
task = 'translate this sentence'
selected_tool = None
for tool in tools:
if tool in task:
selected_tool = tool
break
print(selected_tool)None. What is the error?
tools = {'calc': 'calculator', 'trans': 'translator'}
task = 'please compute this'
selected_tool = None
for key in tools:
if key in task:
selected_tool = tools[key]
print(selected_tool)