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.
Vanna.ai: Chat with your SQL database
171–180 of 243 posts
Re: Vanna.ai: Chat with your SQL database
#172The 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?
Re: Vanna.ai: Chat with your SQL database
#173How 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?
Re: Vanna.ai: Chat with your SQL database
#174Re: Vanna.ai: Chat with your SQL database
#175Earlier 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?
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
#176Earlier 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
#177Earlier 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
#178Prompts 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?
Re: Vanna.ai: Chat with your SQL database
#179Earlier 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…
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.