Hi, I'm looking for something I can use to construct a pipeline where the LLM can construct SQL queries and execute them, then save the results into a pandas dataframe in memory and construct and execute code to produce new dataframe(s) or results from the generated dataframes
For example:
"Calculate net income by month for 2024 and show me the months where I lost money along with the loss"
- LLM constructs a plan for two sql queries to get revenue by month, expense by month
- Execute queries and save into two separate dataframes
- LLM can construct Pandas code, given the two dataframes, to join them and get the loss for each month
- Execute the code, get the result dataframe
Is this possible with LlamaIndex?