When user query about a specific flight (agent return "the flight is UA xxx departing at xx/xx/xx"), and then asked a follow-up question (e.g. What is the departure gate?), the agent returned a flight using the get_flight tool with the wrong parameter (flight_number as id).
The langchain memory only includes previous conversation (and not query results), hence, it will not have access to the id if it is not mentioned in past conversation. In the above example, the agent mistaken flight number as id.
Removing get_flight endpoints seems to help with this. Manually tested and seems to help by limiting the number of tools for the agent. Currently, there are no foreseeable scenario when the agent will use get endpoints (with id), hence decided to remove get endpoints for all the dataset (including airport and amenities as well).
When user query about a specific flight (agent return "the flight is UA xxx departing at xx/xx/xx"), and then asked a follow-up question (e.g. What is the departure gate?), the agent returned a flight using the get_flight tool with the wrong parameter (flight_number as id).
The langchain memory only includes previous conversation (and not query results), hence, it will not have access to the id if it is not mentioned in past conversation. In the above example, the agent mistaken flight number as id.
Removing get_flight endpoints seems to help with this. Manually tested and seems to help by limiting the number of tools for the agent. Currently, there are no foreseeable scenario when the agent will use get endpoints (with id), hence decided to remove get endpoints for all the dataset (including airport and amenities as well).