LangChain is AMAZING | Quick Python Tutorial

Sdílet
Vložit
  • čas přidán 5. 09. 2024

Komentáře • 72

  • @ArjanCodes
    @ArjanCodes  Před 11 měsíci

    👷 Join the FREE Code Diagnosis Workshop to help you review code more effectively using my 3-Factor Diagnosis Framework: www.arjancodes.com/diagnosis

  • @NGrimthrie
    @NGrimthrie Před rokem +29

    This is great. Would you consider doing a video on ways to extend the models beyond their training cutoff dates? Possibly using vector databases and LangChain's document parsers?

  • @pypypy4228
    @pypypy4228 Před 4 měsíci

    This is a paragon of explanation: succinct and to the point, gradually increasing the difficulty, with an apt digression into principles and design patterns. I would love to see YOUR tutorials about LCEL - langchain chain expression language. I don't grasp the concept of RunnablePassthrough and nobody seems to explain it the way you explain the Python magic. ❤

  • @jumper0122
    @jumper0122 Před rokem +4

    I must have missed that survey -- I would love to see more content about databases and best-practices with them. Like using SQLAlchemy efficiently and whatnot. I do a lot of web scraping and it was only this year that I graduated from heinously large JSON files to proper databases

  • @drag0zu
    @drag0zu Před rokem +6

    Great video, i would really like to see how a Database Content + Model can be integrated into an LLM application (can be also GPT4all i think), so users can then ask stuff about the DB content.

    • @animelover5093
      @animelover5093 Před 10 měsíci +1

      Been thinking about this as well recently 🤔

  • @TNothingFree
    @TNothingFree Před rokem +2

    Fantastic cover.
    A. it shows how complex it is, you need to understand the API correctly to make the maximum out of it.
    B. I just can imagine what it can do with many products, every app/web site can integrate such automatic tools which may generate ton of content.
    My favorite are infinite dungeon crawlers.

  • @user-lo1ie3tz4b
    @user-lo1ie3tz4b Před rokem +1

    can not wait for your long-chain tutorials.

  • @TacticalTruth
    @TacticalTruth Před rokem +1

    Looks perfect for Data Cleaning and Record Linkage.

  • @MicheleHjorleifsson
    @MicheleHjorleifsson Před rokem +4

    Please Please do one on embeddings :)

  • @aungkyawkyaw9114
    @aungkyawkyaw9114 Před rokem

    Do all the more on all topics please. Never stop.

  • @torstenschindler1965
    @torstenschindler1965 Před rokem +4

    Hi Arjan, what’s your take on Max Woolf’s Blog: “The Problem with Langchain” ?
    Loading the environment variables via the os module is not necessary. It is done in the ChatOpenAI class anyhow.

    • @ivanherreros7773
      @ivanherreros7773 Před rokem +4

      Wow.
      I truly like Arjan's content, spirit, everything. But I have to admit that the post that you've linked here is (I am very sorry to say) of more value to me than the video itself.
      Indeed, it reflects my issues when I was trying to tweak a "RAG" demo in LangChain to my use case. Namely, asking myself, "what is all this complexity good for?". The post answers: for nothing, really.
      I think that the ones who enjoyed Software Engineering content in this channel will be more inclined to see what concepts are very useful in LangChain, and then reimplement them ourselves (or find a leaner framework- it must exist somewhere).
      So, Arjan, if you read this, please take it as constructive criticism.
      And I will of course stay subscribed :)

  • @jeffrey5602
    @jeffrey5602 Před rokem +8

    I actually enjoy the original python content the most. Especially in this AI craze I try to avoid AI content from people who weren't doing AI content before all the hype, no fence. But your great python content is what I subscribed for :)

    • @TheVengeful0ne
      @TheVengeful0ne Před rokem +3

      same. Unsubscribing for now. He has mentioned that he gets a lot more views from these type of videos so expect more from him. =/ Feels bad to see this kind of content from Arjan as someone who is working as a tech lead in the AI space. Stick to content you are great at please. Don't try to milk the hype and alienate your original subscribers by going into an area which you have superficial knowledge or a very narrow perspective/understanding about. Encouraging the use of a very opaque + opinionated framework that you have very little control over and has a very brittle foundation just doesn't work out well in production and is a bad idea.

    • @jeffrey5602
      @jeffrey5602 Před rokem +1

      @@TheVengeful0ne
      As a mid data scientist with a focus on NLP I could not agree more. I am watching the channel to get better at SWE. Also from what I have seen there have not been much useful applications for any of the "openai wrapper" and related tech. For most use cases I can see in my company it would be wasteful to actually use openai apis and using smaller HF models makes way more sense. Noone without an actual PyTorch/TF background should touch those use cases though.

  • @fuba44
    @fuba44 Před rokem +4

    But can you run your own models? Like can I download the llama 2 from huggingface, and query it using langchain?

    • @jakecyr
      @jakecyr Před rokem +2

      You can! You can extend the LLM class and add your own implementation for any custom model.

  • @moondevonyt
    @moondevonyt Před rokem +1

    mad props for diving deep into Langchain
    however, the real game changer for me would be direct integration with modern frameworks
    still, your explanations? on point
    always appreciate the effort you put in, but there's always room to elevate

    • @JohnWalz97
      @JohnWalz97 Před rokem +3

      What do you mean direct integration with modern frameworks?

    • @midprogramming
      @midprogramming Před rokem

      I'm not too sure what he means either considering Jason Zhou and multiple researchers on Twitter already have integrated Langchain into real world products... @@JohnWalz97

  • @adrianzuur5589
    @adrianzuur5589 Před rokem +8

    One of the things about LangChain that irritates me is how when you use the ConversationChain class with memory to communicate with GPT>=3.5, it DOES NOT use the chat completion endpoint OpenAI has. Instead, it uses simple completion, formatting all of the messages in the history into a single string. I suppose this is because they want the ConversationChain to work with all sorts of LLMs, including those without a chat completion mode, but... it's not the behavior you would expect for GPT>=3.5.

    • @davidyoung623
      @davidyoung623 Před rokem

      That is how the regular API endpoint functions as well 🤔 You have to send prior messages as part of your API call, or the endpoint doesn't know about them either 🤷

    • @manomancan
      @manomancan Před rokem +3

      I think it's a straight-up bug!

  • @adrianobleton
    @adrianobleton Před rokem +5

    I actually have a lot of trouble following the langchain model.
    For example, it's not clear to me why you use a human prompt and a system prompt in the country example. Wouldn't the system prompt alone be sufficient?
    For my use cases, doing a thin wrapper around the chat gpt calls is sufficient. I do use the system prompt templates though for the initial context messages.

    • @berdgg
      @berdgg Před 4 měsíci

      Its so overly complicated. You initiate so many classes, call so many methods, and then realize at the end it just constructed a big string and called a simple API...

  • @frazuppi4897
    @frazuppi4897 Před rokem +20

    langchain is actually (all love to the creator)a OOP hell and not really good

  • @nuurnwui
    @nuurnwui Před 6 měsíci

    When this video came out, I didn’t understand it. Now I do, but to me it means Arjan wasn’t quite as good at explaining as usual. Please do more on Langchain or related technologies.

  • @melvingeorge2729
    @melvingeorge2729 Před rokem

    wow! this is phenomenal :) thanks, Arjan! Also, which are the books in the shelf behind you?

  • @WirelessGus
    @WirelessGus Před 2 měsíci

    Hey Everyone 👋
    Find the parts that interest you:
    0:00 - Introduction to Lang chain and AI content
    1:00 - Setting up a large language model object
    3:00 - Working with templates in Lang chain
    6:07 - Generating response for LM with chat prompts
    7:26 - Combining Lang chain with pedantic for output formatting
    10:02 - Accessing and utilizing formatted response data
    12:05 - Potential applications for Lang chain
    13:33 - Design patterns in Lang chain
    15:59 - Importance of defining concepts in libraries
    Recap by Bumpups ✏️

  • @paulomtts
    @paulomtts Před rokem

    Very interesting. Thanks for the video!

  • @default_youtube_profile
    @default_youtube_profile Před rokem +1

    Hello Arjan,
    What keyboard are you using ?

  • @InglesConConfianza
    @InglesConConfianza Před rokem

    Great tutorial!

  • @PatrioticBastard
    @PatrioticBastard Před rokem

    can you visualize your keystrokes so we know what shortcuts youre using?

  • @pypro
    @pypro Před rokem +1

    Dude you are amazing! thanks for the content, really good to get a "best practices" view on all of these topics! thanks so much, greetings from México! let me know when you come to the caribbean (mexican) I will buy you some drinks!!

  • @RedCloudServices
    @RedCloudServices Před rokem

    Is it possible to chat with langchain documentation? How would you train an LLM using Langchain documentation?

  • @malgindesilva2758
    @malgindesilva2758 Před rokem

    This is very simple yet informative into Ajan, love your videos

  • @svaponi
    @svaponi Před 5 měsíci

    Does anybody have the transcript of the code? git repo maybe?

  • @AmitKumar-yd1cp
    @AmitKumar-yd1cp Před 19 dny

    Markville

  • @aniketgninawe4963
    @aniketgninawe4963 Před rokem

    I am working with CSV data and using create_csv_agent, looks like its facing difficulty with complex queries, any solution? Thanks

  • @Benemortasia666
    @Benemortasia666 Před rokem

    Goud

  • @thezachdrake
    @thezachdrake Před 6 měsíci

    I didn't know John Greene knew how to code.

  • @torbjrnwikestad28
    @torbjrnwikestad28 Před 11 měsíci

    Discord invite didn't work.

  • @pipi_delina
    @pipi_delina Před rokem

    Can you explain llama

  • @VoloInTech
    @VoloInTech Před rokem

    💛💙👍

  • @BorrWick
    @BorrWick Před rokem +12

    Langchain is so bad what are you saying 😅

    • @Ringoshiiro
      @Ringoshiiro Před rokem

      Why is it bad?

    • @TheVengeful0ne
      @TheVengeful0ne Před rokem

      yeah. A lot of people (myself included) have moved away from using it in production in our companies too because outside of its data/platform connectors it is just way too restrictive and has too many layers of unneeded abstractions for even very simple stuff. Pretty disappointing to see it being promoted here.. but hey as a content creator it makes sense to make content about the most popular thing out there. Like he mentioned in another comment here, he gets more viewers making these kinds of videos >.>
      ​ @Ringoshiiro you can easily find a lot of threads complaining about using it in prod on hackernews. There are also 2 very detailed articles from the Buzzfeed AI team diving into details of the problems langchain has

  • @Piipolinoo
    @Piipolinoo Před rokem +6

    Please no more AI content :( the fucking space is flooded by it. it was nice having at least you talk about other stuff. please please please no more ai crap

    • @ArjanCodes
      @ArjanCodes  Před rokem +7

      It looks like the majority of viewers disagree with you. Whenever I cover AI on the channel, the views are higher than on my other videos. I do try to keep a balance between different types of content - the last video covering AI stuff was several weeks ago.

    • @Piipolinoo
      @Piipolinoo Před rokem +2

      @@ArjanCodes haha I totally get it, i just wanted to be the loud minority ;) Keep up the good work!

    • @ArjanCodes
      @ArjanCodes  Před rokem +2

      No worries, and will do 😊

    • @Vanessa-vz5cw
      @Vanessa-vz5cw Před rokem

      ​@@ArjanCodes One thing that I think would be super interesting to do that is still very related to AI but a little more general is a more general ML modelling tutorial or video that is slightly lower-level. One thing I'd love to see your take on is how to best structure code that uses mlflow (maybe fine do hugging face language model or something to still generate interest from the LLM crowd).
      I work in machine learning and mlflow is widely, but I have yet to see someone implement it while following the programming principals you explain so well on this channel. It seems to be often called out of no where during feature engineering, model training, etc. to log metadata, which makes it quite hard to test and also keep track of where it's being called and what it's logging.

  • @ermalai
    @ermalai Před 6 měsíci +1

    I get Country is not a subclass of BaseModel, though I inherited frm BaseModel in the definition. why? raise validation_error
    pydantic.v1.error_wrappers.ValidationError: 1 validation error for PydanticOutputParser
    pydantic_object
    subclass of BaseModel expected (type=type_error.subclass; expected_class=BaseModel)

    • @edbeds
      @edbeds Před 6 měsíci

      Me too, did you find a solution?

  • @PostMasterNick
    @PostMasterNick Před 2 měsíci

    qq. what is a `ticktoken_model_name" @ 3:21

  • @ermalai
    @ermalai Před 6 měsíci

    I even tried with your exact code, I still get the same error

  • @imaderraiss1609
    @imaderraiss1609 Před rokem

    arjaound. god no.