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 only way to check is to read the SQL itself and verify, which defeats the whole purpose of it.
Vanna.ai: Chat with your SQL database
131–140 of 243 posts
Re: Vanna.ai: Chat with your SQL database
#132I have been keeping track of a few products like these including some that are YC backed. Interesting space as I am looking for a solution myself: - Minds DB (YC W20) https://github.com/mindsdb/mindsdb - Buster (YC W24) https://buster.so - DB Pilot https://dbpilot.io and now this one
A bit unusual compared to the above, we find operational teams need more than just SQL, but also Python and more operational DBs (Splunk, OpenSearch, graph DBs, Databricks, ...). Likewise, due to our existing community there, we invest a lot more in data viz (GPU, ..) and AI + graph workflows. These have been through direct use, like Python notebooks & interactive dashboards except where code is more opt-in where desired or for checking the AI's work, and new, embedded use for building custom apps and dashboards that embed conversational analytics.
Re: Vanna.ai: Chat with your SQL database
#133Earlier quoted context omitted.
I will be extremely surprised if Microsoft build this for open source databases, however someone else will definitely build it if you don't, that is completely true :-)
Disclaimer: I work at Microsoft on Postgres related open source tools (Citus & PgBouncer mostly) Microsoft is heavily investing in Postgres and its ecosystem, so I wouldn't be extremely surprised if we would do this. We're definitely building things to combine AI with Postgres[1]. Although afaik no-one is working actively on query generation using AI. But I actually did a very basic POC of "natural language queries"…
Re: Vanna.ai: Chat with your SQL database
#134Re: Vanna.ai: Chat with your SQL database
#135Earlier quoted context omitted.
Please turn this into a product. There's enormous demand for that.
You can check this out https://www.sqlai.ai . It has AI-powered generators for: - Generate SQL - Generate optimized SQL - Fix query - Optimize query - Explain query Disclaimer: I am the solo developer behind it.
Re: Vanna.ai: Chat with your SQL database
#136I've already done this with GPT-4. It goes something like this: Here's the table structure from MySQL cli `SHOW TABLE` statements for my tables I want to query. Now given those tables, give me a query to show me my cart abandonment rate (or, some other business metric I want to know). Seems to work pretty well.
Re: Vanna.ai: Chat with your SQL database
#137I have been keeping track of a few products like these including some that are YC backed. Interesting space as I am looking for a solution myself: - Minds DB (YC W20) https://github.com/mindsdb/mindsdb - Buster (YC W24) https://buster.so - DB Pilot https://dbpilot.io and now this one
It's not a public facing product, but there was a talk from a team at Alibaba a couple of months ago during CMU's "ML⇄DB Seminar Series" [0] on how they augmented their NL2SQL transformer model with "Semantics Correction [...] a post-processing routine, which checks the initially generated SQL queries by applying rules to identify and correct semantic errors" [1]. It will be interesting to see whether VC-backed teams…
Re: Vanna.ai: Chat with your SQL database
#138We did something similar for our reporting service which is based duckdb. Overall it works great, though we've ran into a few things: * Even with low temperature, GPT-4 sometimes deviates from examples or schema. For example, sometimes it forgets to check one or another field... * Our service hosts generic data, but customers ask to generate reports using their domain language (give me top 10 colors... what's a color…
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…
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 (showing examples of chaining attributes retrieval) sprinkled around did help a lot.
Even still, some queries come out quite ugly, but still functional. I'm thankful that DuckDB is a beast when tackling those :D
> Did you folks experiment with building an Agent-like interface that asks more questions before the LLM finally answers?
That's something I want to figure out next:
1) try to check if a generated query would work but would generate absolutely junk results (cause the model forgot to check something) and ask to rephrase
2) or show results (which may look "real" enough), but give an ability to tweak the prompt. A good example is something like "top 5 products on Cyber Monday" <- which returns 0 products, cause 2024 didn't happen yet, and should trigger a follow up.
Re: Vanna.ai: Chat with your SQL database
#139We did this at bit.io and people loved it - there a bunch of articles we wrote on what we found during our work: https://innerjoin.bit.io/ We’ve since shut down (acquired by databricks) but happy to answer what I can.
Super interesting! Why did you decide to shut down?
Re: Vanna.ai: Chat with your SQL database
#140Earlier 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…