vanna-ai / vanna

🤖 Chat with your SQL database 📊. Accurate Text-to-SQL Generation via LLMs using RAG 🔄.
https://vanna.ai/docs/
MIT License
11.04k stars 862 forks source link

Add comment column to training plan for increased LLM understanding #297

Closed jonnyeqt closed 6 months ago

jonnyeqt commented 6 months ago

When using dbt, it is possible to persist column documentation as comments. By including that information in Vanna, it increases the probability of finding the correct query.

zainhoda commented 6 months ago

I love this! The one thing is that the column may not exist in all information schema and I believe as written it will fail. Would you be able to take a stab at making the comment column optional? No worries at all if you don't have time -- I can either do it myself or get someone else involved.

jonnyeqt commented 6 months ago

I love this! The one thing is that the column may not exist in all information schema and I believe as written it will fail. Would you be able to take a stab at making the comment column optional? No worries at all if you don't have time -- I can either do it myself or get someone else involved.

Alright, I did an updated take on it to have a list of optional columns, and I then moved some of the other ones there as well. This should make it easier to add columns later on as well.