5-Langchain Series-Advanced RAG Q&A Chatbot With Chain And Retrievers Using Langchain

Поделиться
HTML-код
  • Опубликовано: 18 июн 2024
  • github: github.com/krishnaik06/Update...
    In this video we will be building advanced RAG Q&A chatbot with chain and retrievers using langchain
    A retriever is an interface that returns documents given an unstructured query. It is more general than a vector store. A retriever does not need to be able to store documents, only to return (or retrieve) them. Vector stores can be used as the backbone of a retriever, but there are other types of retrievers as well.
    Chains refer to sequences of calls - whether to an LLM, a tool, or a data preprocessing step. The primary supported way to do this is with LCEL.
    ---------------------------------------------------------------------------------------------
    Support me by joining membership so that I can upload these kind of videos
    / @krishnaik06
    -----------------------------------------------------------------------------------
    Fresh Langchain Playlist: • Fresh And Updated Lang...
    ►LLM Fine Tuning Playlist: • Steps By Step Tutorial...
    ►AWS Bedrock Playlist: • Generative AI In AWS-A...
    ►Llamindex Playlist: • Announcing LlamaIndex ...
    ►Google Gemini Playlist: • Google Is On Another L...
    ►Langchain Playlist: • Amazing Langchain Seri...
    ►Data Science Projects:
    • Now you Can Crack Any ...
    ►Learn In One Tutorials
    Statistics in 6 hours: • Complete Statistics Fo...
    End To End RAG LLM APP Using LlamaIndex And OpenAI- Indexing And Querying Multiple Pdf's
    Machine Learning In 6 Hours: • Complete Machine Learn...
    Deep Learning 5 hours : • Deep Learning Indepth ...
    ►Learn In a Week Playlist
    Statistics: • Live Day 1- Introducti...
    Machine Learning : • Announcing 7 Days Live...
    Deep Learning: • 5 Days Live Deep Learn...
    NLP : • Announcing NLP Live co...
    ---------------------------------------------------------------------------------------------------
    My Recording Gear
    Laptop: amzn.to/4886inY
    Office Desk : amzn.to/48nAWcO
    Camera: amzn.to/3vcEIHS
    Writing Pad:amzn.to/3OuXq41
    Monitor: amzn.to/3vcEIHS
    Audio Accessories: amzn.to/48nbgxD
    Audio Mic: amzn.to/48nbgxD

