Use AI to chat with a SQL Database 4.0 - local AI, MySQL and Postgres, and more!

  Рет қаралды 2,643

The Code Wolf

The Code Wolf

Күн бұрын

Пікірлер: 52
@d3mist0clesgee12
@d3mist0clesgee12 16 сағат бұрын
Bro, I saw 3.0 but will be installing 4.0, thanks again.
@ventoshe
@ventoshe 11 күн бұрын
תודה!
@alexthecodewolf
@alexthecodewolf 11 күн бұрын
Thank you for your continued support!
@MartinMasella
@MartinMasella 12 күн бұрын
Damn, Alex. You did it again. Version 2.0 was great. Version 3.0 was amazing. And 4.0 is out of this world. Thanks a lot from Argentina, the land where Javier Milei wants to set up a Silicom Valley for delevoping AI. My boss won't believe his eyes when he sees what this tool has achieved.
@alexthecodewolf
@alexthecodewolf 12 күн бұрын
Thank you, I appreciate the feedback!
@billvaughn7126
@billvaughn7126 12 күн бұрын
Thank you for going down this path I see it having amazing potential for the non programmer (which I am).
@jinfreecs5347
@jinfreecs5347 2 күн бұрын
Great work i think, It's better to make this as library nuggets without ui to allow anyone to used it inside other projects it will be more helpful and useful this way
@cs2c_gabardaangelob.88
@cs2c_gabardaangelob.88 2 күн бұрын
Hi can I use the source codes in “Use AI to chat with a SQL database series” video tutorials ? for my study and school project purposes ??
@cezarpimentel
@cezarpimentel 2 күн бұрын
This pretty cool! Thanks for sharing that with us. I've trying to accomplish the same results, but without generating queries. I mean, in the end the AI is interpreting natural language to a query that is going to be executed. What I wanted is the AI to kind of contain the data and figure out based on my prompts what I am asking, and return to me the expected response like if I was talking to a human being. Is that even possible at the moment? Huge thanks once again.
@alexthecodewolf
@alexthecodewolf Күн бұрын
Thanks, this is sort of possible. For example the "nested chat" feature in the app on the right side bar already does this where you can chat about that result set that comes back. However, unless you index the database data into something like Azure AI Search, the AI isn't going to be able to directly crawl your database for answers without running SQL queries. Azure AI Search loses the relationship data when you index the raw table data though, so its not as good as cross-table queries. I think the closest thing to what you're looking for would be to still run queries but have the AI analyze the results before it gets displayed as a data table to produce a more chat-like response. You might quickly run into token limits with this though, right now the app can display unlimited results because that part is just going through the database and not the AI. A lot to think about here.
@cezarpimentel
@cezarpimentel Күн бұрын
@alexthecodewolf thanks for replying! Yeah, A LOT to think indeed 🤣. I tried using the indexed db in Azure, but the results were not what I was expecting. But hey, this app you created is awesome! Really nice job! Once again, thanks for sharing! 👊
@ventoshe
@ventoshe 12 күн бұрын
Thank you for keeping this awesome project improved 🙏🏻 How would you recommend directing the model to query the database for business insights (e.g. profitability, costs, forecasts etc.)? Would it be by the prompt level, adding database views, helper functions in code (i.e. plugins) etc.?
@alexthecodewolf
@alexthecodewolf 12 күн бұрын
Hey, good question here, I think it would be a combination of things. You could create a prompt that assembles the data set you're looking for, and then use the "nested chat" feature covered in 3.0 in the right side bar to talk about that data set and ask questions. A view like you mentioned would also be useful to perform analysis on - I can't remember if the app autodiscovers database views or not like it does tables, but that would certainly be useful. In my testing the AI is also able to turn prompts such as "What were my highest selling products for X date range" into queries successfully in some cases, so you could experiment with that as well.
@paritoshromy
@paritoshromy 9 күн бұрын
This is great. I would love to see how we can optimise the query output and make it more user friendly. If I were to deploy it to my users how can they best use it
@alexthecodewolf
@alexthecodewolf 9 күн бұрын
This is cool feedback, I think expanding the actual SQL query generation/display/editing part would be cool. Version 3.0 of this video talks a little bit more about that.
@stefanocastiglioni9741
@stefanocastiglioni9741 7 күн бұрын
Greta job ! Si it possible to query also view and stored proc ?
@saq21cool
@saq21cool 12 күн бұрын
Can you make a full length video where you show step by step how you build this app... It will be very helpful
@homerobaroni1655
@homerobaroni1655 12 күн бұрын
Nice idea!
@alexthecodewolf
@alexthecodewolf 12 күн бұрын
That's a good idea, but I'd have to think of how to present that effectively. The app took me a couple dozen hours to build overall (it does a lot more than what's shown in the video, such as all the deployment work in 3.0) and explaining things takes even longer, so I don't know how to capture that in a video in a digestible way.
@AliHassan-wc6nb
@AliHassan-wc6nb 4 күн бұрын
Please do it with deepseek locally, please keep each n everything locally.
@niranjanpanch2692
@niranjanpanch2692 2 күн бұрын
Hi , Thats a great tool! Is there a way to run this application as a docker container? I would like to run this container within my ECS/EKS and create a DNS to access this tool via web.
@alexthecodewolf
@alexthecodewolf 2 күн бұрын
Yes you can run this as a container, part 3 of this series talks about deployment, which still applies to 4.0
@niranjanpanch2692
@niranjanpanch2692 Күн бұрын
@alexthecodewolf thanks , I have one more question, i need AI to query dictionary tables in postgresql and not application tables. Hope that's feasible and doesn't make a difference
@Juande15the
@Juande15the 11 күн бұрын
Hello and thank you very much for sharing this amazing work. It would be nice if the app have the option to merge the query and insight in one go, pretty much like a chatbox using my db as data. as an example, I have a couple of dbs with only 1 table with all the information I need the schema is simple, the natural language helps writing the query and the insights answers the questions, no need to filter out data. Thank you for sharing your knowledge and the code.
@alexthecodewolf
@alexthecodewolf 11 күн бұрын
Thanks for the feedback and watching. This is an interesting scenario I hadn't considered, maybe something to explore for a future version.
@JJtheCoder
@JJtheCoder 11 күн бұрын
Recent fan. What sort of rig do you have to host all the local LLMs and to get this rapid chat response. CPU, GPU and memory. Thanks
@alexthecodewolf
@alexthecodewolf 11 күн бұрын
Hey thanks for watching. I'm using a 4090 GPU and one of the latest ryzen processor, 128gb of ddr5 ram. But really the GPU is what matters, for local AI you'll always need a powerful GPU for good performance, ideally a recent Nvidia 30 or 40 series.
@JJtheCoder
@JJtheCoder 10 күн бұрын
@alexthecodewolf thank you for your recommendation! Great videos and pleasant voice to listen to!
@billvaughn7126
@billvaughn7126 10 күн бұрын
Is anyone having trouble getting DBChatPro 4 to run in Visual Studio? I downloaded and opened the project. When I open the sln file and try to run, I get the error: code language not supported or defined. Dont see any errors or problems in the Problems tab. Am I missing a dependency or something? Not a very experienced VS user, just an explorer from the accounting side of the house.
@alexthecodewolf
@alexthecodewolf 10 күн бұрын
The only thing I can think of offhand here - are you using Visual Studio 2022 with .NET 9 installed? It might be giving that warning if you're using older versions of C# or .NET.
@billvaughn7126
@billvaughn7126 10 күн бұрын
@@alexthecodewolf thanks for the reply - using Version: 1.96.4 (Universal) and my dotnet is 9.0.102. Will it run in any other IDE like WebStorm or Android Studio? Those I am a little more familiar with.
@alexthecodewolf
@alexthecodewolf 10 күн бұрын
@@billvaughn7126 Technically you could use any editor, though you'd just have to run the app from the dotnet cli in a terminal window that's open to to the root of the DBChatPro folder using the dotnet run command. Visual Studio and VS Code would be the only two editors that will run it using a UI button
@billvaughn7126
@billvaughn7126 10 күн бұрын
@@alexthecodewolf Alex, I am making progress. I was on a Mac and couldn't get it to run there. Installed VS on Windows and get it to launch and can connect to a SQL server DB! 1 more question - if using Ollama, can my it be on the Mac or must it be on Windows? Am using a MBP with Parallels to run windows.
@alexthecodewolf
@alexthecodewolf 9 күн бұрын
@@billvaughn7126 Hey, glad you were able to get it working. I didn't realize you were on a Mac - honestly I know almost nothing about Mac environments so I can't speak to local AIs on there much. I think Ollama runs on Macs, but you will need a decent dedicated GPU to get acceptable performance, so I would say use whichever computer has a real GPU if possible.
@UdanaWickramasinghe
@UdanaWickramasinghe 8 күн бұрын
Can I use this to connect via API to send a request?
@alexthecodewolf
@alexthecodewolf 8 күн бұрын
Not in its current state but it could be modified to support that
@powera12
@powera12 11 күн бұрын
can i delete or create new info to the database from the application? or only show
@alexthecodewolf
@alexthecodewolf 11 күн бұрын
The app is designed for read-only, but technically it won't stop you from trying to do an updates or inserts, though it won't handle the responses back from that properly. I should probably add stronger safeguards to prevent that, though in a real scenario you'd want to make sure whatever user the app is running under only has read permissions if you want it to be truly read only - I talk about this sort of thing in the other videos in the series.
@paccise1239
@paccise1239 11 күн бұрын
Is the Gemini API supported?
@alexthecodewolf
@alexthecodewolf 11 күн бұрын
Not out of the box, but it could - the video provides an overview of the connector pattern it uses to hook up additional AIs. Right now it's limited to the AI services that are supported by the Microsoft.Extensions.AI library because it relies on the IChatClient abstraction to swap out AI services. IChatClient currently only supports OpenAI, Azure OpenAI, Ollama, Azure Inference and I think GitHub models. However if you implement your own IChatClient with Gemini and add that as another connector it would definitely work. This might be a topic for version 5.0 or something.
@isaakchuk
@isaakchuk 9 күн бұрын
does this work on Linux?
@alexthecodewolf
@alexthecodewolf 9 күн бұрын
Good question, It's .net and optionally ollama so it should work on Linux, but I haven't tested it
@cs2c_gabardaangelob.88
@cs2c_gabardaangelob.88 8 күн бұрын
Hi do the APIs is totally free?
@alexthecodewolf
@alexthecodewolf 8 күн бұрын
Hey, so the local models and databases run free on your local computer. As for cloud services, I don't think Azure OpenAI or OpenAI have free tiers anymore, but for low volume usage they are extremely cheap (pennies to low dollars) - you can use their pricing calculator before you do anything to get a sense of the cost.
@ragdeddy
@ragdeddy 12 күн бұрын
Does it run locally?
@alexthecodewolf
@alexthecodewolf 12 күн бұрын
Yes the app runs locally, or hosted
@cs2c_gabardaangelob.88
@cs2c_gabardaangelob.88 8 күн бұрын
​ @alexthecodewolf Hi please make tutorial video of it I will watch it even if it took 100 of hours with no cuts or edits just to learn this kind of technology, I have been studying this kind of app but don't know where to start. I think your tutorial will help a lot. T.T
@alexthecodewolf
@alexthecodewolf 8 күн бұрын
Thanks for the support here, I probably don't have the time or bandwidth right now to make that size of tutorial, are there specific concepts or pieces of this that you are most interested in learning? I have some other more step by step content on my channel for smaller AI apps.
@cs2c_gabardaangelob.88
@cs2c_gabardaangelob.88 4 күн бұрын
Hi can I use this codes for my study and school projects?
@MartinMasella
@MartinMasella 12 күн бұрын
Damn, Alex. You did it again. Version 2.0 was great. Version 3.0 was amazing. And 4.0 is out of this world. Thanks a lot from Argentina, the land where Javier Milei wants to set up a Silicom Valley for delevoping AI. My boss won't believe his eyes when he sees what this tool has achieved.
Build an AI app to search your images using natural language
23:13
Use AI to chat with a SQL Database 3.0 - INSANE new features!
34:04
The Code Wolf
Рет қаралды 3,7 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
OpenAI Embeddings and Vector Databases Crash Course
18:41
Adrian Twarog
Рет қаралды 539 М.
Use AI to chat with a relational SQL database with natural language!
22:53
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 247 М.
Use Semantic Kernel to build AI Apps and Agents - a simple intro!
24:49
New .NET 9.0 Blazor Features!
9:17
The Code Wolf
Рет қаралды 18 М.
How to Chat with a Database Using AI - No Coding Required
15:42
Liam Ottley
Рет қаралды 29 М.
I Didn’t Believe that AI is the Future of Coding. I Was Right.
6:55
Sabine Hossenfelder
Рет қаралды 680 М.
LangGraph - SQL Agent - Let an LLM interact with your SQL Database
20:22
Coding Crash Courses
Рет қаралды 8 М.
I Found A Secret Database Of Recruiter Rejection Reasons
9:18
Rahul Pandey
Рет қаралды 69 М.