> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Exploring Text Summarization

> Using foundation models and prompt design to create concise audience-specific summaries that reduce report overload and improve decision making while minimizing hallucinations

In this lesson, we explore text summarization: how to extract the most relevant information from large volumes of organizational data and produce concise outputs that accelerate decisions.

The lesson structure:

* Problem: organizations don't have time to read everything
* Solution: summarization using foundation models
* Workflow: prompt design for summarization
* Results: what summarization enables
* Key takeaway and next lesson

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/tDsOIcBSOgU8BE1P/images/Introduction-to-Amazon-Bedrock/Working-With-Different-Task-Types/Exploring-Text-Summarization/lecture-flow-summarization-prompt-design.jpg?fit=max&auto=format&n=tDsOIcBSOgU8BE1P&q=85&s=9d18e39dd4e756b3ceb9eaeb6d8539d5" alt="A dark-themed slide titled &#x22;Lecture Flow&#x22; showing teal rounded boxes connected by arrows in a flowchart. It maps Problem → Solution → Workflow → Results → Key Takeaway → What's Next, focusing on summarization and prompt design." width="1920" height="1080" data-path="images/Introduction-to-Amazon-Bedrock/Working-With-Different-Task-Types/Exploring-Text-Summarization/lecture-flow-summarization-prompt-design.jpg" />
</Frame>

Let's jump in.

## Problem: report overload

Organizations produce many long reports across business units—daily, weekly, or on other cadences. Reading and synthesizing all of them is slow and manual, which delays decisions. What organizations need are concise executive and technical summaries or short bullet points that enable faster action and clearer communication.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/tDsOIcBSOgU8BE1P/images/Introduction-to-Amazon-Bedrock/Working-With-Different-Task-Types/Exploring-Text-Summarization/slow-manual-report-overload-summaries.jpg?fit=max&auto=format&n=tDsOIcBSOgU8BE1P&q=85&s=bd5b1867c18aa00dafec7a595dad7634" alt="A presentation slide titled &#x22;Real-World Problem&#x22; with three panels: Report Overload (&#x22;Long reports every week&#x22;), Constraint (&#x22;No time to read&#x22;), and Required Output (quick bullet and executive summaries). The slide emphasizes a slow manual process as the core issue." width="1920" height="1080" data-path="images/Introduction-to-Amazon-Bedrock/Working-With-Different-Task-Types/Exploring-Text-Summarization/slow-manual-report-overload-summaries.jpg" />
</Frame>

## Solution: foundation models + prompt design

