Map Rerank Finally, the Map Rerank Chain calls an LLM on each document, asking not only for an answer but also a score It then sorts the responses by the score and returns the highest one Docs: https://
api.python.langchain.com/en/latest/chai
ns/langchain.chains.combine_documents.map_rerank.MapRerankDocumentsChain.html#langchain.chains.combine_documents.map_rerank.MapRerankDocumentsChain
…
@hwchase17
-
Map Rerank Chain: LLM Document Scoring and Ranking
By
–
-
Refine Documents Chain: Iterative Document Processing with LangChain
By
–
Refine Documents Chain This chain uses the first document to get an initial response It then loops over the remaining docs, making a call to the language model to combining the response with the next document Docs: https://
api.python.langchain.com/en/latest/chai
ns/langchain.chains.combine_documents.refine.RefineDocumentsChain.html#langchain.chains.combine_documents.refine.RefineDocumentsChain
… -
MapReduceDocumentsChain: Processing Documents with LLM
By
–
Map Reduce Chain This builds on top of the ReduceDocumentsChain It takes an LLMChain and a ReduceDocumentsChain. It first applies the LLMChain to each document, and then passes all the results to the ReduceDocumentsChain Docs: https://
api.python.langchain.com/en/latest/chai
ns/langchain.chains.combine_documents.map_reduce.MapReduceDocumentsChain.html#langchain.chains.combine_documents.map_reduce.MapReduceDocumentsChain
… -
StuffDocumentsChain: Basic Document Combination for LLMs
By
–
Stuff Documents Chain The most basic CombineDocumentsChain, this takes N documents, formats them into a string using a PromptTemplate and `format_document`, and then combines them into a single prompt and passes them to an LLM Docs: https://
api.python.langchain.com/en/latest/chai
ns/langchain.chains.combine_documents.stuff.StuffDocumentsChain.html#langchain.chains.combine_documents.stuff.StuffDocumentsChain
… -
ReduceDocumentsChain: Combining Multiple Documents in LLM Prompts
By
–
ReduceDocumentsChain But what if you have too many documents to fit into a single a prompt? That's where ReduceDocumentsChain comes into play It recursively combines documents together Docs: https://
api.python.langchain.com/en/latest/chai
ns/langchain.chains.combine_documents.reduce.ReduceDocumentsChain.html#langchain.chains.combine_documents.reduce.ReduceDocumentsChain
… -
Control Document Metadata in LLM Prompts with format_document
By
–
`format_document` Want to control which metadata keys show up in the prompt? This helper function is rarely exposed, but is key to combining documents with LLMs It takes a Document and formats it into a string using a PromptTemplate Docs: https://
api.python.langchain.com/en/latest/sche
ma/langchain.schema.prompt_template.format_document.html#langchain.schema.prompt_template.format_document
… -
Combining Documents with LLMs: LangChain Documentation Improvements
By
–
Documents x LLMs Combining documents with LLMs is a key part of retrieval and chaining We've improved our @langchain reference documentation across the 5 major CombineDocumentsChains and helper functions to help with clarity and understanding of how these work
-
Better QA Over Code Through Splitting Technique
By
–
Awesome stuff from @cristobal_dev – better qa over code, thanks to splitting
-
Python AI Feature Successfully Ported to JavaScript
By
–
Was awesome to see this in python, glad it made its way to js! https://t.co/qGwE4ChYgC
— Harrison Chase (@hwchase17) 3 juillet 2023Was awesome to see this in python, glad it made its way to js!
-
LangChain QA Documentation SQL Implementation Experience
By
–
anyone tried this out with a langchain (qa over docs, sql) yet?