4 ms·
I'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 quer
by aussieguy1234 3y ago
I'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.
- zainhoda 3y agoAuthor of the package here. That's pretty much what this package does just with optimization around what context gets sent to the LLM about the database: https://github.com/vanna-ai/vanna/blob/main/src/vanna/base/base.py#L27-L39 https://github.com/vanna-ai/vanna/blob/main/src/vanna/base/b... And then of course once you have the SQL, you can put it in an interface where you the SQL can be run automatically and then get a chart etc.
- lopatin 3y agoWhat 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.
- zainhoda 3y agoI've noticed this as well. Do you have any theories as to why that is?
- hot_gril 3y agoI already know SQL, and yes it can take time to form exceptionally complex queries, but ChatGPT doesn't seem to do those accurately (yet). CGPT is more useful for general programming languages where there's a lot more boilerplate.
- aussieguy1234 3y agoI've found GPT-4 to be alot better than the free version of ChatGPT (which uses the earlier GPT 3.5).
- hot_gril 3y agoIt is. I should've mentioned that I don't have access to that. But I can still hammer out correct SQL faster than I can prompt ChatGPT.
- bongodongobob 3y agoI 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.
- upmostly 3y agoNail. 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.
- EZ-E 3y agoSame for excel - I suck at it but ChatGPT is really good at writing these formulas. I feel this is one area LLMs are pretty good at.