Use AI to chat with a relational SQL database with natural language!

แชร์
ฝัง

ความคิดเห็น • 94

  • @alexthecodewolf
    @alexthecodewolf  4 หลายเดือนก่อน +5

    Part 2 follow up video with an enhanced app! th-cam.com/video/REw3y_Jv3Ig/w-d-xo.html
    The demo app for this video is also now available here: github.com/alex-wolf-ps/chat-sql-data-demo Sorry for the delays!

    • @MarvinMarkhamBurgos
      @MarvinMarkhamBurgos 4 หลายเดือนก่อน

      Is it possible to run this on my mac m3? How can I get it up on my localhost once I have the Azure DB and the Azure OpenAI service up?

    • @dipteshbose
      @dipteshbose 4 หลายเดือนก่อน

      Awesome. Thanks

    • @SocratesPonnusamy-pi9iu
      @SocratesPonnusamy-pi9iu 3 หลายเดือนก่อน

      Hello Alex, This video was very helpful. Thank you! I have a question. Do you have a video showing how we can do the same thing from a chatbot?

  • @Jake-td8nm
    @Jake-td8nm 7 หลายเดือนก่อน +8

    AI has so much coverage, and 99% of it is either "here's a photorealistic image that has 13.5 fingers" or even worse the generic "You should be terrified because AI is coming!" both of which hold no value, provide no context, and don't show any use case that's valuable to 95% of individuals, and 100% of enterprise.
    Conversely, this video shows an actual coherent use of AI that could blow up and be super valuable - actually improving the productivity of people using it. Bravo!

    • @alexthecodewolf
      @alexthecodewolf  7 หลายเดือนก่อน +1

      Thanks, I try to showcase real world demos instead of just flashy but useless concepts

  • @benwillman5106
    @benwillman5106 8 วันที่ผ่านมา +1

    Thanks for this video, super helpful!

  • @ShaharNardiaAllOverTheNet
    @ShaharNardiaAllOverTheNet 5 หลายเดือนก่อน +4

    thank you very much wolf🙏
    exactly what I am coding right now for my customer

    • @alexthecodewolf
      @alexthecodewolf  5 หลายเดือนก่อน +1

      Thank you so much, generous!

  • @sindhupillai1354
    @sindhupillai1354 4 หลายเดือนก่อน +1

    Good starting point for the people who are exploring more with Gen AI. Thanks for sharing valuable real time use-case. I am in 'Subscribed'. Hurray! waiting for more such use cases.

  • @511Burak
    @511Burak 7 หลายเดือนก่อน +6

    Hi thank you for sharing. Is there a way to get the sample code?

  • @OvRaf
    @OvRaf 6 วันที่ผ่านมา +1

    thank you!

  • @lshagh6045
    @lshagh6045 5 หลายเดือนก่อน +1

    That was very useful and professional. Thank you indeed and thanks for sharing 👍

  • @TellaTrix
    @TellaTrix 7 หลายเดือนก่อน +1

    Wowo ! No more developer required to binding data and complex query.

    • @alexthecodewolf
      @alexthecodewolf  7 หลายเดือนก่อน +1

      Yeah one of my favorite things about this is it can help devs as much as analysts because it can write your sql queries for you....to some extent :)

  • @alexthecodewolf
    @alexthecodewolf  4 หลายเดือนก่อน +2

    Due to the requests here I'm working on getting the source code available for this, it was tied to a project I couldn't release but am working that out.

    • @mukshobhit
      @mukshobhit 4 หลายเดือนก่อน

      Thanks, did you get chance to get repo?

    • @BruceLanskiy
      @BruceLanskiy 4 หลายเดือนก่อน

      Thank you Alex, looking forward to learn how to do it

    • @alexthecodewolf
      @alexthecodewolf  4 หลายเดือนก่อน

      @@mukshobhit It's available now, thanks.

    • @alexthecodewolf
      @alexthecodewolf  4 หลายเดือนก่อน +1

      It's available now, thanks.

    • @BruceLanskiy
      @BruceLanskiy 4 หลายเดือนก่อน

      @@alexthecodewolf Thank you Alex, grateful for making it available

  • @pwakabi
    @pwakabi 4 หลายเดือนก่อน +1

    Excellent piece

  • @alexclark6777
    @alexclark6777 4 หลายเดือนก่อน +3

    Remember Microsoft English Query? Pepperidge Farm Remembers...

  • @dinamohamed13600
    @dinamohamed13600 2 หลายเดือนก่อน +1

    Thank you , very helpful

  • @GeorgeZoto
    @GeorgeZoto 2 หลายเดือนก่อน

    Thank you for sharing another great tutorial :)

  • @applepeel1662
    @applepeel1662 7 หลายเดือนก่อน +3

    Hey! Please share the source code!
    This is honestly really cool

  • @rubberuk
    @rubberuk 7 หลายเดือนก่อน +3

    Excellent video! Have you got a link to source code? thank you.

  • @andrewherrick879
    @andrewherrick879 7 หลายเดือนก่อน +2

    hi this is pretty cool. is your code available open source? i checked your GH but didn't see it. thanks!

  • @imranmunshi5894
    @imranmunshi5894 15 วันที่ผ่านมา

    if we want to create reports and dashboards using nlq how can we do that? please let us know.
    will it also create reports and dashboards.

  • @bengroseclose1795
    @bengroseclose1795 7 หลายเดือนก่อน

    Your a helpful cheerful youtuber :D

  • @pvsherman
    @pvsherman 3 หลายเดือนก่อน

    Excellent video. But unfortunately I'm getting very inconsistent results. As soon as a little bit more complicated SQL needs to be produced - every run returns a different result. Subqueries, unions are too much for it. Or I'm doing something wrong.
    Probably will have to create views so AI will be able to do simple selects.

  • @liammcmullen4497
    @liammcmullen4497 7 หลายเดือนก่อน +1

    Thanks

    • @alexthecodewolf
      @alexthecodewolf  7 หลายเดือนก่อน

      Thanks so much for your support! It means a lot.

  • @gedelababi8
    @gedelababi8 10 วันที่ผ่านมา

    hai brother..good job...i want added ajax method in index.cshtml page but ajax call not hitting method in index.cshtml.cs page..could u pls write the ajax method ..if u don't mind

  • @jigar61
    @jigar61 หลายเดือนก่อน

    Any suggestions as to how you can make this work with a microservices setup with individual domain databases?

    • @alexthecodewolf
      @alexthecodewolf  29 วันที่ผ่านมา

      Do you mean querying each one or querying all of them at once? In part 2 of this video I show how to load in multiple databases and choose which one you query, that would probably be the simplest option.

  • @sajjadmussani
    @sajjadmussani 5 หลายเดือนก่อน

    very informative. can you please share the code of your Razor app?

  • @hirenshekhda3567
    @hirenshekhda3567 5 หลายเดือนก่อน

    Hello sir can you please source code for education purposes? Its working universe database?

  • @Trymore-r4i
    @Trymore-r4i 2 หลายเดือนก่อน

    Good day bro .I need your help to setup my azure databse.I have been facing challenges for some time

  • @mouradaissani8957
    @mouradaissani8957 7 หลายเดือนก่อน

    very good, thank you 🐺

    • @alexthecodewolf
      @alexthecodewolf  7 หลายเดือนก่อน +1

      Glad you enjoyed it

    • @mouradaissani8957
      @mouradaissani8957 7 หลายเดือนก่อน

      BTW ; 11:00 warning , ur openaikey is exposed ;) @@alexthecodewolf

  • @jyothirmaimachavaram4307
    @jyothirmaimachavaram4307 5 หลายเดือนก่อน

    Hello, Could you please let me know where can I get the source code for it?

  • @twenty4marc306
    @twenty4marc306 5 หลายเดือนก่อน

    Hi, do you have a public demo?

  • @iamalmostanonymous
    @iamalmostanonymous 27 วันที่ผ่านมา

    Sqlite would be a simpler starting DB. No need for MS subscription.

    • @alexthecodewolf
      @alexthecodewolf  27 วันที่ผ่านมา

      Thanks for the feedback. I chose azure because it can auto generate a decent sample db for you but I realize the azure subscription might be a barrier. The sample app works with any SQL DB connection string though

  • @SocratesPonnusamy-pi9iu
    @SocratesPonnusamy-pi9iu 3 หลายเดือนก่อน

    Hello Alex, This video was very helpful. I have a question. Do you have a video showing how we can do the same thing from a chatbot?

    • @alexthecodewolf
      @alexthecodewolf  3 หลายเดือนก่อน

      I don't have this video yet, but I'm planning to make one!

    • @SocratesPonnusamy-pi9iu
      @SocratesPonnusamy-pi9iu 3 หลายเดือนก่อน

      @@alexthecodewolf Thanks. Can you please give me some pointers on how to do it? All the chatbots deals with indexer and cognitive services.

  • @sinamohammadpourinaeim1058
    @sinamohammadpourinaeim1058 4 หลายเดือนก่อน

    Hi Code Wolf
    Thanks for your useful video, Is there any offline AI Service to use the same thing in our local machine or our own sever?

    • @alexthecodewolf
      @alexthecodewolf  4 หลายเดือนก่อน

      Hey, thanks for watching. There are definitely local AI models, but I haven't worked with them enough to recommend any sort of solution for this. Would probably be a good topic to research for another video :)

  • @goodtimeforever2035
    @goodtimeforever2035 4 หลายเดือนก่อน +1

    Hey @alexthecodewolf - Can you able do the same video using AWS ?

    • @alexthecodewolf
      @alexthecodewolf  4 หลายเดือนก่อน

      Hey, this should work using any powerful large language model and SQL based database, did you have a specific scenario in mind?

  • @AbhinavKumar-tx5er
    @AbhinavKumar-tx5er 2 หลายเดือนก่อน

    Thanks for making this video. So what is the probability that it won't hallucinate . Well I am using similar kind of prompting approach when using llama model but curious to know about hallucination.

    • @alexthecodewolf
      @alexthecodewolf  2 หลายเดือนก่อน

      It's difficult to estimate hallucinations due to so many varying factors. However I'll just say anecdotally that the results for me have either generally been correct or just not worked at all (the SQL query doesn't work) - I'd have to setup a more rigorous test plan to estimate hallucinations better.

    • @AbhinavKumar-tx5er
      @AbhinavKumar-tx5er 2 หลายเดือนก่อน

      @@alexthecodewolf I took one approach by first storing the table in the form of JSON and then asking the question from the JSON. but again the things didn't go well . Is it I have to do something with the prompt?

  • @jkaryskycoo
    @jkaryskycoo 3 หลายเดือนก่อน

    This feature is not available to the general public. Would have been nice to know that.

    • @alexthecodewolf
      @alexthecodewolf  3 หลายเดือนก่อน

      Hey, I probably should have mentioned you have to apply for openai access, but it's fairly easy to get approved. If you can't get access you can also substitute the AI service with gpt-4 similar alternatives like standard openai instead of azure openai, or even local ai models that are specifically trained for code generation

  • @brunocarvalho3229
    @brunocarvalho3229 3 หลายเดือนก่อน

    Hi! Thank you so much for this! I'm trying to work on a demo for my company where I want to read a table of incidents and summarize the resolution note of each one and send back to Service Now. The incidents table is already a view on our Azure enviroment, so I think I need first to get the query from AI, get the data from the table and then ask again the AI to iterate over the retrivied table and summarize the notes, structure the data again with the summarized notes and send back to Service Now via API maybe. Do you think this architecture makes sense? Really appreciate this knowledge shraring!

    • @AbhinavKumar-tx5er
      @AbhinavKumar-tx5er 2 หลายเดือนก่อน

      Well , I have used to similar kind of approach too. Did you get any luck on this? Did your AI responded with the correct answer?

    • @brunocarvalho3229
      @brunocarvalho3229 2 หลายเดือนก่อน

      @@AbhinavKumar-tx5er Hi, yes! I've getting some pretty good results with the GPT-4o. I followed this tutorial to adapt to my case: th-cam.com/video/9ccl1_Wu24Q/w-d-xo.html

  • @muratkoc4693
    @muratkoc4693 หลายเดือนก่อน

    hello, thanks for video. This video is very useful. How do i use Id to DtoName. For example. I get Supplier_Id from Customer. But i want to use SupplierName with Dto. Can I try to develope AppendSystemMessage for own database?

    • @alexthecodewolf
      @alexthecodewolf  หลายเดือนก่อน

      You could probably added information into the prompt to the AI to tell it to treat one column name as another.

    • @muratkoc4693
      @muratkoc4693 หลายเดือนก่อน

      @@alexthecodewolf Okay, Thanks

  • @aeromeme
    @aeromeme 5 หลายเดือนก่อน

    Hi, could be possible to have database definition in azure storage file so that way we aboid large prompt, or is there any other solution.

    • @alexthecodewolf
      @alexthecodewolf  5 หลายเดือนก่อน

      Hey, good question, this is something I'm also looking into myself - how to only have to send the schema once and be able to update and maintain that schema in an active context. So far I haven't found a solution I'm happy with yet but I'll respond here again if I do. The models are getting better at deconstructing large inputs all the time, but I understand from a cost perspective its not desirable.

    • @ShaharNardiaAllOverTheNet
      @ShaharNardiaAllOverTheNet 5 หลายเดือนก่อน

      @@alexthecodewolf I tried using the assistant for that - sent him all the scheme in JSON files but it sucks 😔

  • @arjunmaniyani2975
    @arjunmaniyani2975 หลายเดือนก่อน

    any opensource models that i can use instead of openai?

    • @alexthecodewolf
      @alexthecodewolf  หลายเดือนก่อน +1

      You could use other models such as Phi3 or the Llama models, these are easy to setup locally and should work fairly well. I have another video that shows how to set this up using Phi3 and Ollama locally, towards the end of the video th-cam.com/video/177qX6mpyMg/w-d-xo.html

    • @arjunmaniyani2975
      @arjunmaniyani2975 หลายเดือนก่อน

      @@alexthecodewolf Appreciate the quick reply!

  • @Joly0
    @Joly0 4 หลายเดือนก่อน

    Is it possible to have a version, that works without azure? So using the normal openai api with a key and maybe other llm providers such as ollama?

    • @alexthecodewolf
      @alexthecodewolf  4 หลายเดือนก่อน

      I actually just made a video about this using Ollama, hah. It shows this same setup at the end using codellama th-cam.com/video/177qX6mpyMg/w-d-xo.html
      The concepts in this video should work with any model that is skilled at text to code (such as code llama) and a SQL database of some sort. You'll have to experiment with different models and prompts to see which works best.

  • @Baraka-yl2dp
    @Baraka-yl2dp 5 หลายเดือนก่อน

    Code Wolf, can you please share your source code?

  • @mohan007ish
    @mohan007ish 6 หลายเดือนก่อน

    Can we use GPT-35-Turbo instead of GPT 4?

    • @alexthecodewolf
      @alexthecodewolf  6 หลายเดือนก่อน +1

      You can certainly try using GPT-35-turbo, but GPT-4 included major improvements to understanding and responding with structural content. However it'd be interesting to see how well 35-turbo does in comparison, I didn't actually try that myself.

  • @THEDTSMAN
    @THEDTSMAN 6 หลายเดือนก่อน

    What happens if someone says “delete all the data” ?

    • @alexthecodewolf
      @alexthecodewolf  6 หลายเดือนก่อน +5

      That's a really valid concern, you'd want to make sure the app is running as a user that only has read permissions.

  • @alexanderkamenev5529
    @alexanderkamenev5529 6 หลายเดือนก่อน +3

    GIT REPO IF YOU DONT MIND PLEASE

  • @ABHISHEKSHARMA-fo4tf
    @ABHISHEKSHARMA-fo4tf 3 หลายเดือนก่อน

    Hello sir this is very help full video , i have doubt can i used the 500 tables and then we can used for this retrieving the SQL Query. because i am using the SQL Database so i give the error of Rate Limit Error 429 , where token limit is 60000 and i request the token for the 157656 so its give the error because the lots of table it taken can you give me solution for this, it is very helpfull for me

    • @alexthecodewolf
      @alexthecodewolf  3 หลายเดือนก่อน

      I believe current gpt models are limited to 128k tokens - I would recommend either breaking apart your schema to only the tables you need if possible, or searching for an AI model with higher token limits. There might also be local or self hosted models for code generation that support higher token inputs. I have some other videos about local ai models that show this database connection scenario

    • @ABHISHEKSHARMA-fo4tf
      @ABHISHEKSHARMA-fo4tf 3 หลายเดือนก่อน

      ​@@alexthecodewolf​ Thank you sir

  • @feelzzgaming6306
    @feelzzgaming6306 5 หลายเดือนก่อน

    Hi @alexthecodewolf ! Thanks for the video. I have two questions: Is there a way to use OpenAI with and SQL database, without using the Azure OpenAI Service? It is currently only for people and companies who have requested special access. So Im wondering if there is a workout where I can use the OpenAI's API directly towards my own Azure SQL Database, and not have to rely on the OpenAI service on Azure?
    Number 2: Do you have the source code anywhere?
    Hope you will reply ASAP as im currently working on a project that has come to a halt.. Thank you very much! :D

    • @alexthecodewolf
      @alexthecodewolf  5 หลายเดือนก่อน +1

      Hey, thanks for watching. You should be able to use the regular OpenAI service (non Azure) with this exact same approach, there might just be some slight differences in the code and authentication. I'm not sure how pricing differs between them.
      Currently this code is part of a separate project I'm working on that I adjusted for this demo, so at this point I can't distribute the source code to for a few reasons, sorry!

    • @feelzzgaming6306
      @feelzzgaming6306 5 หลายเดือนก่อน

      @@alexthecodewolf any idea what the code for that approach would Look like? Spent all day today, but to no avail.. also, thanks for the response!!

  • @codeadmin2
    @codeadmin2 3 หลายเดือนก่อน

    Hey wolf can this demo app work on local DB or on premise and if yes How? @alexthecodewolf

    • @alexthecodewolf
      @alexthecodewolf  3 หลายเดือนก่อน

      Hey, yes it can work with local DB and on prem. You would just replace the connection string placeholders in the demo app with localdb connection strings. You could then use the same Azure AI service or you could use a local AI model - I just posted a couple videos explaining how to setup and connect to local AI if that's what you're looking for.

  • @andresfelipehiguera785
    @andresfelipehiguera785 3 หลายเดือนก่อน +1

    Excellent video.

  • @polly28-9
    @polly28-9 4 หลายเดือนก่อน

    Thanks a lot! How about huge database? We send the whole schema with the initial prompt which costs a lot? How to solve this problem with huge database?

    • @alexthecodewolf
      @alexthecodewolf  4 หลายเดือนก่อน +1

      This can be tricky - I'd recommend this solution for small to medium size databases, I have some other content coming for larger database solutions. However, theoretically this solution can also work with large databases if the table structure is consistent/standardized. You'd probably need to use one of the large GPT models though, such as the 32k GPT-4, which accept higher volumes of tokens. I've been trying to figure out if there's a way to have the AI Model "store" or remember the initial schema prompt, but I haven't been able to find an ideal solution for that.

    • @polly28-9
      @polly28-9 4 หลายเดือนก่อน

      @@alexthecodewolf Thanks a lot! Please, if you find some ways to have the AI model "store" or remember the initial schema, make such a video or write to me. I'm looking forward to it. Thank you!😀