Hacker News new | ask | show | jobs
by crazy_marksman 1016 days ago
Impressive! Quick question - is it possible to generate sql for a slight variant of sql? My project augments standard sql with a few new constructs.
1 comments

It probably could but it would require adjusting the prompt. You’d have to override the generate_prompt function and tell it that you’re using a variant of SQL and describe the differences.
Is there a token limit for the train step? Like length of documentation, number of example SQL queries?
There isn't technically a limit on the storage side but it's generally better if you keep documentation to a manageable length.

You call vn.train(sql=...) on each individual SQL statement that you have.

What'll happen under the hood is the package will use the 10 most relevant SQL statement examples, 10 most relevant pieces of documentation, and 10 most relevant DDL statements.

If using 10 examples exceeds the (approximate) token limit for the model, it'll pare down to a smaller number that'll fit into the context limit.