LLM filtering some data from tool response.
I've been notice a strange behaviour since a few months. We have a tool that returns a list of restaurants, in json format. The LLM constantly avoid saying the names of the restaurants when generating a message following the tool response. For example, look at the messages below:
{
"name": "get_restaurants",
"role": "tool_call_result",
"time": 1722870773304,
"result": "Zia Lucia; Brasserie Blanc; Duck & Waffle; New Street Grill; Tinseltown; Emilia's Crafted Pasta; Cabotte; Barcelona Tapas Bar & Restaurant",
"toolCallId": "call_kkxHmJO2KO9c2qxnwvgbzWOL",
"secondsFromStart": 68.439
}
{
"role": "bot",
"time": 1722870773417,
"source": "",
"endTime": 1722870805967,
"message": "Hold on a sec. Here are some excellent dining options in the Aldgate East area. 1, known for its delicious pizzas with a variety of dough options. 2, offers classic French cuisine in a relaxed setting. 3, a unique dining experience with British and European dishes located high above the city with stunning views. 4, a great spot for steak and seafood lovers. 5, an American style diner with a wide range of comfort food. 6. Specializes in fresh handmade pasta dishes.",
"secondsFromStart": 68.29
}
It happens constantly. I have tried to return the data from the tool in json format, and also plain text, as in the logs above, but there no change in the behaviour.
Is there some intentional filtering of names going on in background?
You will also notice that in the bot generated message, there are information not provided by the tool. Those information were provided in the first version of the tool response, so it looks like the bot message has been generated from cached data somehow?
Finally, if I have the tool to return something like "we do not have any restaurants in that location", the LLM correctly says that there are not restaurants available. I've tried all the different flavours of gpt4. Anthropic models seem to work correctly.
{
"name": "get_restaurants",
"role": "tool_call_result",
"time": 1722870773304,
"result": "Zia Lucia; Brasserie Blanc; Duck & Waffle; New Street Grill; Tinseltown; Emilia's Crafted Pasta; Cabotte; Barcelona Tapas Bar & Restaurant",
"toolCallId": "call_kkxHmJO2KO9c2qxnwvgbzWOL",
"secondsFromStart": 68.439
}
{
"role": "bot",
"time": 1722870773417,
"source": "",
"endTime": 1722870805967,
"message": "Hold on a sec. Here are some excellent dining options in the Aldgate East area. 1, known for its delicious pizzas with a variety of dough options. 2, offers classic French cuisine in a relaxed setting. 3, a unique dining experience with British and European dishes located high above the city with stunning views. 4, a great spot for steak and seafood lovers. 5, an American style diner with a wide range of comfort food. 6. Specializes in fresh handmade pasta dishes.",
"secondsFromStart": 68.29
}
It happens constantly. I have tried to return the data from the tool in json format, and also plain text, as in the logs above, but there no change in the behaviour.
Is there some intentional filtering of names going on in background?
You will also notice that in the bot generated message, there are information not provided by the tool. Those information were provided in the first version of the tool response, so it looks like the bot message has been generated from cached data somehow?
Finally, if I have the tool to return something like "we do not have any restaurants in that location", the LLM correctly says that there are not restaurants available. I've tried all the different flavours of gpt4. Anthropic models seem to work correctly.