Strange Tool Outputs to Inputs Conversion #81
Unanswered
jacobreesmontgomery
asked this question in
Get Help
Replies: 1 comment
-
Is this an intentional behavior from the Foundry SDK to look for a match between the tool output and the argument name and if so, extract the value from it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Background
I have a Foundry agent equipped with four different user-defined tools to enable natural language querying. In this case, I am instructing the agent to call on the tools in a specified, sequential order. Each of these tools returns a JSON-formatted string, and in some cases, I want to convert this JSON-formatted string to its Pydantic model equivalent at the beginning of the given tool. Importantly, these JSON-formatted strings, which are returned from each tool, are then ingested via a string argument in the next tool.
Here are the method signatures of each tool for further context:
The Issue
I am seeing a discrepency between the output of the prior tool and the input of the current tool, despite making zero data interventions on my side. It seems like the prior tool's output is getting chopped off before being passed to the next tool as an argument.
Example
_determine_relevant_tables_and_cols
:'{"relevant_tables_and_cols":[{"table_name":"some_table_name","columns":["col1", "col2", "col3"]}]}'
_prune_irrelevant_columns_from_database_schema
:'[{"table_name":"some_table_name","columns":["col1", "col2", "col3"]}]'
In this example, you can see that it's removing the
relevant_tables_and_cols
key and only retaining the values. I noticed this happening in other scenarios, too.The Desired Behavior
The desired outcome of mine is for the output of the previous tool to not change before becoming an input to the next tool. This would allow me to much more easily and predictably ingest the input back into a Pydantic model.
Any help would be very much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions