LangChain - Chain Deep Dive (Map-Reduce, Stuff, Refine, Map-Rerank) - Project based approach
2024 ж. 14 Мам.
4 384 Рет қаралды
In this video you get a deep dive into LangChain LLMChains. You will learn about other Chains than the basic stuff than - Refine, Map-Reduce and Map-Rerank chains.
Code: github.com/Coding-Crashkurse/...
Timestamps:
0:00 Introduction
0:23 Different types of chains
2:11 KZhead Summariser with Map-Reduce
8:20 TkInter Code and Startup
#langchain #tkinter
great video thanks man
Thankyou for this video! Can you please explain that when we write combine_documents_chain = StuffDocumentsChain(chain=reduce_chain,....) , does this call the reduce_chain first meaning, create a summary of all the documents summary and then combine them using StuffDocumentsChain or is it vice versa (stuff all the summaries into a Single Prompt and then call StuffDocumentsChain to summarize all the summaries obtained from Map Step)? Or have i completely misunderstood the concept all together?
You first run the MAP-Chain (summarise EACH Document) and use the results and pass it to the reducer step :). Maybe you missunderstand the map step
bravo, any tutorials for offline llms, specifically processing pdfs with map_reduce?!?
What you mean with offline llm? Open Source llms?
Yep! Open source from HF, ideally using the transformers library@@codingcrashcourses8533
first
music is a bit too loud
:(. Thanks for Feedback. Will put the volume down next time
Unfortunately the code ONLY covers the REDUCER! The title of the video is misleading 😢 Apart from this the general content of this channel is very good.
Hm?
@@codingcrashcourses8533 Hard to answer a question with a string of “Hm”.
@@RealEstate3D I don´t understand how you come to the conclusion that this only covers the reducer. For a MapReduceDocumentsChain we need a mapper and a reducer. A reducer will not work on its own. Line 39: llm_chain=self.map_chain references our map_chain
@@codingcrashcourses8533 I was searching for the refining method, which is in the title.