Skip to main content

Module document_chains

Module document_chains 

Source
Expand description

Document processing chains.

Document processing chains that provide LLM processing capabilities for multiple documents:

  • StuffDocumentsChain: Stuff all documents into a single prompt
  • RefineDocumentsChain: Iteratively refine the answer document by document
  • MapReduceDocumentsChain: Process documents in parallel then merge results
  • MapRerankDocumentsChain: Process documents in parallel then rank by relevance

Re-exports§

pub use map_reduce::MapReduceDocumentsChain;
pub use map_rerank::extract_score;
pub use map_rerank::MapRerankDocumentsChain;
pub use refine::RefineDocumentsChain;
pub use stuff::StuffDocumentsChain;

Modules§

map_reduce
MapReduceDocumentsChain - processes documents in parallel then merges results.
map_rerank
MapRerankDocumentsChain - processes documents in parallel then ranks by relevance.
refine
RefineDocumentsChain - iteratively refines the answer document by document.
stuff
StuffDocumentsChain - stuffs all documents into a single prompt.