Use foundation models (for example, those available in [Bedrock](https://aws.amazon.com/bedrock/)) and carefully constructed prompts to summarize source documents. The goal is to condense long content while preserving meaning, factual accuracy, and the most critical insights.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/tDsOIcBSOgU8BE1P/images/Introduction-to-Amazon-Bedrock/Working-With-Different-Task-Types/Exploring-Text-Summarization/solution-summarization-source-to-summary.jpg?fit=max&auto=format&n=tDsOIcBSOgU8BE1P&q=85&s=4af2c5f1a87472a291f9d975c50c1879" alt="A presentation slide titled &#x22;Solution: Summarization&#x22; showing a Source Document icon flowing into a Summarization box. Side notes read &#x22;Condense longer content into summaries&#x22; and &#x22;Extract key ideas.&#x22;" width="1920" height="1080" data-path="images/Introduction-to-Amazon-Bedrock/Working-With-Different-Task-Types/Exploring-Text-Summarization/solution-summarization-source-to-summary.jpg" />
</Frame>

## Types of summarization

Choose the summary style based on audience and purpose. Below are common types and when to use them.

| Summary Type | Best for | Output characteristics |
| - | - | - |
| Short summary | Quick high-level read | One brief paragraph |
| Bullet-point summary | Presentations, briefings | 3–8 concise bullets |
| Executive summary | Leadership decision-making | High-level benefits & risks |
| Technical summary | Engineers and domain experts | Domain terms, technical detail |
| Audience-specific summary | Stakeholder-tailored communications | Tone and focus adjusted for recipient |

When you instruct the model on type and audience, it’s far more likely to produce relevant, usable summaries.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/tDsOIcBSOgU8BE1P/images/Introduction-to-Amazon-Bedrock/Working-With-Different-Task-Types/Exploring-Text-Summarization/workflow-types-summarization-diagram.jpg?fit=max&auto=format&n=tDsOIcBSOgU8BE1P&q=85&s=5b8ffe31b54e9491233484731f7fde03" alt="A slide titled &#x22;Workflow: Types of Summarization&#x22; showing a circular diagram of five summary types. The nodes are labeled Short summary, Bullet point summary, Executive summary, Technical summary, and Audience-specific summary." width="1920" height="1080" data-path="images/Introduction-to-Amazon-Bedrock/Working-With-Different-Task-Types/Exploring-Text-Summarization/workflow-types-summarization-diagram.jpg" />
</Frame>

## Prompt design — example and breakdown

A clear, structured prompt improves output quality. Good prompt design typically includes:

* Audience: who will read the summary (non-technical executive, product manager, engineer).
* Output format: paragraph, exact number of bullets, word or character limits.
* Focus: business benefits, top risks, required actions, or technical constraints.
* Grounding instructions: restrict the model to facts in the source (reduces hallucination).

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/tDsOIcBSOgU8BE1P/images/Introduction-to-Amazon-Bedrock/Working-With-Different-Task-Types/Exploring-Text-Summarization/prompt-design-summarization-exec-four-bullets.jpg?fit=max&auto=format&n=tDsOIcBSOgU8BE1P&q=85&s=bfa15b569edb9351ccd06ebf5bc9d154" alt="A stylized illustration of a laptop screen showing a prompt titled &#x22;Workflow: Prompt Design for Summarization&#x22; with instructions to summarize text for a non-technical business executive into exactly four bullets, each under 20 words. A small callout on the left reads &#x22;Specify length.&#x22;" width="1920" height="1080" data-path="images/Introduction-to-Amazon-Bedrock/Working-With-Different-Task-Types/Exploring-Text-Summarization/prompt-design-summarization-exec-four-bullets.jpg" />
</Frame>

Example prompt (structured):

```text theme={null}
Prompt

Summarize the following text for a non-technical business executive.

Provide the summary in exactly 4 bullet points.

Focus on the key business benefits, potential risks, and any important technical considerations.

Keep each bullet under 20 words and avoid unnecessary detail.
```

Prompt checklist:

* Who is the audience?
* Exactly what format is required?
* What should be emphasized or ignored?
* How should missing facts be handled?

## Common mistakes to avoid

* Being too vague about length or format → model may produce unpredictable output.
* Not specifying the audience → model cannot prioritize relevant details.
* Providing overly long input without considering model context windows → risk of truncation.
* Allowing hallucinated details → model may invent facts not in the source.

Keep in mind how tokens add up: instruction + input document + context = tokens consumed; output is additional tokens. If the total exceeds the model's context window, inputs or outputs may be truncated.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/tDsOIcBSOgU8BE1P/images/Introduction-to-Amazon-Bedrock/Working-With-Different-Task-Types/Exploring-Text-Summarization/workflow-commonmistakes-vague-length-audience-hallucinations.jpg?fit=max&auto=format&n=tDsOIcBSOgU8BE1P&q=85&s=8994579965b90f476a32ab9e10527373" alt="A slide titled &#x22;Workflow: Common Mistakes&#x22; showing four numbered circular icons across the page. The items list: too vague about length, too vague about the audience, including too much text (context window risk), and hallucinated details." width="1920" height="1080" data-path="images/Introduction-to-Amazon-Bedrock/Working-With-Different-Task-Types/Exploring-Text-Summarization/workflow-commonmistakes-vague-length-audience-hallucinations.jpg" />
</Frame>

## Grounding the model and reducing hallucination

Ground the model by including the source document and explicit instructions that require the model to use only facts present in the text. A common technique is to ask the model to respond with a fixed phrase (for example, "Not provided") when asked about facts not in the source. Still, always validate outputs—especially when decisions depend on factual accuracy.

<Callout icon="lightbulb" color="#1CB2FE">
  When precision matters, include explicit grounding instructions in the prompt (e.g., "Only use facts present in the text; if missing, say 'Not provided'") and validate outputs before using them operationally.
</Callout>

## Results — what an organization gains

Using foundation models for summarization enables organizations to:

1. Quickly understand large volumes of information.
2. Reduce time spent by humans reading long documents.
3. Produce multiple audience-specific summaries from the same source.
4. Improve decision-making by surfacing key insights faster.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/tDsOIcBSOgU8BE1P/images/Introduction-to-Amazon-Bedrock/Working-With-Different-Task-Types/Exploring-Text-Summarization/results-organization-can-quick-insights-summaries.jpg?fit=max&auto=format&n=tDsOIcBSOgU8BE1P&q=85&s=256646efc06da11e4d2926f3c0ac7e23" alt="A presentation slide titled &#x22;Results&#x22; showing four numbered panels under the heading &#x22;The organization now can.&#x22; The panels list: quickly understand large volumes of information; reduce time spent reading long documents; provide different summaries for different audiences; and improve decision-making with faster insights." width="1920" height="1080" data-path="images/Introduction-to-Amazon-Bedrock/Working-With-Different-Task-Types/Exploring-Text-Summarization/results-organization-can-quick-insights-summaries.jpg" />
</Frame>

## Key takeaway

Text summarization is most effective when prompts are explicit and intentional. Be clear about:

* Desired length and format
* Target audience
* What to focus on (benefits, risks, technical notes)

Clarity and intent in your prompts yield higher-quality, more relevant summaries.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/tDsOIcBSOgU8BE1P/images/Introduction-to-Amazon-Bedrock/Working-With-Different-Task-Types/Exploring-Text-Summarization/key-takeaway-summarization-prompts-length-output.jpg?fit=max&auto=format&n=tDsOIcBSOgU8BE1P&q=85&s=c3d1c105cc586e5c8a276dc1b7c20c18" alt="A presentation slide titled &#x22;Key Takeaway.&#x22; It states that text summarization is more useful when prompts are well structured and specify length, output, and key information to focus on." width="1920" height="1080" data-path="images/Introduction-to-Amazon-Bedrock/Working-With-Different-Task-Types/Exploring-Text-Summarization/key-takeaway-summarization-prompts-length-output.jpg" />
</Frame>

This wraps up our short introduction to text summarization. We will examine question answering in a later lesson.

Further reading and references:

* [Amazon Bedrock overview](https://aws.amazon.com/bedrock/)
* Intro to text summarization and common model approaches (search for resources like BART, PEGASUS, or transformer-based summarization papers)

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/introduction-to-amazon-bedrock/module/108362ba-e1ca-4ff5-ba48-8d7594429db7/lesson/5f60ccf3-89e0-4ae2-9cd5-c933ccd96499" />
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.