Пікірлер
@lvnstnitntal
@lvnstnitntal 19 сағат бұрын
I watched this video a few months ago and I'm revisiting this idea of Q&A with an LLM. Did you touch on anything regarding safety of the database? What's to stop a user from prompt injecting to delete or modify tables either intentionally or by accident?
@airoundtable
@airoundtable 16 сағат бұрын
You can manage that by giving the user only the read access to the database. That is a very easy fix actually.
@MuhammadAdil-395
@MuhammadAdil-395 Күн бұрын
hi farzad i want to asked one question can i use my own database data in this without changing changing the code??
@airoundtable
@airoundtable 16 сағат бұрын
Yes and no. Depending on the type of your db, some part of the code might work but I'd definitely recommend you to refactor the code based on your db for the full functionality
@MuhammadAdil-395
@MuhammadAdil-395 16 сағат бұрын
​@@airoundtable I want to use my own database data, so will I only need to change the file of my database, or I also need to make changes in the code, prompts, etc.?
@airoundtable
@airoundtable 8 сағат бұрын
@MuhammadAdil-395 This pipeline is working with two different databases at the moment. So, depending on which part of the pipeline you want to use, you might need to apply some changes. I have another video on my channel that makes it much easier for you to connect to your database. The project almost requires no refactoring and works only with one database It is the first video of this series. Q&A and RAG with SQL databases
@MuhammadAdil-395
@MuhammadAdil-395 7 сағат бұрын
@@airoundtable ok Thanks man for clarifying..
@ghaithkh4479
@ghaithkh4479 Күн бұрын
Thank you for the video The code doesn’t work for a .bacpac file. How can I convert a .bacpac file to a .sqlite ?
@airoundtable
@airoundtable 16 сағат бұрын
I am not sure. But chatgpt definitely knows the answer to that!
@somethingtwice
@somethingtwice Күн бұрын
Hi sir, can this code work with paralely multiple users
@airoundtable
@airoundtable Күн бұрын
Hi. It yes, as long as the open ai api calls do not exceed the limit. Otherwise, you have to address that issue
@Anonymous-p5e
@Anonymous-p5e 3 күн бұрын
I really loved the way you explain with implementation in detail.. I'm looking for my career transition and your videos are helpful. Thank you
@rvsanjay4479
@rvsanjay4479 3 күн бұрын
Hi! Firstly, Great video. But I'm facing many issues in converting the code from AzureOpenAI to OpenAI API implementation. Could you please provide the OpenAI API implementation of the same codes. Please help me with this.
@airoundtable
@airoundtable 3 күн бұрын
I really won't have the time to do the refactoring but I have already shown how to switch between openAI and Azure OpenAI in another project. Please use the following sample code on how to use OpenAI directly: github.com/Farzad-R/Advanced-QA-and-RAG-Series/tree/main/KnowledgeGraph-Q%26A-and-RAG-with-TabularData/explore/Movie_RAG_GraphDB/QA_and_RAG_using_OpenAI_directly
@adarshsingh9752
@adarshsingh9752 3 күн бұрын
Which notebook are you using
@airoundtable
@airoundtable 3 күн бұрын
github.com/Farzad-R/Advanced-QA-and-RAG-Series/tree/main/Q%26A-and-RAG-with-SQL-and-TabularData
@MuhammadAdil-395
@MuhammadAdil-395 4 күн бұрын
Hi Farzad, you really did great work, and I highly appreciate your efforts. I have one question: can I use my own personal data to chat and interact with the database? Also, can I use a different database as well, or not? I’d appreciate it if you could let me know! Thanks.
@airoundtable
@airoundtable 3 күн бұрын
Yes you can use you own data and different type of databases.
@ShubhamShekhar-cm6rs
@ShubhamShekhar-cm6rs 4 күн бұрын
Hi, I am trying use only strategy A of this video and then final step and when I am calling full_chain.invoke it shows key error and when I use strategy C it does not show error. I have to do this for my code to do it with strategy A def extract_table_names(response): return [table.name for table in response] My question the code that you have written and that code is also on langchain documentation. So why my code is not working without it. Is it because of the region that the dependency has changed. drive.google.com/drive/folders/18JaGJgpl9CS1ACRGTCHARbfTsal2gCZQ?usp=sharing db.run(query) is showing for both strategies A and C. I have share the code and I am not sure why this is happening because I downloaded wrong chinook SQL file.
@ShubhamShekhar-cm6rs
@ShubhamShekhar-cm6rs 4 күн бұрын
can you also make a video of how we can show visuals on the data from the database and the query that LLM gives using langchain?
@VNNA-forfun
@VNNA-forfun 4 күн бұрын
Great tutorial. I have a question: Can I learn and run all your projects without openai api key?
@airoundtable
@airoundtable 3 күн бұрын
Thanks. Yes, You need to convert the openai call sections and use another framework like ollama for example. I have received multiple messages from the community that they successfully used OLLAMA with the projects in the channel
@kaushikburra2821
@kaushikburra2821 5 күн бұрын
hello Farzad , say I am working on a domain which has 100+ tables and relationships , which approach is better, 1. combining text-sql + RAG+ sql agents 2. combining text-sql + knowledge graph
@airoundtable
@airoundtable 4 күн бұрын
The best approach depends on the type of questions that you want to ask from the system and the projects objective. There is not a single best approach for all scenarios. I have covere these topics in the last 3-4 videos on my channel. Depending in your usecase different strategies might be the best
@ab1ek145
@ab1ek145 7 күн бұрын
which section in video are u explaining fine-tuning model. (training question to expected sql query)
@airoundtable
@airoundtable 4 күн бұрын
These are my videos on Fine-tuning: LLM: kzbin.info/www/bejne/lZiXoGVndpt0j5osi=UKp9u2lrcsHfk6_r Multimodal LLM: kzbin.info/www/bejne/ZqHHYo16iZJgo7csi=2AmkNe6LJJI2thRL
@ab1ek145
@ab1ek145 4 күн бұрын
@airoundtable thanks
@aireescreates
@aireescreates 7 күн бұрын
Hi Farzad. Thanks for this video. I just want to ask if this is the video you’re referring to in your Github “LangGraph_1o1_Agentic_Customer_Support”? The YT link in the README doesn’t work. Thanks
@airoundtable
@airoundtable 4 күн бұрын
Hi the repo for this video is here: github.com/Farzad-R/Advanced-QA-and-RAG-Series/tree/main/AgentGraph-Intelligent-Q%26A-and-RAG-System
@apoorvatiwari8287
@apoorvatiwari8287 7 күн бұрын
Super Helpful Video, Thank you. While you used SQLite db here, can this be scalable with other databases? like MSSQL? I am trying to create an Agent with MsSQL ( by restoring Adventure Works DB .BAK file) but langchain does not read all the tables from MsSQL.
@airoundtable
@airoundtable 4 күн бұрын
I have used it with a few different databases but not MSSQL. If it is not supported then the best bet is to design custom agents. I have explained it in my last video
@apoorvatiwari8287
@apoorvatiwari8287 3 күн бұрын
@@airoundtable Thanks for your response. I got the success with MSSQL. It required me to first provide 'read accesses' then reading the table with connection string specific to mssql. The only challenge I faced was my MsSQL database has multiple schemas. I can connect and create the agent one schema at a time. SQLDatabase functionality in LangChain currently does not support multiple Schemas. Alternatively, I achieved what I wanted to by reading MsSQL and converting it into SQLite db locally. Not so recommended approach temporarily it solved the purpose. If you get anything around multiple schemas please suggest me. It would be awesome if you create a video around it :-). Once again super helpful and thank you.
@Mohnishclive
@Mohnishclive 8 күн бұрын
how can this be built using llama?
@airoundtable
@airoundtable 4 күн бұрын
You can use OLLAMA
@ShubhamKumar-h9v1e
@ShubhamKumar-h9v1e 8 күн бұрын
Hi Farzad, Could you please explain how the primary agent decides which sub agent to call (RAG, SQL Agent, WEbsite agent)?
@mayankgoyal4213
@mayankgoyal4213 2 күн бұрын
Yes l, looking for the same answer.
@airoundtable
@airoundtable Күн бұрын
I explained how the agents make their decisions on the first half of the video where I design custom agents and agents using langchain. There I go into the details of how the decision making happens and how the choose between different functions.
@mayankgoyal4213
@mayankgoyal4213 Күн бұрын
@@airoundtable Thanks Farzad. If you could please point to the timestamp in the video it would be very helpful. I have watched it multiple times but somehow I am always missing that crucial part.
@himansudash4538
@himansudash4538 12 күн бұрын
Hi there. It looks like there is no code to load data to travel.sqlite db. I ran your notebook and it throws error "no such table: aircrafts_data". can you guide me to get some sample data loaded
@airoundtable
@airoundtable 12 күн бұрын
There are two versions of the dataset. One of them is a subset of the other one. Make sure to download the complete version. I think I added the URL to the Readme file
@airoundtable
@airoundtable 8 күн бұрын
@@himansudash4538 download it using this link storage.googleapis.com/benchmarks-artifacts/travel-db/travel2.sqlite
@mayankgoyal4213
@mayankgoyal4213 4 күн бұрын
@@airoundtable I think you forgot to add the hyperlink or the link to the database in the README file.
@airoundtable
@airoundtable 3 күн бұрын
@@mayankgoyal4213 Thanks for the note. I will check and add it to the readme file
@Osxsar
@Osxsar 13 күн бұрын
So why are agents better?
@airoundtable
@airoundtable 11 күн бұрын
In the last section of the video (chatbot demo) I go through different questions and explain why and when it is better to use SQL agents.
@Osxsar
@Osxsar 11 күн бұрын
@@airoundtable okay what timestamp?
@thomaseldhose1006
@thomaseldhose1006 15 күн бұрын
Is it possible to use large databases with LLMs, or will the token limit be exceeded?
@airoundtable
@airoundtable 15 күн бұрын
I have covered this topic in detail in the following video: kzbin.info/www/bejne/rqSmlpeog7VsrZosi=EyqBvxW94z9Jlhb6 You can interact with big databases but you need to implement some strategies for that. Context lenght is an important challenge that needs to be addressed
@AshokNepal-l5e
@AshokNepal-l5e 17 күн бұрын
Hello sir, Could you please add the way to integrate it in multiple website and also talk about load balancing while present the concurrent users at once.
@airoundtable
@airoundtable 15 күн бұрын
Thanks for the comment. These are the deployment side, and the configurations vary for different scenarios and use cases. So, I cannot make a video that is useful for everyone. There are many factors involved including load balancing, networking, security measures, etc.
@KT-do5fm
@KT-do5fm 17 күн бұрын
Hello. While following along with your video, I tried running the code, but I encountered an error: “Number of image tokens in input_ids (251) different from num_images (1).” The training isn’t progressing. Do you know how to resolve this? I would appreciate it if you could help me. Thank you
@airoundtable
@airoundtable 15 күн бұрын
Please open up an issue on GitHub. I think that is something related to the new version of the transformer library.
@user-ps9mk3pi7o
@user-ps9mk3pi7o 20 күн бұрын
ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000) How to solve these errors
@RoyMathew-h1g
@RoyMathew-h1g 21 күн бұрын
Hi Farzad , can you please tell me how can i get plot of different chart from the response like pie chart, barplot etc. Or can you make a upgraded video of this adding this plotting features??
@airoundtable
@airoundtable 21 күн бұрын
This project cannot plot and it needs some upgrades. That is just another agent being added in the system. In my I explained how to design/add agents to different systems. I will keep it in mind and try to address it in a another video
@RoyMathew-h1g
@RoyMathew-h1g 21 күн бұрын
@airoundtable thanks i think i can use pandasai and convert it into tool to get these plots right? Or design a custom tool with seaborn or matplotlib...
@nahidmorady3023
@nahidmorady3023 23 күн бұрын
I want to connect to a database where the tables are via schema named such as TRD.Contract that table that saved contracts in database and also my database is very large and dont have good structure for example name of tables and name of columns dont define correctly the databse is very old and it work for several year and have very data so i must be define sqlagent. please help me that i how define my sql agent for my project that give best result and response and that know my tables and relations in my database.Considering that there is a limit in sending tokens and prompts.thank you
@airoundtable
@airoundtable 22 күн бұрын
For SQL agents I have two dedicated videos where I explain alot of the details. Please watch them and let me know if there is anything I can help with: kzbin.info/www/bejne/kKXPpZ2Jn6uDesksi=1nLqNweFmXtqoUBQ kzbin.info/www/bejne/rqSmlpeog7VsrZosi=8Cv_C1hY6MTlY0_t
@nahidmorady3023
@nahidmorady3023 21 күн бұрын
@airoundtable Thank you for your time and good explanations. May you always be healthy and happy🙏
@georges7298
@georges7298 24 күн бұрын
A good definition on agent based LLM process and RAG based LLM one. Thanks for the sharing.
@testname7799
@testname7799 25 күн бұрын
First video I have ever seen that actually breaks down the abstraction levels into things you can understand! Great tutorial
@airoundtable
@airoundtable 24 күн бұрын
Thanks! I am glad you enjoyed the video
@birn
@birn 25 күн бұрын
Good info. I wish yt didn't make it such a pain to find actual useful videos like this one.
@anandukc4709
@anandukc4709 27 күн бұрын
Hi Farzad, in your opinion which is the best agentic framework when it comes to production, langraph, crewai or autogen???
@airoundtable
@airoundtable 27 күн бұрын
Hi, you cannot fully trust any of these frameworks right now. All of them still have a long road ahead of them to become fully production ready. That being said, if a good team is behind the project they can keep it up-to-date and adjust with the new changes. I personally would choose LangGraph. IMO it has a bigger community and the team behind it is doing a great job. (Needless to say both CrewAI and Autogen are great frameworks as well but I personally lean towards LangGraph)
@chercm
@chercm 29 күн бұрын
i was looking thru the repository cannot find the file for this one
@airoundtable
@airoundtable 29 күн бұрын
This is the project: github.com/Farzad-R/Advanced-QA-and-RAG-Series/tree/main/Q%26A-and-RAG-with-SQL-and-TabularData Links are also included in the description.
@VaibhavDewangan-r2y
@VaibhavDewangan-r2y 29 күн бұрын
Great. gonna implement it myself!
@Naejbert
@Naejbert 29 күн бұрын
I’ve learned a lot, very useful and I’m using it. How are the thumbs up/down used by the system?
@airoundtable
@airoundtable 29 күн бұрын
Glad to hear it! The feedback is not fully implemented in the chatbot. Currently, when someone pushes the thumbs up/down, it sends a message to the Gradio backend but in the code, I am not receiving or saving that message to collect the feedbacks. You can check out their documentation to see how to complete that part of the chatbot: www.gradio.app/docs/gradio/likedata
@Naejbert
@Naejbert 29 күн бұрын
@@airoundtable Understood, thank you. Also, I’m note sure if the primary agent select which tool to call (depending on the prompt content), or if it called each tool and choose the best results. Or maybe it does both? I’m confused here as, if I’m right, both the appropriate tool selection and a systematic looping over every tools are mentioned in the video. I was about to watch again, but some clarification would be appreciated on that.
@airoundtable
@airoundtable 29 күн бұрын
@Naejbert It selects the best tool based on the prompt. It won't go over all of them to choose among the best one.
@Naejbert
@Naejbert 29 күн бұрын
@@airoundtable Thank you! Very appreciated :)
@stanTrX
@stanTrX Ай бұрын
1:32:00 very good, thanks. Can this setup able to find something from db and search web according to the output of that query? Or you need to alter the code to do sı?
@airoundtable
@airoundtable Ай бұрын
I am glad you liked the video. No it cannot do that right now. The code needs to be modified
@stanTrX
@stanTrX Ай бұрын
44:05 what is the best open source / free embedding model than openai embedding model? I think open ai is not free?
@airoundtable
@airoundtable Ай бұрын
openai embedding model is not free but it is very cheap. You can use `BAAI/bge-large` from huggingface. I compared its performance with openai's model in this video: kzbin.info/www/bejne/qamlo5KXm9ipmJIsi=ygV5GPEyroNuZ07_ Also I used `BAAI/bge-large` embedding model for RAG in this video: kzbin.info/www/bejne/bJXcq2WDlLqKgtksi=uqr49nmc26Q6u0-M
@stanTrX
@stanTrX Ай бұрын
14:07 thanks what if i want to seek from a db but with how to say, use it for similar data in that db so that not regular sql but some interpretion like cleaning or searching these as well, using llm
@airoundtable
@airoundtable Ай бұрын
I am not sure what you meant exactly. But in the next video, I will present a project that not only can read but also can write in a database. However, I will briefly mention that part since the main objective of the video is something else. But you will have access to the full code
@stanTrX
@stanTrX Ай бұрын
@airoundtable thank you. What i meant was some kind of similarity problems between db records such as abc company, abc inc. A bc company etc which meant all the same but with typos. I want LLM to find such anomalities for me:)
@bhaveshraj-qn1ml
@bhaveshraj-qn1ml Ай бұрын
Hi Bro, great video love your explanation. Could you also tell us how to evaluate our pipeline and results. Basically how many correct answer we are genrating
@airoundtable
@airoundtable Ай бұрын
I have discussed some of the evaluation strategies in one of my previous videos. Here is the link: kzbin.info/www/bejne/pKvIY418n5x5ec0si=tXBpO2lo2UfsAfGs Also in my latest video I showed how you can connect langsmith to a project to monitor your pipeline and get all the details.
@khananas5716
@khananas5716 Ай бұрын
Can i do this without open ai, can we do this with langchain and Groq? Using chatgroq??
@airoundtable
@airoundtable Ай бұрын
I am not sure if Langchain supports Groq. In the video there is a section where I talk about different models that Langchain supports. Have a look at their documentation. If they are supporting it then you can easily switch to Groq
@Kunal-e8i
@Kunal-e8i Ай бұрын
Hello Farzad , thanks for the video. I m working on a use case where I want to use the database which have almost 10+ different table and each table have almost 111+ lac rows in it which a large database and it is in aws redshift cloud db. So can i use the same logic here or do I need to do any vectorization/embedding logic ?
@airoundtable
@airoundtable Ай бұрын
Every project has its own requirements and challenges. You can definitely use alot of the strategies that I showed in this video and the first one in this series. But you might also need to improve the system to be fully functional. That being said, this video is a great starting point and the system might solve all your needs
@oscarduran4394
@oscarduran4394 Ай бұрын
Hi sir, can you give a guide on how to export to excel the result of the sql query, and another question i have a test data where i have student name,age etc if i say give me the students with age under 18, i get just and example(5 to 10 student) of that not the full result of the query(i have 45 students under 18) , i try set the top_k=1000 but its not workin
@airoundtable
@airoundtable Ай бұрын
For saving the results in csv you can either directly write them in the csv file using python libraries like csv (good for large scale data) or you can use pandas dataframes. Top_k is not related to that. That is the Limit in the sql query itself. You can modify the system role of the sql agent to return more results but you have to take into account the context length of the LLM as well. For these scenarios I recommend using a different type of agent. I will briefly explain it in my next video
@RoyMathew-h1g
@RoyMathew-h1g Ай бұрын
Hi sir, pls reply if we have multiple users and should have different session fir each user can it be achieved by changing tread id dynamically for each user?
@airoundtable
@airoundtable Ай бұрын
Yes you can address that with thread_id
@RoyMathew-h1g
@RoyMathew-h1g Ай бұрын
@@airoundtable thankyou very much for the support this video was a life saviour for me. Expecting quality contents like this..
@BilalSaeed-iv5ig
@BilalSaeed-iv5ig Ай бұрын
In this series you've used OpenAI API throughout, but i want to use an open source LLM like Llama 3.2 , would it give me the results like OpenAi ApI? Or similar to these?
@airoundtable
@airoundtable Ай бұрын
It depends on the LLM. If you choose a powerful model you can get good results. But the challenge would be on the hardware side
@user-ps9mk3pi7o
@user-ps9mk3pi7o Ай бұрын
I'm working with highly sensitive data what if I don't want to use get models
@airoundtable
@airoundtable Ай бұрын
I assume you mean GPT models. Well you can run the chatbot with open source models (using OLLAMA for example) but you need a powerful LLM for a good performance
@geeekfa3278
@geeekfa3278 Ай бұрын
Merci Farzad jan.
@nicolassuarez2933
@nicolassuarez2933 Ай бұрын
Outstanding! Best of its kind :)
@YaxiHan
@YaxiHan Ай бұрын
Awesome video!! What would be the best way to combine both SQL agent and RAG approach? E.g. the user just ask a question, and there will be a mid layer or another agent to determine if it should pass the question to SQL agent or just go to query Vector DB using RAG, or use both to get the final answer. A video on it would be super interested
@airoundtable
@airoundtable Ай бұрын
I have designed that system already in this video: kzbin.info/www/bejne/rqSmlpeog7VsrZosi=Tj9ddmIvqqYMuShW
@malejin83
@malejin83 Ай бұрын
Hello, May I ask your help to place the link of the previous video with the SQL agent that was mentioned at the beginning? Many thanks!
@airoundtable
@airoundtable Ай бұрын
Previous video of this series: kzbin.info/www/bejne/kKXPpZ2Jn6uDesksi=xtdg3UOq3uFJsih4 Next video of this series: kzbin.info/www/bejne/rqSmlpeog7VsrZosi=Tj9ddmIvqqYMuShW
@piero957
@piero957 Ай бұрын
Hi, great video as usual. I'm on the open source side of the world, and I would like to try Vanna. Did you have a look at it?
@devkkkk
@devkkkk Ай бұрын
Thank you Farzad for Great Video. I'm building bot on realtime manufacturing data for finding information & root causes. I should use only SQL agent or RAG also & do schema alone sufficient for answering complex queries? because there will n number of checklist for each root cause. It will be helpful for me if you suggest. Thanks once again.
@airoundtable
@airoundtable Ай бұрын
For querying the SQL databases, RAG is not an option. However, how to use SQL agents and how to design the system depends on many factors. Database complexity, project objective, and number of users are just a few of them. But if you want to go in one of those two directions, it is better to go with the LLM agents for SQL databases
@AliAminiBagh
@AliAminiBagh Ай бұрын
Farzad, I can only say that thank you for all your content
@MuhammadAhmad-o4q
@MuhammadAhmad-o4q Ай бұрын
Hi sir, We have 10+ db and 500+ tables and want to build the bot for that does your tutorial work for that if not ? Than sir can tou please guide how i can do that .
@airoundtable
@airoundtable Ай бұрын
I explained how to deal with this situation in the tutorial. I suggested different approaches for performing Q&A with such a sustem
@MuhammadAhmad-o4q
@MuhammadAhmad-o4q Ай бұрын
@airoundtable thanks
@krishchatterjee2819
@krishchatterjee2819 Ай бұрын
Thank you for the amazing video. Learnt a lot. QQ: Since I cannot use out of the box chat models, I created a CustomChatModel class following Langchain documentation by inheriting BaseChatModel Class. I'm struggling to add the bind_tools method to my customchatmodel class. Any help or thoughts will be great :) Thanks in advance.
@airoundtable
@airoundtable Ай бұрын
Thanks! I am not sure what the problem is here but you can definitely do that