Vanna 2.0:How to provide DDL, business knowledge, and SQL examples to Vanna 2.0 for correct SQL generation ? #1027
Replies: 2 comments 1 reply
-
|
Here is what I'm doing (I'm a novice at vanna btw): def get_schema_documentation(): I have a LlmContextEnhancer that uses that includes that information with the prompt: It works pretty well. I see that their enhancer code has a primitive way of only including "relevant" schema information, but it seems simplistic and error prone, so I just give the prompt everything. My schema only has 60 tables. |
Beta Was this translation helpful? Give feedback.
-
|
I don't know. My schema has 60 tables, probably 500 columns.
Jeff Burton
***@***.*** ***@***.***>*
*715-222-5655*
…On Sat, Nov 29, 2025, 8:24 AM عبدالرحمن احمد هاشم علي < ***@***.***> wrote:
@jeffsburton <https://github.com/jeffsburton> Would this be robust on
handling the large schemas
—
Reply to this email directly, view it on GitHub
<#1027 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BDUDCN4TVUYFKPGCD6KYN7T37GUCFAVCNFSM6AAAAACND4NSR6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKMJRGE4TEOI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Vanna team,
I am trying to use Vanna 2.0 with my MySQL database. Here is a simplified version of my setup:
When I ask questions in the frontend, I expect Vanna to generate correct SQL and display the results. However, it seems that Vanna does not understand my database schema, and the generated SQL is incorrect.
In Vanna 0.x, I could do:
to teach Vanna about the database schema, business knowledge, and SQL examples.
In Vanna 2.0, I could not find similar functionality. I assumed Vanna would automatically retrieve the database DDL from the sql runner, but that does not seem to be the case.
My question:
What is the recommended way in Vanna 2.0 to provide:
so that the agent can generate correct SQL queries?
Any guidance or examples would be greatly appreciated.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions