Generative AI 101: When to use RAG vs Fine Tuning?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello everyone and welcome back to the next episode of jna 101 in today's episode we're going to discuss when do you when should you use uh a fine-tuned large language model when should you just use it out of the box and when should you use uh out of the box or finding one with r so finetuning itself is a little cost costly so you take a pre-trained model and then you you first you need to have your data set you need to clean it up make sure that it is uh you know rid of any bias or anything and then you have to use that data set and you know spend some money and engineering and you know research power into fine-tuning it properly so fine tuning is of course not as costly as training the llm in the first go but it is still costly as compared to just using uh llm API or just using an open source llm directly or even doing RG so out of the three of them fine tuning a fine tune llm and creating tune llm and creating right but there are specific use cases where you have to do the way you should consider doing it very recently I sat down the CIO of a large um agriculture Agri company and uh you know they they were actually creating a model an AI model an ml model uh given a patch of land the type of soil the type of uh you know nutrients the type of bacteria Etc present in the in the soil as an input you could predict what kind of crop would go grow the best in which season of the year right so if you if as an agriculture company you have data of all of this for the last 20 30 years right you can and of course you have the resources to clean this data up then this is a prime example of when to do fine tuning because if you were to do the same in either a direct use llm or even in RG it will not have work it will not work as well as a fine-tune llm on this specific data right so if there is some Niche data in your use case that only you have or if you like that's very limited to a few companies in the world and that's not available in the uh on the internet so easily then most probably an open- Source llm will not have learned on it right so it makes sense for you to use that data set to train your own or fine-tune your own llm right and it's worth spending that money and time and effort to do that as well right I've given you two examples one in the last uh episode and one in this one and and there are many such examples uh of you know when to find you now let's move on to either using an LM directly or using R so using an llm directly is only useful when you have to when you want to use it like Char GB right so you can either use CH GPT or Bard or you know any other freely available uh you know virtual assistants on the web or you can even just use an open source one and start chatting with it but it's basically very limited to use in your day-to-day use because it has it does not integrate with your company's database right so the biggest use case and what I have seen after speaking to a lot of cxos globally is that the real use case or the real unlock of efficiency in uh efficiency in large Enterprises using jni will only happen when jni speaks to Enterprise knowledge right this is knowledge in documents knowledge in Erp systems knowledge in CRM etc etc so you have to figure out a way to merge them and just like freely available lmms are not going to you know do this for you and hence for most Enterprise use cases RG is the best option where you can figure out you can do retrieval as we have discussed in the last episode last to last episode so you can you can do retrieval on your Enterprise systems right and you can throw that to an llm where that llm can make sense of the facts that you have provided it through uh retrieval and then create a response accordingly without using its own worldly knowledge right now depending on use case to use case you have to choose between the RG one and the fine tuning one again fine-tuning is useful when you have some specific data which the world does not have which is not available on the internet and uh you know it is it will make the llm better in that specific use case right you have to do fine tuning there and for everything else most like I think 80% plus of the use cases that you know my friends in the CIO and the COO Community share with me they they can be solved with R because RG is way cheaper because it it does not require you to fine tune fine tuning requires some you know bandwidth some uh you know uh computing power and data as well R requires nothing it is very easy to set up and very easy to use and uh it grounds or you know gives facts to the llm and says that okay you have to remain within the facts and answer the question that you know either your sales team member is asking or your operation for is asking or anyone in your company is asking so if you most of the general personal use cases can get solved with r and your specific business related use cases can be solved using fine tuning and I'd be happy to discuss with any one of you one-on-one if you have a question on this so do hit me up on any of my social media channels uh if you have a doubt and we can have a discussion on this as well but thank you so much for watching everybody and have a great day
Info
Channel: Leena AI
Views: 4,694
Rating: undefined out of 5
Keywords: #GenAI101, #AIInnovation, #RAGvsFineTuning
Id: VRBhIXnFnCU
Channel Id: undefined
Length: 6min 7sec (367 seconds)
Published: Tue Feb 27 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.