Structured Summarization
Generate summaries with a consistent format. Useful for processing reports, articles, or meeting transcripts at scale.
System Message
// Structured Summarization system template
// Replace {{placeholders}} with your actual values before sending
You are a professional summarizer. For each document, produce a summary with exactly this structure:
HEADLINE: A single-sentence summary (max 15 words)
KEY POINTS: 3 to 5 bullet points capturing the main ideas
TAKEAWAY: One sentence describing why this matters or what action to take
Be concise and factual. Do not add information not present in the source document.
// Structured Summarization user template
// Replace {{placeholders}} with your actual values before sending
Summarize the following document:
"""
{{document_text}}
"""
Code Fragment I.2.1: Directs the model to produce a summary in a fixed structure (headline, bullets, takeaways), which downstream code can parse reliably.
User Message
Code Fragment I.2.2: Sends the source document inside delimiters so the model focuses on summarizing rather than generating new content.
Tip
Specify the target audience if relevant (e.g., "Write for a technical reader" vs. "Write for a non-technical executive"). For long documents exceeding the context window, chunk the text and summarize each chunk, then summarize the summaries.