Create a RAG Chain using LangChain 0.1 (New version)

Поділитися
Вставка
  • Опубліковано 3 жов 2024

КОМЕНТАРІ • 108

  • @alejandro_ao
    @alejandro_ao  8 місяців тому

    💬 Join the Discord Help Server: link.alejandro-ao.com/981ypA
    ❤ Buy me a coffee (thanks): link.alejandro-ao.com/YR8Fkw
    ✉ Join the mail list: link.alejandro-ao.com/o6TJUl

  • @guruprasannasuresh3893
    @guruprasannasuresh3893 8 місяців тому +4

    Awesome. I'm excited that you are back !!!
    Thanks
    Desperately waiting for the next chapter 😀

    • @alejandro_ao
      @alejandro_ao  8 місяців тому +1

      thank you! it's coming next week :)

  • @henkhbit5748
    @henkhbit5748 8 місяців тому +3

    Thanks for the update of Langchain. Quite a lot changes in the syntax. Looking forward with open source llm and embeddings with agents using the new Langchain👍

    • @alejandro_ao
      @alejandro_ao  8 місяців тому +1

      sure thing, it's on the way!

  • @samcavalera9489
    @samcavalera9489 8 місяців тому +1

    Thanks so much bro for all your great videos! I got to know your channel only 2 weeks ago, and since then, I have been watching and practising your tutorials from early 2023. Please don't stop thw great work!
    Can't wait to watch the app version of thia RAG tutorial with agent 😃

    • @alejandro_ao
      @alejandro_ao  8 місяців тому +3

      thank you man, it means a lot! keep it up! we are living in exciting times

    • @samcavalera9489
      @samcavalera9489 8 місяців тому

      @@alejandro_ao 🙏🙏🙏

  • @mygicarskrsk4465
    @mygicarskrsk4465 8 місяців тому +2

    thanks for making these awesome videos, it helps alot to understand the concepts and you are very clear n concise. keep it up!🎉

    • @alejandro_ao
      @alejandro_ao  8 місяців тому +1

      i'm glad to hear that this is useful to you! will do!

  • @reubensolomon9047
    @reubensolomon9047 7 місяців тому

    I am impressed with your video. it was Simple, practical, and easy to follow, I've been watching tutorials on how to use Langchain but this is the best I've seen so far. I'm waiting for the app version. Keep doing the good work Alejandro.

  • @kaidone1
    @kaidone1 8 місяців тому +2

    thank god you still make videos

    • @alejandro_ao
      @alejandro_ao  8 місяців тому

      thanks! i’m doing this full time now! let me know what you want to see next :)

    • @kaidone1
      @kaidone1 8 місяців тому

      @@alejandro_ao i failed to save a vectorstore locally and use them with a different conversation chain. Main goal was to save money, because it was the same big file I processed, just different questions. I think you made a video with cloud solution once, but I would prefer a local one

    • @alejandro_ao
      @alejandro_ao  8 місяців тому

      @@kaidone1 there's a chapter about this next week's video :)

  • @cheattube
    @cheattube 8 місяців тому

    super, i was doig the same thing yesterday and then yt showed me your video:).... exellent work , WATING FOR THE NEXT CHAPTER

  • @Sarkkoth
    @Sarkkoth 8 місяців тому

    Thank you for this. With the recent changes it's been so hard to find updated tutorials.

  • @BrandonFoltz
    @BrandonFoltz 8 місяців тому

    And you are back! This made my day.

    • @alejandro_ao
      @alejandro_ao  8 місяців тому

      hello Brandon! thanks! :) so nice to see you around here again!

  • @bwilliams060
    @bwilliams060 8 місяців тому

    Thanks AO - looking forward to your next video!

  • @arashkoushkebaghi1432
    @arashkoushkebaghi1432 6 місяців тому

    Dude, I love your content. Your work addresses real world problems which is what I have been looking for. Thank you! Also you are very good at explaining these advanced terms to dumb it down for us beginners ❤. Can you make some videos about image processing with langchain?

    • @alejandro_ao
      @alejandro_ao  6 місяців тому +1

      thank you for your support!! i will be making some videos about image processing indeed. it's something that i wanted to do for a while

  • @SanjeevKumar-dr6qj
    @SanjeevKumar-dr6qj 8 місяців тому

    Awesome. You have always somehting great to offer us.

    • @alejandro_ao
      @alejandro_ao  8 місяців тому

      it's my pleasure! there's more to come

  • @ratral
    @ratral 8 місяців тому

    Alejandro, thank you. Excellent work.

    • @alejandro_ao
      @alejandro_ao  8 місяців тому

      i´m glad you liked it!! there's much more to come

  • @swiftmindai
    @swiftmindai 8 місяців тому

    Thank you brother. Truely saved my time.

  • @jacobgoldenart
    @jacobgoldenart 8 місяців тому

    Great Video! I actually coded along with the whole thing! I've been trying to get to grips with the new update and the LCEL syntax. Some topics I would love to see videos for are: 1. Runnables, RunnableParallel, RunnablePassthrough(), Runnable protocol... So many runnable things! : ) 2. Interface, is that like a wrapper for things you chain together? like Prompt | LLM | etc... 3. I'm still confused about the difference between a Chain and an Agent and how/when they work together, like can you use chains with agents or vice versa... 4. Finally, I'd love to see a video for a Conversational Agent that does function calling/tools, where the chat history is sent to a vector db and can then be retrieved as context, so that the agent can learn things over time. Thats my wish list! Thanks again.

    • @alejandro_ao
      @alejandro_ao  8 місяців тому

      hey Jacob, i'm glad you found this useful! thanks a lot for the list! i'll try to make videos about this. you can join the discord if you want to follow the news of the channel closely: link.alejandro-ao.com/discord

  • @harshyadav1190
    @harshyadav1190 8 місяців тому

    Thanks man, waiting for next part

  • @oooooohmygoood-xu1nm
    @oooooohmygoood-xu1nm 8 місяців тому

    "I come from across the ocean, where we lack video tutorials, so I'm really fortunate to have found such high-quality videos. More importantly, I hope everything goes well for the creator😉"

  • @siavoshoon
    @siavoshoon 8 місяців тому

    Thank you for this video. It was so informative and well-made.

    • @alejandro_ao
      @alejandro_ao  8 місяців тому +1

      thanks! i'm glad it was useful!

  • @smtabatabaie
    @smtabatabaie 6 місяців тому

    Super useful man, thanks

    • @alejandro_ao
      @alejandro_ao  6 місяців тому

      thanks man, glad it helped!!

  • @meetvasa6955
    @meetvasa6955 6 місяців тому

    Hey Please upoad the Agent and other stuffs video too , its very helpful!!
    Also a request to cover Langsmith and Langserve !! Itll give a upperhand

  • @jimg8296
    @jimg8296 7 місяців тому

    Totally Awesome, thank you.

  • @Matepediaoficial
    @Matepediaoficial 8 місяців тому

    So interesting! Nice to see you again

    • @alejandro_ao
      @alejandro_ao  8 місяців тому

      thanks! nice to see you too :)

  • @alessandroabaza4118
    @alessandroabaza4118 8 місяців тому

    Best explanation I've seen!

  • @laxmiagarwal3285
    @laxmiagarwal3285 4 місяці тому

    very informative video

  • @michaelwallace4757
    @michaelwallace4757 7 місяців тому

    Thanks for the video tutorial.

  • @shivamrawat108
    @shivamrawat108 6 місяців тому +1

    Great Tutorial! How can we modify this so that we get context from all the hyperlinks inside a website! Is it possible??

  • @danielmacedo1910
    @danielmacedo1910 8 місяців тому

    Thanks for the video, man!! It's great! Your content is very good and you also provide a great explanation!! Keep going!! Also, could you create a tutorial with a RAG agent with this new version of langchain? 😊

    • @alejandro_ao
      @alejandro_ao  8 місяців тому +1

      thank you man! will do, it's coming soon!

  • @juanmanuelcarrillo7731
    @juanmanuelcarrillo7731 6 місяців тому

    Good video 👍

  • @neilmcd123
    @neilmcd123 6 місяців тому

    Loving the content! Thanks! Also, Can you create this with a streamlit interface?

    • @alejandro_ao
      @alejandro_ao  6 місяців тому

      here you go!
      Tutorial | Chat with any Website using Python and Langchain (LATEST VERSION)
      ua-cam.com/video/bupx08ZgSFg/v-deo.html

  • @moonly3781
    @moonly3781 7 місяців тому

    Thank you for this great Tutorial!
    As far as I know, FAISS uses the inner product (dot product) and L2 (Euclidean) distance as standard metrics for similarity search. However, I'm curious if it's possible to use cosine similarity with FAISS instead. Would utilizing cosine similarity be more beneficial, especially considering its advantages with higher-dimensional vectors?

  • @lordareello8221
    @lordareello8221 8 місяців тому

    bro thanks alot, this is soooo useful

    • @alejandro_ao
      @alejandro_ao  8 місяців тому

      that's great to hear! you're welcome :)

  • @alejandro_ao
    @alejandro_ao  8 місяців тому +4

    Do you prefer that I use Google Colab in the videos or that I create an app with a graphical user interface?

    • @tonyblack2141
      @tonyblack2141 8 місяців тому +6

      An app with GUI will be most appreciated mate. Thanks

    • @chibuzoemelike6403
      @chibuzoemelike6403 8 місяців тому

      An app will be great

    • @sanjayojha1
      @sanjayojha1 8 місяців тому +1

      UI will be much better.

    • @guruprasannasuresh3893
      @guruprasannasuresh3893 8 місяців тому +1

      GUI is the most preferrable and the way you organize and converting into the final product stands out of all.
      Thanks

    • @Mercurion42
      @Mercurion42 8 місяців тому

      Great video! Would love to see a video with a GUI.

  • @rmjjanssen2645
    @rmjjanssen2645 8 місяців тому

    Awesome videos….just wondered why you used colab instead of the python runtime environment explained in some video before? Presumably to execute the code samples on the fly? Can you explain when to use either of these? Not sure I totally grasped the Faiss step? Anyhow would love some video’s in future on training your own models and some on the use of hugging face? Keep up the good work

    • @alejandro_ao
      @alejandro_ao  8 місяців тому

      hello there! actually, in the next video i'm showing how to do this with a local python runtime! you're right, the idea behind using a google colab is precisely to execute the code snippets on the fly. also to be able to share the code with you in a single link :) for a real app, you would use your python runtime. the video about that is coming tomorrow!

  • @amineinfo5810
    @amineinfo5810 5 місяців тому

    Can we use load qa chain function for RAG ?

  • @NavjotMakkar
    @NavjotMakkar 7 місяців тому

    How to deploy the conversational retrieval chain using langserve so that I can play around with langserve playground feature. I tried to create the chain specifying input type as- class Input(BaseModel):
    input: str
    chat_history: List[BaseMessage] . But I am getting unknown messag type error when it is trying to run the retriever_prompt.

  • @MyXRLearning
    @MyXRLearning 8 місяців тому

    Amazing videos! Would you please do one tutorial about how to bring the data from an API and make a vector store?

    • @alejandro_ao
      @alejandro_ao  8 місяців тому

      thanks! what kind of data would you like to fetch from the API?

    • @MyXRLearning
      @MyXRLearning 8 місяців тому

      @@alejandro_ao Thanks for your reply. I'm looking to fetch data in the form of JSON structures and then go from that to make the vector storage in order to make a RAG about the fetched data. :)

  • @LORENZOARCANGELI-rp4hl
    @LORENZOARCANGELI-rp4hl 8 місяців тому

    Really really nice video. What about the create an agent phase?

  • @KARAN_RANA36
    @KARAN_RANA36 7 місяців тому +1

    CSV Was removed how to perform CSV Al in lahgchain now please video

    • @alejandro_ao
      @alejandro_ao  7 місяців тому

      yeah, that video really needs an update. i'm working on it!

  • @chibuzoemelike6403
    @chibuzoemelike6403 8 місяців тому

    That you so much for this video, please can you create a video of using slack channel or google chat data with
    LangChain?

    • @alejandro_ao
      @alejandro_ao  8 місяців тому

      no worries! you mean like asking questions about a slack conversation history? or more like a chatbot inside slack?

    • @chibuzoemelike6403
      @chibuzoemelike6403 8 місяців тому

      @@alejandro_ao yeah queries about slack history, this bot can just be outside slack, maybe a web page

    • @chibuzoemelike6403
      @chibuzoemelike6403 8 місяців тому

      @@alejandro_ao Yes asking questions about a channel conversation history. The chatbot can be outside slack or integrated to slack.

  • @Vedmalex
    @Vedmalex 8 місяців тому

    классное видео! есть с чего начать

  • @priyanshuaggarwal9037
    @priyanshuaggarwal9037 8 місяців тому

    Could you explain the difference between conversation retrieval chain and retrieval qa chain?? And which is better with a memory component?

    • @alejandro_ao
      @alejandro_ao  8 місяців тому +1

      hey there. sure. the regular retrieval chain that i built here does not consider the previous messages of the conversation. it's like you were starting a new conversation with every new message.
      on the other hand, the conversational chain that we built here, takes into account the past messages of the conversation every time. that's why in the example i sent the chat history alongside the message "tell me more about it!". if we send that message to the regular retrieval chain, it will have no idea what we are talking about.

  • @laxmiagarwal3285
    @laxmiagarwal3285 4 місяці тому

    which model are you using? is it GPT-3.5

    • @alejandro_ao
      @alejandro_ao  4 місяці тому

      in this video, mostly gpt3-turbo, yes. but you can change that as a parameter when you initialize your LLM

  • @udaynj
    @udaynj 5 місяців тому

    Seems that agents are built on top of langchain chains. So do you need this if you are using agents?

    • @alejandro_ao
      @alejandro_ao  5 місяців тому

      hey there, agents are similar to chains, but they are not actually built on top of them. they use LCEL as well and can perform multi-step procedures, but they are much more flexible. a chain will always have the steps pre-defined (as you see here). an agent will use a LLM to decide the next step to take. i hope this helps!

    • @udaynj
      @udaynj 5 місяців тому

      @@alejandro_ao Thanks Alejandro. That helps. One more question if you don't mind - can you use agents to chain LLM and non-LLM models, since in the real world, not everything will need an LLM model. So say I have a xgboost time series model, but want to interconnect that with an LLM, is that possible? If so, would love to see an example of that

    • @alejandro_ao
      @alejandro_ao  5 місяців тому

      @@udaynj Absolutely! What you would have to do here is, first, decide if you are going to create a chain or an agent.
      If this is a chain, then you can create a function that applies your time series model and use it inside your chain. In this video, I created a custom function and added it inside a chain (not a ML model, but it would work pretty much the same): ua-cam.com/video/9ccl1_Wu24Q/v-deo.html
      If you are going for an agent, you will have to create tool that applies that time series model. This would be pretty similar to the function for a chain, but it would be decorated with the decorator @tool by langchain and passed in to your agent. Here is a video where I show how to create a team of agents and create their tools (you would have to create your own function that outputs the prediction of your time series model): ua-cam.com/video/kBXYFaZ0EN0/v-deo.html
      cheers!

    • @udaynj
      @udaynj 5 місяців тому

      @@alejandro_ao Thanks for the replies and the video links, Alejandro. Appreciate the detailed responses. You are an amazing teacher. Cheers from the US

  • @CherifRahal
    @CherifRahal 8 місяців тому

    What is the limit of the documents we can train with this method ?

    • @alejandro_ao
      @alejandro_ao  8 місяців тому +2

      there is virtually no limit! however, for super long knowledge bases, you might need some additional tuning rather than a simple RAG algorithm. this is true especially if you have several thousand pages worth of knowledge and the concepts are scattered across them. i'll make some tutorials on that

    • @CherifRahal
      @CherifRahal 8 місяців тому

      @@alejandro_ao Thanks, I have like word documnets, sharepoint and pdf, I just want to search for something without m ehaving to go through each file, just interact with a simple chat interface. And also I work usually with Vscode, do you think it is good or should I switch to Jupiter ?

  • @tancheeken
    @tancheeken 8 місяців тому

    Personally I find Langchain difficult to use and the documentation is pretty bad. I think Microsoft autogen approach to framework is much better.

    • @sanjayojha1
      @sanjayojha1 8 місяців тому

      The layer of abstraction is really annoying. Have you tried alternatives like llamaIndex and haystack?

    • @alejandro_ao
      @alejandro_ao  8 місяців тому +2

      LlamaIndex is awesome, i'm preparing some hands-on tutorials on it

    • @sachinp8847
      @sachinp8847 7 місяців тому

      Also create a video explaining the difference between them please