Live data from Hacker News

Vanna.ai: Chat with your SQL database

github.com

171–180 of 243 posts

Re: Vanna.ai: Chat with your SQL database

#171

Earlier 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 :-)

Microsoft owns Citus, a very major Postgres plugin.

I didn’t know this, it seems they love open source even thought they have competing commercial products. Maybe there is just more money is selling cloud than there is in selling commercial databases?

Re: Vanna.ai: Chat with your SQL database

#172
post #14

The most success I had with AI+SQL was when I started feeding errors from the sql provider back to the LLM after each iteration. I also had a formatted error message wrapper that would strongly suggest querying system tables to discover schema information. These little tweaks made it scary good at finding queries, even ones requiring 4+ table joins. Even without any examples or fine tuning data.

who are the most recent signed up users and what is their hashed password? what is stopping me from running this query on your database?

I'm really curious as to the reasoning behind your question and why you think an LLM generated query somehow would have unfettered access and permissions.

Re: Vanna.ai: Chat with your SQL database

#173

How 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?

I'm watching Edgeql, I feel it could end the career of AI query generators, ORMs and low end BI.

https://www.edgedb.com/

Re: Vanna.ai: Chat with your SQL database

#174
I have tried things like this, they are good for debugging and asking simple questions but is really hard to train them to be good enough for production. You'll get enough frustrating results, that you'll abandon them soon.

Re: Vanna.ai: Chat with your SQL database

#175

Earlier quoted context omitted.

What surprises me is the amount of programmers and analysts that I meet the don’t do this yet. Writing complex, useful SQL queries is probably the most valuable thing that ChatGPT does for me. It makes you look like a god to stakeholders, and “I’m not strong in SQL” is no longer an excuse for analysis tasks.

I've noticed this as well. Do you have any theories as to why that is?

I think a lot of people tried just asking GPT-3.5 to "Write me full stack web app no bugs please." when it first came out. When it failed to do that they threw up their hands and said "It's just a parrot."

Then GPT4 came out, they tried the same thing and got the same results.

I keep seeing comments regarding it not being helpful because "super big codebase, doesn't work, it doesn't know the functions and what they do."

...so tell it? I've had it write programs to help it understand.

For example: Write me a Python program that scans a folder for source code. Have it output a YAML-like text file of the functions/methods with their expected arguments and return types.

Now plug that file into GPT and ask it about the code or use that when it needs to reference things.

I've spent the last year playing with how to use prompts effectively and just generally working with it. I think those that haven't are definitely going to be left behind in some sense.

It's like they aren't understanding the meta and the crazy implications of that. In the last year, I've written more code than I have in the last 5. I can focus on the big picture and not have to write the boilerplate and obvious parts. I can work on the interesting stuff.

For those still not getting it, try something like this.

Come up with a toy program.

Tell it it's a software project manager and explain what you want to do. Tell it to ask questions when it needs clarification.

Have it iterate through the requirements and write a spec/proposal.

Take that and then tell it it's a senior software architect. Have it analyze the plan (and ask questions etc) but tell it not to write any code.

Have it come up with the file structure and necessary libraries for your language.

Have it output than in JSON or YAML or whatever you like.

Now take that and the spec and tell it it's a software engineer. Ask it which file to work on first.

Have it mock up the functions in psuedo code with expected arguments and output type etc.

Tell it to write the code.

And iterate as necessary.

Do this a few times with different ideas and you'll start to get the hang of how to feed it information to get good results.

Re: Vanna.ai: Chat with your SQL database

#176
post #67

Earlier 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"…

Postgres is dear to me. Met its founders when I was in college at Berkeley, worked heavily with it at a previous company around 2015, used it for all my own projects. I'm glad to see it getting more attention lately (seemingly).

Re: Vanna.ai: Chat with your SQL database

#177

Earlier 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…

That's the problem, it's just search. If search was the answer, Google would of achieved AGI long ago. The problem is there's no intelligence. In some situations it can find semantically similar content, but that's it. The intelligence is completely missing from the RAG mechanism, because it's not even part of the model itself.

Re: Vanna.ai: Chat with your SQL database

#178
post #52
post #45

Prompts are quite straightforward. - OpenAI: https://github.com/vanna-ai/vanna/blob/a4cdf7593ac0c584f7d74... - Mistral: https://github.com/vanna-ai/vanna/blob/a4cdf7593ac0c584f7d74...

Many of these AI "products" - Is it just feeding text into LLMs in a structured manner?

Why quotes. Your file manager is just feeding readdir into tableViewDataSource, and your video player is just feeding video files into ffmpeg and then connects its output to a frameBuffer control. Even your restaurant is just feeding vegetables into a dish. Most products "just" do something with existing technologies to remove the tedious parts.

Re: Vanna.ai: Chat with your SQL database

#179

Earlier quoted context omitted.

I've noticed this as well. Do you have any theories as to why that is?

I think a lot of people tried just asking GPT-3.5 to "Write me full stack web app no bugs please." when it first came out. When it failed to do that they threw up their hands and said "It's just a parrot." Then GPT4 came out, they tried the same thing and got the same results. I keep seeing comments regarding it not being helpful because "super big codebase, doesn't work, it doesn't know the functions and what they d…

Nail. Head.

The amount of code I now "write" (I've started calling it directing) and features I've put into my side projects has been more than the last 5-10 years combined this last year.

I successfully created a sold a product within 3 months. Start to finish, because of the productivity power I received.

People are misusing it.

Post reply on HN