improve documentation on how to pass in custom prompts (#561)

This commit is contained in:
Harrison Chase
2023-01-08 19:20:13 -08:00
committed by GitHub
parent 1511606799
commit b06a2a6191
5 changed files with 807 additions and 21 deletions

View File

@@ -1,7 +1,15 @@
# Summarization
Summarization involves creating a smaller summary of multiple longer documents.
This can be useful for distilling long documents into the core pieces of information
This can be useful for distilling long documents into the core pieces of information.
The recommended way to get started using a summarization chain is:
```python
from langchain.chains.summarize import load_summarize_chain
chain = load_summarize_chain(llm, chain_type="map_reduce")
chain.run(docs)
```
The following resources exist:
- [Summarization Notebook](/modules/chains/combine_docs_examples/summarize.ipynb): A notebook walking through how to accomplish this task.