TextSummarize
✖
TextSummarize

Details and Options




- TextSummarize is used to condense textual information.
- TextSummarize requires external service authentication, billing and internet connectivity.
- Long strings are first split into smaller chunks, summarized independently (AKA mapped) and then combined (AKA reduced).
- Possible values for text are:
-
"string" a plain string File["path"] individual file URL["url"] the text representation of "url" CloudObject[…] a cloud object LocalObject[…] a local object SemanticSearchIndex[…] semantically indexed text {obj1,obj2,…} list of objects - The topic specification is a free-form string. It can be used to select specific portions of text.
- Generating a summary from a SemanticSearchIndex[…] requires a topic specification.
- Possible values for spec are:
-
"BulletPoints" summary of text presented as concise, key points {"BulletPoints",n} summary of text in n key points "Description" paraphrased text in condensed form (default) "Extracts" key sentences from text "Keywords" keywords from text in order of importance "KeywordSummary" keywords from text in order of appearance "OneLineSummary" extremely condensed abstract "Rewrite" short version of text with the same style "Title" possible title for text "Topics" main topics in text - Additionally, custom values for spec can be specified using:
-
prompt custom specification description {promptmap,promptreduce} separate prompts for the map and reduce parts - The prompti support the following values:
-
LLMPrompt["name"] repository prompt StringTemplate[…] templated text TemplateObject[…] template for creating text - TextSummarize supports the following options:
-
InsertionFunction Automatic function or format to apply before inserting expressions CombinerFunction StringJoin function to apply to combine pieces within a prompt Authentication Automatic explicit user ID and API key LLMEvaluator $LLMEvaluator LLM configuration to use Method Automatic method details - The default InsertionFunction is TextString on a single chunk and StringRiffle[#, "\n\n"]& on a list of chunks.
- Detailed options can be given using Method<opt1val1 >. Possible values for opti are:
-
"ContextWindow" maximal length of the text chunks "ContextPadding" minimal overlap between chunks "SplitPattern" Automatic where to split long strings - The automatic "SplitPattern" tries to split text in paragraphs, newlines and words to create chunks smaller than "ContextWindow".
- TextSummarize uses machine learning. Its methods, training sets and biases included therein may change and yield varied results in different versions of the Wolfram Language.
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Scope (14)Survey of the scope of standard use cases
Input Types (5)

https://wolfram.com/xid/0v5re8nwatf7a-yvsfj0


https://wolfram.com/xid/0v5re8nwatf7a-um1fis


https://wolfram.com/xid/0v5re8nwatf7a-tuasdj


https://wolfram.com/xid/0v5re8nwatf7a-1e7pa1

Summarize results from a semantic :

https://wolfram.com/xid/0v5re8nwatf7a-lj7fu2

Summary Specification (8)
Provide a succinct description of the text content:

https://wolfram.com/xid/0v5re8nwatf7a-3wov6

Rewrite the text in a condensed form:

https://wolfram.com/xid/0v5re8nwatf7a-dwj38n

Invent a title for the provided text:

https://wolfram.com/xid/0v5re8nwatf7a-inykip

Summarize the text in a single sentence:

https://wolfram.com/xid/0v5re8nwatf7a-j7b6er

Find the main keywords to describe the text content:

https://wolfram.com/xid/0v5re8nwatf7a-7m6l4p

Find the main keywords in the order they appear in the text:

https://wolfram.com/xid/0v5re8nwatf7a-qh8a8c

Summarize the specified text by extracting the key sentences:

https://wolfram.com/xid/0v5re8nwatf7a-ivaqtn

Summarize the specified text using a bullet point list:

https://wolfram.com/xid/0v5re8nwatf7a-sdcqwc

Specify the length of the list:

https://wolfram.com/xid/0v5re8nwatf7a-8nsjo4

Options (1)Common values & functionality for each option
Method (1)
Long string with no newlines will be automatically split at whitespaces:

https://wolfram.com/xid/0v5re8nwatf7a-jwlf6b

Define a custom split pattern to divide the chapters:

https://wolfram.com/xid/0v5re8nwatf7a-v936fp
Compute the summary using the new text chunks:

https://wolfram.com/xid/0v5re8nwatf7a-g86jmq

Possible Issues (1)Common pitfalls and unexpected behavior
Summarizing from a SemanticSearchIndex only works when a topic is specified:

https://wolfram.com/xid/0v5re8nwatf7a-8soulx


Wolfram Research (2024), TextSummarize, Wolfram Language function, https://reference.wolfram.com/language/ref/TextSummarize.html (updated 2024).
Text
Wolfram Research (2024), TextSummarize, Wolfram Language function, https://reference.wolfram.com/language/ref/TextSummarize.html (updated 2024).
Wolfram Research (2024), TextSummarize, Wolfram Language function, https://reference.wolfram.com/language/ref/TextSummarize.html (updated 2024).
CMS
Wolfram Language. 2024. "TextSummarize." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/TextSummarize.html.
Wolfram Language. 2024. "TextSummarize." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/TextSummarize.html.
APA
Wolfram Language. (2024). TextSummarize. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TextSummarize.html
Wolfram Language. (2024). TextSummarize. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TextSummarize.html
BibTeX
@misc{reference.wolfram_2025_textsummarize, author="Wolfram Research", title="{TextSummarize}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/TextSummarize.html}", note=[Accessed: 15-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_textsummarize, organization={Wolfram Research}, title={TextSummarize}, year={2024}, url={https://reference.wolfram.com/language/ref/TextSummarize.html}, note=[Accessed: 15-April-2025
]}