Комментарии • 66

  • @sks_DS
    @sks_DS 2 месяца назад +18

    Suggestion : It would be really helpful for viewers and Data Science communities : if next you can make a video on chatbot(maybe chainlit ui) to chat with pdf using langchain any llm(openai/ollama) as a next step, only thing is chatbot should remember chat history(maybe use langchain memories component) so if my first question is : Who is Sachin Tendulkar? and the next follow up question is What is his place of birth? so chatbot should automatically infer that his -> means Sachin Tendulkar. Thanks in Advance.

    • @thesuriya_3
      @thesuriya_3 2 месяца назад

      i already thought this 💯

    • @amritsubramanian8384
      @amritsubramanian8384 Месяц назад

      hey sks, for that you have this concept called as memory buffer in langchain. You can look to it in LangChain Docs ;)

  • @venkatkrishnan9442
    @venkatkrishnan9442 2 месяца назад +3

    your videos are too good Krish. If some points are not understood and when I again check back I can get and relate what you are explaining. Thanks for all these very useful videos

  • @user-ko7yz9kj4o
    @user-ko7yz9kj4o 2 месяца назад +3

    followed all the 5 videos in less than 24 hrs. Now gotta looks at the documentation for retrieving from multiple documents.

  • @NoDoglapan
    @NoDoglapan 2 месяца назад +4

    Your new look reminds me of 70's bollywood villain called 'Shetty' (Rohit Shetty's father) LOL 🤣😛😁 . But in real life you are a hero !!! 🙏

  • @SantK1208
    @SantK1208 2 месяца назад

    You are a gem @krishnaik Sir, i read langchain from multiple platforms but u made it so simple. Now I have more interest on this topic🙂

  • @vos72
    @vos72 Месяц назад +1

    Great hair cut! It suits you! Absolutely love your videos -- they have been very helpful so far! You're an outstanding teacher!

  • @abutareqrony4513
    @abutareqrony4513 2 месяца назад +1

    Just an awesome explanation. Love you bro. Make more videos for us.

  • @andrespineiro7609
    @andrespineiro7609 2 месяца назад

    I love this seires. Please dont stop!

  • @zishankhan2763
    @zishankhan2763 2 месяца назад

    If I could I would have liked this series 1000s time, you are awsome person man, I wish you all the very best for the kind work you are doing, Just love you man, big fan

    • @Rider12374
      @Rider12374 2 дня назад

      you could have liked it 1000 times bcz you are fool.

  • @shalabhchaturvedi6290
    @shalabhchaturvedi6290 2 месяца назад

    Loved it!

  • @phuloriavivek
    @phuloriavivek 2 месяца назад +1

    Hi Krish. Thank you so much for your amazing content. These videos have really been helping me in my GenAI journey.
    I am stuck in one place though
    I want to use an output parser -(eg a on the output. But I am not able to do that. Tried a lot of different methods to solve this, but , but not able to debug .
    If possible, could you please guide how this may be done?
    Thank you so much in advance.

  • @mukeshvishwakarma6236
    @mukeshvishwakarma6236 2 месяца назад

    Super cool!

  • @omsundaram4377
    @omsundaram4377 29 дней назад

    Krish ji , you are looking like Sakal...jokes apart great video and good learning content ..

  • @venkatkrishnan9442
    @venkatkrishnan9442 2 месяца назад

    Will check for different document loaders, mainly the microsoft one :)

  • @techtalksabhishek
    @techtalksabhishek 2 месяца назад

    I am with your look.

  • @ahmadmponda3294
    @ahmadmponda3294 2 месяца назад

    Feels like a Shoulin Monk😀 nice

  • @berhanubogale2660
    @berhanubogale2660 17 дней назад

    awesome. You are Good

  • @mohsenghafari7652
    @mohsenghafari7652 2 месяца назад

    tanks krish !

  • @RahulPrajapati-jg4dg
    @RahulPrajapati-jg4dg Месяц назад

    looking Good sir 😃

  • @eventsjamaicamobileapp1426
    @eventsjamaicamobileapp1426 Месяц назад

    Great

  • @SantK1208
    @SantK1208 2 месяца назад

    Thanks for the video, could you also please add some topics for RAG -> Qdrant, LLamaindex Parser, Nomic-embeding text

  • @emiliobravo1385
    @emiliobravo1385 2 месяца назад

    You look sharp Mr Naik

  • @nandinimatamacedatascince1407
    @nandinimatamacedatascince1407 2 месяца назад

    Very helpful Video , can you make a video on how to load multiple pdf files to create RAG pipeline and connect with azure openai,its will be very useful,currently you are handling with only file.

  • @malleswararaomaguluri6344
    @malleswararaomaguluri6344 2 месяца назад

    Hi krish, can you run the same with gpu cuda what are the changes need to apply. Before running llms, how to confirm cuda activated or not. I just checked with tensorflow and pytorch it is detecting xuda version, but this is enough or need to test some more tests. Please reply. Thanks.

  • @nishantchoudhary3245
    @nishantchoudhary3245 2 месяца назад

    Waiting for next video

  • @ModiJi_Family
    @ModiJi_Family 2 месяца назад

    Thanks, please teach us to deploy using Docker as well with the help of a server like triton inference server

  • @sriharshaboini
    @sriharshaboini 2 месяца назад

    Waiting

  • @sandeeppvn0503
    @sandeeppvn0503 2 месяца назад +2

    Can we use LECL to implement these? It would be helpful if you could show how to use LECL in your future videos also.

  • @hamidraza1584
    @hamidraza1584 2 месяца назад +1

    Looking funny man. Love from Lahore Pakistan

  • @amritsubramanian8384
    @amritsubramanian8384 Месяц назад

    Gr8 videoo

  • @prakashmccullum958
    @prakashmccullum958 2 месяца назад

    Hey bro whatsup with your hair style man, it's really cool man, nice

  • @summa7545
    @summa7545 2 месяца назад +1

    Hi krish, will you create a new episode on usage of various types of retrieval chains? You used retrievalqa in your earlier episode, then bappy did use different retrievar in his episode. Could you provide us a list of scenarios to use specific functions? 😅

  • @SujeetKumar-tl3lq
    @SujeetKumar-tl3lq 2 месяца назад

    Thanks for video, I had question, retrieval_chain.invoke() in this function you are passing only query, where is context, is that optional ?

    • @shankarpentyala2390
      @shankarpentyala2390 3 дня назад

      The retrieval_chain is taking care of getting the context.
      response = retrieval_chain.invoke({"input": "what is attention"})
      response
      when executed above code, the response is:
      {'input': 'what is attention',
      'context': [Document(page_content='3.2 Attention
      An attention function can be described as mapping a query and a set of key-value pairs to an output,
      where the query, keys, values, and output are all vectors. The output is computed as a weighted sum
      3', metadata={'source': 'attention.pdf', 'page': 2})],
      'answer': 'Based on the provided context from the paper "Attention Is All You Need" by Ashish Vaswani et al., I can answer your question.

      According to the text, an attention function can be described as mapping a query and a set of key-value pairs to an output, where the query, keys, values, and output are all vectors. The output is computed as a weighted sum.

      In simpler terms, attention refers to a mechanism that allows a model to focus on specific parts of an input sequence (or key-value pairs) based on their relevance or importance. This process involves comparing the input sequence with the query vector and computing weights for each position in the input sequence. The output is then computed by taking a weighted sum of the values, where the weights are learned during training.

      Attention has been used successfully in various tasks such as reading comprehension, abstractive summarization, textual entailment, and learning task-independent sentence representations.

      Please let me know if you find this answer helpful!'}
      It has your input,context and answer fields

  • @ayodeleayodeji4410
    @ayodeleayodeji4410 2 месяца назад

    will this video be available to all in your RUclips channel

  • @omkarjamdar4076
    @omkarjamdar4076 2 месяца назад +1

    Please tell the minimum config. of laptop to run this project, and also for 7b model.
    Are laptops capable of running it if yes recommend future proof ones

    • @shonrockey6135
      @shonrockey6135 2 месяца назад

      I am not an expert but I think you could buy a laptop which has rtx 3060 graphics card or above it would pretty fast when running 7b model. I am using 2018 acer nitro 5. It has gtx 1050ti graphics and 16 gb ram. I use ollam to run open-source quantized models. It's is slow but it accomplish the task. Either buy a laptop which has graphic rtx 3060 or above. Or buy a mac. Also you could fine tune the models if you have mac or rtx 3060

  • @user-ti8sz5ps7r
    @user-ti8sz5ps7r 2 месяца назад

    can you create an API with streamlit UI where user can upload a pdf documents and chat with it .....API and Streamline can do the work..I liked your video

  • @nishantchoudhary3245
    @nishantchoudhary3245 2 месяца назад

  • @nehapradhan498
    @nehapradhan498 16 дней назад

    Hi,
    when I run :
    retrieval_chain = create_retrieval_chain(retriever,document_chain), I keep on getting this error:
    AttributeError: 'function' object has no attribute 'with_config'
    Does anyone know how to fix it?

  • @rishiraj2548
    @rishiraj2548 2 месяца назад

    🙏

  • @Danny_DB-xi5lo
    @Danny_DB-xi5lo 2 месяца назад +1

    Hi Krish...
    Actually I was developing an end-to-end chatbot application for multiple PDF upload from UI with the help of streamlit framework.
    I used Recursive text splitter and chunking, then huggigface embeddings and chromadb vextorstore. also used Conversational Retrieval Chain.
    LLM used gpt-3.5-turbo
    But i am facing issues to get response like repetitive response sometimes, or last query's response if i ask irrelevant questions, sometimes correct response, Can you guide me please

    • @DoomsdayDatabase
      @DoomsdayDatabase 2 месяца назад

      Could you provide me your github? I aint Krish but i might know how to help

  • @anshulesh
    @anshulesh 2 месяца назад

    Please make videos of RAFT also.

  • @khalidkifayat
    @khalidkifayat 2 месяца назад

    Hi, where to find these RAG Q&A Chatbot With Chain And Retrievers JOBS ONLINE ?? does it require prior building experience ??

  • @user-ht5ev7il3h
    @user-ht5ev7il3h 2 месяца назад

    @krish why this is advanced rag concepts, yiu have already explained the retrieverQA concepts right.....i dint get what is tge difference

  • @meenakshichippa260
    @meenakshichippa260 18 дней назад

    Krish u look handsome now !!!

  • @saliltrehan4255
    @saliltrehan4255 2 месяца назад

    It is true! Hehe

  • @user-ti8sz5ps7r
    @user-ti8sz5ps7r 2 месяца назад +1

    Kindly create an API on RAG with PDF documents rather than just Notebooks

  • @arjunraj3920
    @arjunraj3920 2 месяца назад

    waited for a lifetime to get a response.....
    my specs are 8gb ram
    i5 12th
    will i get some output

  • @thinktrovert
    @thinktrovert 2 месяца назад

    When I run:
    response=retrieval_chain.invoke({"input":"Scaled Dot-Product Attention"})
    I am getting this error:
    TypeError: can only concatenate str (not "ChatPromptValue") to str
    What to do???

  • @commoncats5437
    @commoncats5437 2 месяца назад

    reddy garo😝🔥🔥

  • @twinklepardeshi3113
    @twinklepardeshi3113 2 месяца назад +1

    First comment ❤

  • @twinklepardeshi3113
    @twinklepardeshi3113 2 месяца назад

    First like

  • @Rider12374
    @Rider12374 2 дня назад +1

    You just tell how to use tools but not why to use . It's a very bad approach whether you like it or not, but that's the truth and try to improve it.

  • @yusufansari3203
    @yusufansari3203 2 месяца назад

    Krish Sir I am getting this error:
    ValueError: Error raised by inference endpoint: HTTPConnectionPool(host='localhost', port=11434): Max retries exceeded with url: /api/embeddings (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
    Please help me out!

    • @jayaprakash7348
      @jayaprakash7348 2 месяца назад

      I am also getting same error from "retrieval_chain.invoke" method. Please help us with the solution @Krish Ji

    • @keerthipriya3416
      @keerthipriya3416 29 дней назад

      ​@@jayaprakash7348 I also got the same error, downloading ollama and running llama2 model locally will fix this!

    • @keerthipriya3416
      @keerthipriya3416 21 день назад

      @@jayaprakash7348 I also got the same error. downloading ollama and running llama model locally would fix this.