Viewing a single comment thread. View all comments

jaxolingo OP t1_je7c63z wrote

Cool, this is exactly the approach I had in mind that the model would take

5

gstatton t1_je7mwmv wrote

I’ve done something similar to this, but I created a view in snowflake, dumped the ‘describe table <table-name>’ to CSV, used that CSV descriptor in the head of the prompt, and asked the LLM to generate a SQL query from the user’s question using the provided table schema…I’ll take the model’s return and pass it directly to snowflake, return it as a data frame, and then send that back to the LLM to get a text summary of the query results

You can also use LangChain to set up the chain to do this automatically..

3