"# Controlling Agent Reasoning Loop with Return Direct Tools\n",
"# Controlling Agent Reasoning Loop with Return Direct Tools\n",
"\n",
"\n",
"All tools have an option for `return_direct` -- if this is set to `True`, and the associated tool is called (without any other tools being called), the agent resoning loop is ended and the tool output is returned directly.\n",
"All tools have an option for `return_direct` -- if this is set to `True`, and the associated tool is called (without any other tools being called), the agent reasoning loop is ended and the tool output is returned directly.\n",
"\n",
"\n",
"This can be useful for speeding up resonse times when you know the tool output is good enough, to avoid the agent re-writing the response, and for ending the resoning loop."
"This can be useful for speeding up response times when you know the tool output is good enough, to avoid the agent re-writing the response, and for ending the reasoning loop."
]
]
},
},
{
{
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
"This notebook walks through a notebook where an agent needs to gather information from a user in order to make a resturant booking."
"This notebook walks through a notebook where an agent needs to gather information from a user in order to make a restaurant booking."
]
]
},
},
{
{
...
@@ -127,7 +127,7 @@
...
@@ -127,7 +127,7 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
"## A user has walked in! Lets help them make a booking"
"## A user has walked in! Let's help them make a booking"
]
]
},
},
{
{
...
...
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
# Controlling Agent Reasoning Loop with Return Direct Tools
# Controlling Agent Reasoning Loop with Return Direct Tools
All tools have an option for `return_direct` -- if this is set to `True`, and the associated tool is called (without any other tools being called), the agent resoning loop is ended and the tool output is returned directly.
All tools have an option for `return_direct` -- if this is set to `True`, and the associated tool is called (without any other tools being called), the agent reasoning loop is ended and the tool output is returned directly.
This can be useful for speeding up resonse times when you know the tool output is good enough, to avoid the agent re-writing the response, and for ending the resoning loop.
This can be useful for speeding up response times when you know the tool output is good enough, to avoid the agent re-writing the response, and for ending the reasoning loop.
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
This notebook walks through a notebook where an agent needs to gather information from a user in order to make a resturant booking.
This notebook walks through a notebook where an agent needs to gather information from a user in order to make a restaurant booking.