summarize_with_map_reduce
Summarize long documents via map-reduce: break text into chunks, summarize each, then combine. Provide file path or text content to get an overall summary.
Instructions
Summarizes a document or string using a map-reduce approach.
Exactly one of context_path or context_text must be provided. Do NOT provide both.
Note: This operation is resource-intensive and can be time-consuming.
Args:
context_path (str): The path to the context file.
context_text (str): The text content to summarize.
question (str): The question for each chunk to answer.
Returns:
str: A string containing the overall summary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| question | No | ||
| context_path | No | ||
| context_text | No |