Hey! Loving GPT Index, it's got so much potential as LLM become more ubiquitous!!
I've got a question on structured indexes - I'd like to query across multiple tables, but it looks like on the existing functions, you need to specify a specific table to query against. Is there a way to build the indexes so the LLM can infer or understand relationships between tables?
As an example, if I have table 1: action_name user_id Thing 1 99 Thing2 105
table 2 user_id user_type 99 admin 105 normal
I'd like to be able to ask "What actions have admins taken?" and receive the response " admins have done thing 1"
Is this question generic or specific? I feel like it could be hard to do that in a generic way, but if there are specific pieces of context you want to inject into queries you could always do that outside of the GPT index and include it in your query
You could always put documents from various different sources into the same index and encode the relationship between tables in the document metadata perhaps. This package is growing quickly and I'm sure someone will build in more advanced sql functionality at some point
@Chris with the latest update I believe you should be able to query across multiple tables! The catch is that if you want to infer structured data from text, you can only do that for one table atm.
we are basically reusing langchain's SQL wrapper, which given a set of tables, will put all the tables into the prompt, allowing a text-to-SQL query prompt to make use of all the tables (so that the LLM can try to use relationships between tables)
@jerryjliu0 Hi Jerry - any pointer for someone interested in text-to-graphQL query prompt? I have a bunch of endpoints that I'd like to query against. Thanks!