I’m currently working on a LangChain agent and need some help with making a DataFrame (df) accessible to the agent. Here’s a quick overview of what I’m trying to achieve:
The agent has access to several function tools.
These tools require a DataFrame (df) as a parameter.
The agent’s task is to call these tools, passing the data stored in a df variable.
My Question:
Is there a way to ensure that the df variable is accessible to the agent so it can successfully pass the data to the function tools?
Any guidance or examples would be greatly appreciated!
Thanks in advance!
I tried passing the data in prompt template, but it takes more than 30 seconds. In this part, the agent reformats the data then only pass. But I want the agent to pass the variable.
I also tired creating a tool function that uses query to fetch data from the database and store it in variable. But it llm used agent still converts to json format then passes it.
I want the llm to take the variable and pass it without any formatting ( to save time).
Sumit Thokar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.