DeepSeek R1 Model | Video 11 | GenAI & LLMs

Estimated read time: 1:20

    Learn to use AI like a Pro

    Get the latest AI workflows to boost your productivity and business performance, delivered weekly by expert consultants. Enjoy step-by-step guides, weekly Q&A sessions, and full access to our AI workflow archive.

    Canva Logo
    Claude AI Logo
    Google Gemini Logo
    HeyGen Logo
    Hugging Face Logo
    Microsoft Logo
    OpenAI Logo
    Zapier Logo
    Canva Logo
    Claude AI Logo
    Google Gemini Logo
    HeyGen Logo
    Hugging Face Logo
    Microsoft Logo
    OpenAI Logo
    Zapier Logo

    Summary

    In this video by Venkata Reddy AI Classes, the focus is on the emerging DeepSeek R1 Model, its interactions with GenAI and Large Language Models (LLMs). DeepSeek recently made headlines for its meteoric rise to the top of app store charts, achieved with a mere fraction of the budget typically spent by competitors like OpenAI. The video provides a detailed overview of DeepSeek's features, its open source nature, and its competitive edge in terms of cost and performance. Additionally, practical demonstrations of how to use DeepSeek through its API and integrations with LangChain for Python, alongside a discussion about its efficiency compared to other popular LLMs like OpenAI, are included.

      Highlights

      • DeepSeek surged to app download prominence within a week of its release. 📈
      • Achieved number one rank with 2% of the budget that OpenAI used. 💰
      • Open source nature allows extensive collaboration and innovation. 🤝
      • Deep integration into Python via LangChain makes it accessible for developers. 🧑‍💻
      • Comparative analysis shows similar performance to OpenAI models. 🔄
      • Industry adoption of DeepSeek as a leader remains to be seen. 🧐

      Key Takeaways

      • DeepSeek rose to the top of app downloads quickly with minimal cost. 🚀
      • It's open source, unlike OpenAI's models, providing wider accessibility. 📂
      • The DeepSeek model is nearly as effective as OpenAI but requires less financial outlay. 💸
      • Integration with Python using DeepSeek's API and LangChain is straightforward. 🐍
      • While promising, DeepSeek still has challenges like slower response times compared to OpenAI. ⏳
      • Despite the buzz, OpenAI remains a major player in the LLM field. 🌟

      Overview

      DeepSeek has recently taken the tech world by storm with its rapid climb to the top ranks of app downloads, a feat accomplished with a fraction of the cost usually invested in similar technologies. Released in early 2025, this open source model has captivated attention for not only its performance but also its affordability, providing users almost the same level of accuracy as established players like OpenAI.

        A key aspect of DeepSeek's appeal is its open source licensing, which contrasts sharply with the proprietary nature of many leading alternatives. This open access encourages innovation, allowing developers worldwide to interact and evolve the model further. The tutorial demonstrates how to implement DeepSeek capabilities using Python's LangChain framework, showcasing its versatility and practical utility for developers eager to explore new tools.

          Despite the excitement around DeepSeek, Venkata Reddy outlines that OpenAI remains a market leader and warns against hastily jumping ship from proven technologies. The video encourages comparing DeepSeek with existing solutions to gauge performance, suggesting that its slower API response time could be a drawback. Emphasizing that the landscape of LLMs is still developing, caution is advised before fully transitioning to new models.

            Chapters

            • 00:00 - 00:30: Introduction The 'Introduction' chapter serves as the entry point to a video series, emphasizing the importance of viewing the previous videos in the sequence for better understanding. It also mentions the availability of additional resources, including the full playlist details, materials, and code files, which can be accessed through the video description.
            • 00:30 - 01:30: Overview of DeepSeek's Popularity DEC became extremely popular in recent weeks, prompting a discussion on understanding the DC carbon model, utilizing the API, and interacting with its web interface. The sudden surge in attention is due to DeepSeek reaching the top position on the app downloads leaderboard. Released on January 20, 2025, it achieved significant success by January 29th, climbing to the top within a week.
            • 01:30 - 02:30: Comparison with OpenAI This chapter focuses on a comparison between a new app and OpenAI, highlighting its impressive performance on the App Store leadership board. This recognition is attributed to two main factors. The first is the stark contrast in development costs, with the new app costing only $5.6 million to build, compared to OpenAI's $300 million. This signifies that the new app achieved similar success with just 2% of the investment made by OpenAI, emphasizing its cost-efficiency and potential innovation.
            • 02:30 - 03:30: Features and Benefits of DeepSeek The chapter titled 'Features and Benefits of DeepSeek' discusses the advantages of DeepSeek, particularly in comparison to OpenAI. It highlights the cost-effectiveness of DeepSeek, noting that it delivers similar accuracy to OpenAI but at a lower cost. Additionally, the chapter emphasizes that DeepSeek is open source, unlike OpenAI, offering more accessibility and flexibility to users. The chapter also mentions DeepSeek's high ranking in the LLM arena, where it competes closely with other leading technologies like Gemini.
            • 03:30 - 04:30: DeepSeek Demos The chapter discusses the availability of specific versions of tools and platforms such as CH GPT 4.0 and DeepSeek R1 and R3.
            • 04:30 - 04:30: Using DeepSeek API in Python The chapter 'Using DeepSeek API in Python' discusses the prominence of Gemini in the leaderboard, highlighting its top position along with others like chb and DPC carban. It emphasizes the open nature of the MIT license which contributes to the API's popularity and wide adoption. However, the chapter raises concerns about the transparency and accuracy of the reported development costs by companies and the potential for undisclosed expenses.
            • 04:30 - 07:30: Code Demonstration with Google Colab The chapter discusses the advantages of using a particular model through Google Colab, emphasizing its cost-effectiveness and open-source nature. The conversation highlights the importance of low-cost or free resources in building products, comparing favorably to more expensive alternatives like OpenAI. The speaker appreciates the model's good accuracy and affordability, particularly noting that even if there are costs associated with using an API, they are significantly lower. The focus is on the potential savings in cost by using shared spaces and open-source solutions.
            • 07:30 - 11:00: Using LangChain Framework This chapter discusses the recent surge in popularity and news coverage of 'Deep Seek', highlighting it as a major topic in tech and general news pages. It mentions that Deep Seek is a new technology, having been released less than a month ago, and suggests visiting the Deep Seek website for demos. Additionally, it proposes considering Deep Seek as an alternative to ChatGPT, noting the website to visit for more information.
            • 11:00 - 11:30: Setting Up and Installing Packages In the chapter titled 'Setting Up and Installing Packages', the focus is on understanding the setup process of a platform named 'deep seek.com', which is described to resemble 'chity' in its design and interface. The chapter highlights the necessity of writing and possibly handling weekly, monthly, and quarterly reports within this setup. However, specific details about the actual installation of packages are not covered in the provided transcript.
            • 11:30 - 14:30: Document Loading and Embeddings This chapter discusses how various reports are generated by a credit risk analyst and the quality of responses these reports provide. It mentions several types of reports including portfolio summary reports, delinquency reports, credit approval, and rejection reports, early warning indicator reports, monthly credit risk dashboards, stress testing reports, and risk rating migration reports, highlighting the different teams responsible for generating these reports.
            • 14:30 - 19:30: Retrieval Q&A with DeepSeek This chapter discusses various types of reports and analyses generated by different teams within an organization, including the credit risk, concentration risk, regulatory compliance, economic industry analysis, scenario analysis, and forecasting teams. It highlights the specific responsibility of a model building team in developing and generating a database with table names for efficient data management.
            • 19:30 - 24:30: Conclusion and Industry Perspectives The chapter titled 'Conclusion and Industry Perspectives' aims to summarize and provide insights into the database structures generated or utilized within specific reports. The focus is on the identification and organization of table names, column names, and metrics as they appear across different reports. There is an exploration into the resultant structure of these databases, emphasizing how they facilitate information management and decision-making processes. This analysis provides a consolidated view of the industry's approach to data structuring and reporting, pointing towards the efficient handling of data within commercial applications.
            • 24:30 - 25:00: Closing Remarks The chapter 'Closing Remarks' appears to focus on summarizing the effectiveness and relevance of using prompts in obtaining accurate results in data analysis or AI models. The speaker discusses various details related to portfolio IDs and delinquency tables, emphasizing the significance of providing the right prompts to achieve high accuracy. The chapter concludes with an assertion that, based on personal testing and examples, the output from using these methods is comparable to OpenAI's capabilities.

            DeepSeek R1 Model | Video 11 | GenAI & LLMs Transcription

            • 00:00 - 00:30 [Music] this video is part of a series complete the previous videos in this playlist before you start this video the complete playlist information the material and the code file information is given in the video description below
            • 00:30 - 01:00 DEC got really famous in the last couple of weeks let us try to understand DC carbon model how do we use API and how do we interact with it in their web interface the reason why everybody is talking about deep seek right now is suddenly it went on to number one position on the app downloads leadership board it got released on January 20 2025 by January 29 you can see that I think within a week it actually
            • 01:00 - 01:30 surpassed open AI on the App Store it went to leadership board largely people started observing it or started paying attention because of two reasons one of the major reason is the amount of uh money that was spent in building this model they claim that it is $5.6 million only versus open AI $300 million it's almost like 2% of whatever was previously spent by open AI within 2% they they could achieve nearly
            • 01:30 - 02:00 equivalent of open AI capacity now that is too much we do not expect a model which is costing that much less which is still giving the same accuracy as open Ai and the other reason is this is uh open source open AI is not open source license but deep seek is open source license as soon as it came in if you see the llm arena rankings you can see deep seek is actually ranked one yes uh it is up there where Gemini it is up there
            • 02:00 - 02:30 with a CH GPT 4.0 as well as deeps R1 is here deep seek version three is here if we go to LM like maybe the slide is slightly outdated if I go to LM Arena and then try to check what exactly is happening there right now now this is the website it's taking some time to load I think we will accept that now if you go to L Arena leadership board chat Bo Arena leadership board
            • 02:30 - 03:00 on the leadership board right now Gemini Gemini chb DPC carban it is there in fact uh within top three top 1 2 three you have it and the license is a MIT license a fairly open source license so that is the reason why everybody is talking about it it has taken very very less amount I have my doubts on this like who decides this if a company comes up and tells that this is the amount that we have spent now how do we validate that whether they really spent this much or what were there any hidden
            • 03:00 - 03:30 cost or are there are there any other products that they were building out of that they have used some shared spaces and then they got the cost reduced we do not really know so but anyway overall the best part is it's a good model that is giving uh good uh accuracy and it is open source that's what matters to us open source or the price is very less even if you are paying to their API the price is a damn damn very very less compared to opena opena is already giving millions of tokens for few dollars but more than that you will get
            • 03:30 - 04:00 it in deeps so that's the reason why everybody the all the top stories are running around deeps only in on all the tech Pages even in the general news also you will see that a deep seek has been heard very frequently in the last couple of weeks I would say because it's hardly been not even one month deep seek got released now let us see some of the deep seek demos we will go to deep seek uh website first of all if you want to use it as an alternative to chat GPT you go to deep seek.com I I think it has to be
            • 04:00 - 04:30 chat. deep seek.com and this is how it look like it looks exactly the same as chity not much difference in the overall look and feel of this website and if I try to write what are the weekly monthly and let me Zoom it and quarterly reports
            • 04:30 - 05:00 generated by a credit risk analyst if I ask this question does it give a good response let us see trade analy generates various reports portfolio summary report delinquency report yes very much yes credit approval rejection report early warning indicator report monthly reports are redit risk dashboards stress testing report different team generate that actually risk rating migration report
            • 05:00 - 05:30 that is generated by a credit risk from a different team concentration risk report credit portfolio review Regulatory Compliance usually the regulatory team generates that economic industry analysis PR comparison report scenario analysis forecasting probably model building team develops this give me an idea or generate a generate a database with uh table names
            • 05:30 - 06:00 columns column names and Matrix created or used in these uh reports generate a database with table names column names and metrics used in these reports let us see what is the result
            • 06:00 - 06:30 portfolio ID Deport name etc etc different details are being given here delinquency table I think you got the idea what I'm trying to talk about here is the kind of relevance that you see once you give the prompt if you give the right prompt there is a high chance that you will get highly accurate result it looks like at par with open AI I have tried and tested it with multiple examples and it looks pretty good it is uh we can say that
            • 06:30 - 07:00 it's as good as open AI if you are taking a paid version of open AI with the free version if you are facing any limitations you can actually stop that paid version you can move on to deep seek that I can give you uh a guarantee I can watch for deep seek that you will get right results but only thing is there are some additional features in chat GPT where you have GPT store where you have canvas so those kind of uh options may not be here if you want to use you still have to go back to those
            • 07:00 - 07:30 you can even I have tried uploading some documents and extracting some text asking questions on the document everything works perfectly everything was as good as open AI I would not say it has given every time right answers there would be some errors there will be some hallucination there will be some issues but it is at par with open AI so that is part one how do you use deep seek on the website everybody must have tried it now we will go to the important part which is how do you use deep seek in an API call how do you use deep seek in your python code let us see
            • 07:30 - 08:00 that we will try to use Lang chain framework I'm going to give you this code file you can also try along so let's go to Google callab file I will go to cab. google.com I'm going to share this word file with you later on so we will go to Google cab and open a new coab file
            • 08:00 - 08:30 let me open a new notebook in the drive yes deep seek IPython notebook file now we have to install uh L chain we have to install uh deep seek on Lang chain so the code will be pip install let me increase the font pip install Lang
            • 08:30 - 09:00 chain quietly and then P install it's automatically giving open AI quely Tik Tok and lightly like yeah these are the ones that we usually need but the one that I want to install right now is PIP install why PDF is also required for our later exercise but pip install Lang chain
            • 09:00 - 09:30 L chain hund deep seek this is the one that we need to install for sure B install Lang chain hyphone deeps I will cut this these are the two that are required Lang chain and deeps on Lang chain rest of the ones are later on we require now for you to use deeps you have to get the token without the token you will not be able to use it so how do you you get the token you have to go to
            • 09:30 - 10:00 deep seek API key you may have to enter your credit card details here yes the cost is very very less but it is not absolutely 100% free so you have to generate a key there will be some billing there will be some usage so I have a top up of $10 odly and then I have started using it for a particular key you have to generate a new key here maybe you can try a sample key let me try a sample key let me call
            • 10:00 - 10:30 it as free key let us see whether it will work or not so let me copy this it may not uh work you have to copy it for the first time and then uh you have to work with it so the way that we do it is import Os Os dot environment
            • 10:30 - 11:00 the keyword is deep seek Honore API uncore key that is the one and we you have to give your own key I'm going to delete this key anyway after this class let us see whether it'll work or not if this doesn't work I already have paid for it and I have created a new key so that I will be working with it but the thing is I have already paid the bill that's the reason why any key that I give here is going to
            • 11:00 - 11:30 work so what I'll do is I'll go here and I will delete this key rebook the key and these two keys any one of those I can use so the way that I usually use is here I have all my keys all that I need to do is I have to use this uh code to access the key from there so that I don't need to or even when you are writing the code you have to keep all these keys in the environmental variable or in the environment file and then get it from there so for that I have to use from google.
            • 11:30 - 12:00 collab import user data and then deep seek environmental key is user data dot get the key the key name here is given as it's not given here so what I'll do is I will add the new secret key which is deep seek API key I'll paste it here and my key that I already have it
            • 12:00 - 12:30 somewhere saved I'm going to copy that right now and then I'm going to get it from there I think it's somewhere here already given let me delete this here is the key so which means I can directly write it here so deep seek API key the name is deep seek API key so as soon as I do that it will ask me for the permission I will grant the access yes you can use the key from here which is deep seek now it is open I can use it so for you what you need to do is you
            • 12:30 - 13:00 have to go to deeps platform and create the new open AI I mean DSE API key and then get it here sometimes you will be able to generate the key but you may get an error saying that you have exhausted or you do not have any credits if there's a way to get the credits get them otherwise you recharge with one1 or2 do you can use it for maximum sample exercise at least for one or two months you can use for one1 or2 do it's not a big deal and then let us see some of the basic prompts so let us see basic prompt example
            • 13:00 - 13:30 the rest of the code is simply like the way that we use any other generic llm like open AI or anything let us also use if later on if I want to compare it with open AI I would be requiring open a API key we can use that as well Grant the permission for open AI API key now here is the basic PR so from Lang chain deep seek Lang chain uncore deep seek usually it was uh from Lang chain. llms import
            • 13:30 - 14:00 deeps but here the syntax is from Lang chain unor deeps import chat deep seek this is the model chat deep seek so I would say my large language model is equal to chat deep seek you have to mention the model and temperature some of the parameters so my model is equal to deep seek this is a model name later on they may release some other models as well as of now the model name is deep seek iPhone chat and then I would say my llm do
            • 14:00 - 14:30 invoke lm. invoke let me ask a question what are the ways to improve the mood of a person or what are the ways to improve my mood so that I can study better give me give the output in the bullet points okay that is sufficient let me store this output in a variable called
            • 14:30 - 15:00 result result equal to this and then let's try to print the result it's simple like here we have written llm equal to chat DC otherwise we will write llm equal to open AI open Ai and then uh you can give a temperature or the model name uh anything that you want so right now we will work
            • 15:00 - 15:30 with chat deep seek and this is how the result will look like what I have observed is uh it is taking a little bit more time than the usual models like open AI or coher or any of the other models from L chain that you import any of the other Integrations compared to them it is taking a little bit more time probably 10 or 15 seconds extra so which is uh maybe later on it will be addressed content here are some of the effective ways to exercise regularly jogging yoga dancing practice
            • 15:30 - 16:00 gratitude and then these are all the ways to improve the mood so that we are always positive now this is a very basic prompt what we will do is we will go to our rag application within the rag we generally do not use uh any of the large language models but if it is retrieval Q&A chain where we give some documents and then based on the documents if we want to do any Q&A then we require large language model so the regular steps that are there in rag I will try to copy
            • 16:00 - 16:30 paste them from the previous uh code files that we have used rag earlier in rag we have used open aai right now we will use open AI as well as chat deep seek so let us try to install the required packages P PDF is required I think Lang chain Community is another one that is required Lang chain open aai is required tick token and so let us install a couple of more packages Lang chain Community is also required for for this for us to work with
            • 16:30 - 17:00 rag so the packages that are required are getting installed we have to install chroma database uh DB Vector DB and then P PDF loader open AI embeddings embeddings are not part of deep seek as of now we have to use either open AO here or some other embeddings retrieval Q&A that is the place where we will actually use our deep seek so you have other options like open Ai and go here alternative to deep seek language model so Step One is document loading we will
            • 17:00 - 17:30 try to load the documents from Basel Noms b.pdf this is a PDF file that we will try to load you can also access it I'm going to share this code file you can access it from the description so Step One is document loading step two is split the data into chunks step three is create the embeddings so split the data into chunks and then step three is creating the embeddings for creating of the embeddings we can use open a embeddings or coher embeddings ideally we should be using if we are using large
            • 17:30 - 18:00 language model which is deep seek we should be using their embeddings as well you can use any other embeddings which embeddings are simply going to convert your text Data into Vector embeddings we do not have any deep seek embeddings we can use open Ai embeddings and then store those embeddings in a vector database that is step four so the database name is Basel LS DB all these steps will work perfectly as of now there is uh no mention of Deep seek because we have taken the data
            • 18:00 - 18:30 split the data use the embeddings that will convert the splits into vectors and store the vectors and then we do the retrieval even in the retrieval it is just the retrieval of the documents I'm not going through this whole rag approach we have seen rag in the previous sessions make sure that you go through those sessions then you'll understand what I'm talking about then you'll realize that uh you know this whole process is straightforward now retrieval of the documents so here are the documents the question is what percentage is the minimum Capital requirement what percent is the minimum Capital requirement how much of the money should be kept aside by the Banks
            • 18:30 - 19:00 they should not invest in any money minimum Capital requirement I think roughly it is 8% or something that these are the documents that are related to that question that is a usual retriever but if you go to retrieval Q and A so what we want to do is retrieval Q and A let's call that as step six I want to have question and answer usually retrieval gives you only the documents and leaves it there these are the documents that you can see them as the final result that's it these are the four documents related to your question but the answer is not synthesized but
            • 19:00 - 19:30 here we want to do retrieval Q and A so we want to retrieve as well as we want to do question and answer so for that from Lang chain. chains you have to use retrieval Q and A chains and we have anyway imported open Ai and coh here so what we can do is here we have to mention the large language model my large language model is equal to open AI or go here but right now what we will do is I'll show you an example with open Ai and then we will
            • 19:30 - 20:00 get into deeps so Q Anda chain retrieval Q&A chain from chain type llm retriever equal to retriever in fact you can use something called chain type is a stuff that means all the four documents that are taken will be stuffed together to generate or synthesize the final answer so llm is my open AI chain type is stuff retriever is retriever these are the three parameters that you have to give and then you can ask your quy my
            • 20:00 - 20:30 quiry is equal to what is the percentage of minimum Capital requirement my result is q and chain. run is run required probably not but anyway we will directly go ahead with it if it throws any error then we will see the minimum Capital requirement is not specified in the given document and it is giving the minimum Capital tier one is 4.5% or something I think the answer is 4.5% that is what we want okay now instead of open AI let me re-execute open AI once again does it give any better result so
            • 20:30 - 21:00 it is giving 4.5 to 9.5 this is the right answer now the only difference instead of open AI if you using deep seek this is the only major point of this whole video if I moving from open AI to deep seek since we are using Lang chain framework there will not be any additional work in the place of large language model is open AI I would write simply large language model is equal to deep seek chat deep seek whatever is the model name that is it in of open a I'm writing deep seek and rest everything goes it takes a little bit more time than the
            • 21:00 - 21:30 regular open AI I told you there is some time that is taken and this is the result the minimum Graal requirement 4.5 to 99.5% so it is giving you slightly descriptive detailed answer but overall it is at par with open AI so this is the only difference whether you're using rag whether you're using agents whether you're using it for straightforward basic prompting the only place that you will change the code is instead of writing large language model is equal to open AI you will be writing chat deep
            • 21:30 - 22:00 seek or deep seek that is how you will use deep seek in your code so that is the discussion that we wanted to have once again in conclusion what I want to say is deep seek everybody is kind of very much talking about it because of the reason that within uh 7 to 8 days it has gone to number one on the leadership board but I want to leave with a point to note here these kind of models will keep on coming in right now everybody is talking about deep seek it doesn't mean that we have
            • 22:00 - 22:30 to totally ignore open AI we have to totally shift our system to deep seek that may not be true these kind of news you will always hear in the tech world but only thing is some news get really famous for example there was one news which says that Alibaba squ actually outperformed GPT 40 this news was somewhere around January 29 2025 around an Year back there was some or not some there was a lot of noise around Claude 3.5 which has actually it beats open AI in January 20 2024 one year back llama
            • 22:30 - 23:00 beats open AI this was also news sometime back llama beats open a Gemini beats open AI dbd 4.0 and then Cloud 3 mistl beats open Ai and Google's meta these kind of news you will always get them if everybody says that this model is beating open AI this model is beating open AI this model is beating open if every model is comparing themselves and trying to beat open AI you know who is the market leader so what we should do is we should not get really bothered
            • 23:00 - 23:30 about all these new news that we get we just need to see what is the maximum adoption by the companies I give a lot of corporate trainings when I interact with them the real market leader right now is still open AI only I haven't seen companies totally ignoring open Ai and moving to some other llms as of now so there are multiple alternatives to open AI that are existing right now but what I would say is we are very very early we are hardly two or 2.5 years into this whole llm rate there is a lot of research that is going
            • 23:30 - 24:00 on open AI they themselves might come up with a new model in the near future which may beat everybody else's model so more advanced llms May emerge in near future deep seek is not yet the industry leader a lot of people are talking about it but industry adoption we have to wait and see so as of now I would say just if you really want to try deep seek maybe get an Opa uh API key and then try to change the part wherever llm is opening a in that place you try to use deep seek
            • 24:00 - 24:30 you may want to compare open AI versus deep seek for some time and then for some of the examples you can see how is the performance of deep seek and openi in my opinion both of them are kind of uh net net almost giving the similar results I cannot really say that deep SE is totally totally outperforming open AI that I haven't seen that really as of now with the examples with the experience that I have maybe in future if I see a huge difference in some of the cases then I'll try to make another video on that thank you you have a great
            • 24:30 - 25:00 day continue with the next video in the playlist We are covering everything step by step if you have any questions or the comments please post them in the comments window below