Routing with LangChain - Basics - Semantic Routing vs. LLM Classifier

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ก.ค. 2024
  • In this Video I will show you why you want to perform routing in langchain and how you can do routing. We will explore Semantic Routing (cosine similarty) vs LLM based Classifier as Router.
    Timestamps
    0:00 Intro to routing
    0:18 Semantic Routing
    4:13 LLM based Classifier

ความคิดเห็น • 19

  • @mr.daniish
    @mr.daniish 2 หลายเดือนก่อน +1

    Short, crisp and clear! Another amazing video

    • @codingcrashcourses8533
      @codingcrashcourses8533  2 หลายเดือนก่อน

      thank you! Follow up video about routing DBs will be released on thursday.

  • @yazanrisheh5127
    @yazanrisheh5127 2 หลายเดือนก่อน +1

    Please continue uploading these. I was following your old LangChain videos before LCEL and now I still find LCEL a bit confusing. Can you make a video on what exactly is runnable and the differences? RunnableLamda, RunnablePassthrough and any other runnables etc...

  • @nintendo2000
    @nintendo2000 2 หลายเดือนก่อน

    This is the clearest video out there about routing with LangChain. Amazing, thank you!
    Would you say it is possible to fine-tune a model to become better at classifying so that I can use your second method (LLM-based classification) on top of that fine-tuned model?

  • @user-we3qo9kj4q
    @user-we3qo9kj4q 2 หลายเดือนก่อน

    Yes, finally, thank you marcus

  • @chikosan99
    @chikosan99 2 หลายเดือนก่อน

    Amazing! Thanks📍

  • @rakeshkumarrout8501
    @rakeshkumarrout8501 2 หลายเดือนก่อน

    this is awsome how can we add vectorstore to it? and can you modify this according to this output code "self_query_retrieval_chain = (
    {"context": itemgetter("question") | self_query_retriever, "question": itemgetter("question")}
    | RunnablePassthrough.assign(context=itemgetter("context"))
    | {"response": rag_prompt | chat_model, "context": itemgetter("context")}
    )"

    • @codingcrashcourses8533
      @codingcrashcourses8533  2 หลายเดือนก่อน

      Please check out my follow up video. Everything is explained there :)

  • @ihateorangecat
    @ihateorangecat 2 หลายเดือนก่อน +1

    Can I request a video about Embeddings..? Without using OpenAi embeddings but with others free APIs like huggingface etc..
    I am really struggling with embeddings these days.
    Hoping to see it.❤🤗

    • @codingcrashcourses8533
      @codingcrashcourses8533  2 หลายเดือนก่อน

      Currently not planned, sorry. My embeddings related videos hardly got any views in the past.

  • @StudioSe7enDesigns
    @StudioSe7enDesigns 2 หลายเดือนก่อน

    How do you think this pairs up against something like Langgraph?

  • @seththunder2077
    @seththunder2077 2 หลายเดือนก่อน

    In the part about cosine similarity, I have 2 questions:
    1) Why did you use cosine similarity and not dot product for instance or any other method?
    2) Shouldn't be there a certain threshold value that u can put to determine how close are they?

    • @codingcrashcourses8533
      @codingcrashcourses8533  2 หลายเดือนก่อน

      1. Cosine similarity seems to be best suited as far as I know. This is what I read in multiple papers and is my default.
      2. Thresholds are hard to define since values depend on what you ask. A better approach is to perform some kind of reranking

  • @yazanrisheh5127
    @yazanrisheh5127 2 หลายเดือนก่อน

    Since langchain is alwyas changing, can you please show us at the start of every video what version you're using? Thanks

    • @codingcrashcourses8533
      @codingcrashcourses8533  2 หลายเดือนก่อน

      There is a requirements file in my repo

    • @rajahaxeeb
      @rajahaxeeb 2 หลายเดือนก่อน

      @@codingcrashcourses8533 Can you please share repo/code link?