Earlier quoted context omitted.
What technical benefits?
A translation engine between natural language and SQL means that everyone can communicate with a SQL database now. That's huge. Soon also DB people will use it to get the response for complex questions and queries. It's just more natural and way faster. With technology like this, there is little reason to even know SQL anymore as the average developer. Just like today, the average developer doesn't know how databases…
Vanna.ai: Chat with your SQL database
151–160 of 243 posts
Re: Vanna.ai: Chat with your SQL database
#152Earlier quoted context omitted.
> In the age of ORMs and so on, many people have probably forgotten how to write raw SQL queries. I’ve heard this general sentiment repeated quite a lot - mostly by people that don’t use ORMs. In my experience pretty quickly you reach the limits of even the best ORMs and need to write some queries by hand. And these tend to be the relatively complicated queries. You need to know about all of the different join types,…
ORM abuse are absolutely rife in small-scale/volume build industries i.e. web agencies, outsourced crews 8/10 projects I look into don't have any indexes set up. Use of ORMs with little thought into lazily loaded relations lead to 100s of queries being done per request. It's pretty mad. Do not underestimate the propensity of a developer to stick to the only tool they know how to use. Unfortunately ORMs like Eloquent…
Well that could explain it. I’ve only worked in companies where everyone working on the app codes with the expectation that they could be dealing with their mistakes for years.
Re: Vanna.ai: Chat with your SQL database
#153Earlier quoted context omitted.
It would be for people who are not that fluent in SQL. Even as a dev, I find ChatGPT to be easier for writing queries than hand coding them as I do it so infrequently.
Yeah, same here. Seems like that approach is much simpler than this. I guess the real benefit here is that you don’t need to understand the schemas so the knowledge is not lost when someone leaves a company. Sort of an abstraction layer for the schemas
Re: Vanna.ai: Chat with your SQL database
#154Earlier quoted context omitted.
All the podcasts I've been listening to recommend RAG over fine-tuning. My intuition is that having the relevant knowledge in the context rather than the weights brings it closer to the outputs, thereby making it much more likely to provide accurate information and avoid hallucinations/confabulations.
> All the podcasts I've been listening to recommend RAG over fine-tuning I'm always suspicious that is just because RAG is so much more accessible (both compute wise and in terms of expertise required). There's far more profit in selling something accessible to the masses to a lot of people than something only a niche group of users can do. I think most people who do actual fine tuning would still probably then use R…
Re: Vanna.ai: Chat with your SQL database
#155Earlier quoted context omitted.
Curious, as we're looking to build / use a similar setup. > Debugging LLM prompts is just tricky... Customers can confuse the model pretty easily. Would a RAG like how Vanna.ai uses, help? > For example, sometimes it forgets to check one or another field Do prompting techniques like CoT improve the outcome? > So we need to teach customers to nudge the report generator a bit towards generic terms. Did you folks experi…
Our primary issue is that our DB is a dynamic Entity-Attribute-Value schema, even quite a bit denormalized at that. The model has to remember to do subqueries to retrieve "attributes" based on what's needed for the query and then combine them correctly. NLQ is a somewhat new feature for us, so we don't have a great library to pull from for RAG. Experimenting, I found that having a few-shot examples with some CoT (sho…
Re: Vanna.ai: Chat with your SQL database
#156I'm curious to see if people have tried this out with their datasets and seen success? I've been using similar techniques at work to build a bot that allows employees internally to talk to our structured datasets (a couple MySQL tables). It works kind of ok in practice, but there are a few challenges: 1. We have many enums and data types specific to our business that will never be in these foundation models. Those ha…
Re: Vanna.ai: Chat with your SQL database
#157How about instead of making AI wrappers to over 50 years old SQL, we’d make a database query language that’s easier to read an write?
In general, if something has been around for a very long time and nobody apparently seems to have thought to improve it, then odds are the reason is it's pretty good and genuinely hard to improve on.
Re: Vanna.ai: Chat with your SQL database
#158Earlier quoted context omitted.
It doesn't matter, RAG is very temporary and will not be around long imho.
RAG, at its core, is a very human way of doing research, because RAG is essentially just building a search mechanism for a reasoning engine. Much like human research. Your boss asks you to look into something, and you do it through a combination of structured and semantic research. Perhaps you get some books that look relevant, you use search tools to find information, you use structured databases to find data. Then…
Re: Vanna.ai: Chat with your SQL database
#159Thanks so much for making this and making it under MIT to boot. I’ve been thinking about how to do this for about 6 months now and just started working on a demo for querying just one table // JSON column today. I would feel a lot more comfortable with putting this (and/or my demo) into production if the database had been set up with a schema+db user per account rather than every tenant sharing just the one set of ta…
Re: Vanna.ai: Chat with your SQL database
#160im curious to know how you get around the hallucinations? for example, for the query: "give me that were created yesterday" the llm hallucinates as to what "yesterday" means, there are other instances as well where the generated SQL is valid syntax-wise but not in intent. This is especially dangerous for aggregation queries such as MAX, COUNT, etc because it will spit out a number but is it the right number? and the…
- phantom tables and columns, in which case the query will fail
- incorrect syntax for date functions (i.e. the wrong flavor of SQL)
And we tend to see less of this type of hallucination when there are lots of example SQL queries that have been "trained" into the RAG system.