This prompt is for content operations teams, technical writers, and product builders who need to generate multiple summaries of the same source material at different compression levels. The core job-to-be-done is producing a set of summaries—for example, a 50-word headline summary, a 150-word executive brief, and a 500-word detailed overview—that each preserve the key points of the source while hitting a specific word-count target. The ideal user is someone integrating summarization into a content pipeline, a knowledge base, or a product surface where downstream consumers need different levels of detail from the same document.
Prompt
Structured Summary Prompt with Word Count Buckets

When to Use This Prompt
Define the job, reader, and constraints for the Structured Summary Prompt with Word Count Buckets.
Use this prompt when you have a single, self-contained source document and need multiple summaries with strict length constraints. It works best when the source is factual prose such as reports, articles, technical documentation, or meeting transcripts. The prompt is not suitable for multi-document synthesis, real-time conversation summarization, or scenarios where the summary must include external knowledge beyond the source. Avoid using it when the source contains highly ambiguous or contradictory information that requires resolution before summarization—this prompt compresses, it does not reconcile.
Before deploying this prompt, ensure you have a reliable way to count words in the output, a validation step that checks each summary against its target bucket, and a fact-consistency eval that compares claims in the summary to the source. If the summaries will be shown to end users without review, add a human-in-the-loop checkpoint for the first batch of outputs. Do not use this prompt for regulated content such as clinical summaries or legal briefs without mandatory human review and source-grounding verification.
Use Case Fit
Where the Structured Summary Prompt with Word Count Buckets works well and where it introduces risk. Use these cards to decide if this prompt pattern fits your production workflow.
Good Fit: Multi-Length Content Operations
Use when: You need the same source material summarized at multiple compression levels (e.g., 50-word, 150-word, 300-word) for different surfaces like push notifications, search snippets, and full digests. Guardrail: Define all target buckets in the output schema upfront so the model generates all variants in one call, reducing variance across lengths.
Bad Fit: Subjective or Nuanced Editorial Judgment
Avoid when: The summary requires tone adaptation, brand voice, or editorial framing that cannot be reduced to word-count targets. Word-count buckets optimize for compression, not stylistic range. Guardrail: Use a separate style-and-tone prompt with few-shot examples for editorial work, and keep word-count bucketing for factual compression only.
Required Inputs: Source Text and Bucket Definitions
What to watch: The prompt assumes clean, bounded source text and explicit word-count targets. Missing or malformed inputs produce unreliable output. Guardrail: Validate that [SOURCE_TEXT] is non-empty and under a maximum character limit before assembly. Reject requests where [WORD_COUNT_BUCKETS] contains fewer than two targets or unrealistic values.
Operational Risk: Word-Count Drift Under Load
What to watch: Models may overshoot or undershoot word-count targets, especially at very low targets (under 30 words) or when source text is highly technical. Guardrail: Add a post-generation validation step that counts words per bucket and flags outputs outside a ±15% tolerance. Route out-of-tolerance summaries to a repair prompt or human review.
Operational Risk: Fact Consistency Across Buckets
What to watch: Shorter summaries may drop key facts present in longer summaries, creating inconsistency when all buckets are displayed together. Guardrail: Run a cross-bucket fact-check eval that extracts claims from the shortest summary and verifies they appear in the longest summary. Flag missing claims for review.
Variant: Single-Call Multi-Bucket vs. Iterative Compression
What to watch: Generating all buckets in one call is faster but risks lower quality on longer summaries. Iterative compression (long → medium → short) can preserve key points better but costs more tokens and latency. Guardrail: Default to single-call for latency-sensitive production. Switch to iterative compression when eval shows key-point loss exceeding 10% in the shortest bucket.
Copy-Ready Prompt Template
A reusable prompt template for generating structured summaries at multiple word-count targets with key-point preservation.
This template is designed to be copied directly into your prompt management system, codebase, or AI orchestration tool. It uses square-bracket placeholders for all dynamic inputs, making it safe for string formatting and template engines. The prompt instructs the model to produce a structured summary object containing multiple compression levels, each with a target word count, a list of preserved key points, and a fidelity score. The output schema is embedded directly in the prompt so the model understands the expected shape before generation begins.
textYou are a precise summarization engine. Your task is to read the provided [SOURCE_TEXT] and produce a structured summary object with multiple compression levels. ## Input [SOURCE_TEXT] ## Output Schema Return a single JSON object with the following structure: { "summaries": [ { "bucket_label": "string (e.g., 'micro', 'short', 'standard', 'detailed')", "target_word_count": integer, "actual_word_count": integer, "summary_text": "string", "key_points_preserved": ["string"], "fidelity_score": number (0.0 to 1.0) } ] } ## Word Count Buckets Generate one summary for each of the following target word counts: [WORD_COUNT_TARGETS] ## Constraints - Each summary must be self-contained and readable without referring to other buckets. - Key points must be extracted from [SOURCE_TEXT] only. Do not introduce external knowledge. - The fidelity_score must reflect how much of the source's essential meaning is preserved at that compression level (1.0 = all key points preserved, 0.0 = none). - actual_word_count must be the exact word count of summary_text, not an estimate. - If [SOURCE_TEXT] is shorter than a target word count, set summary_text to the full source, actual_word_count to the source word count, and fidelity_score to 1.0. - If [FOCUS_TOPICS] is provided, prioritize those topics in key point selection. ## Examples [FEW_SHOT_EXAMPLES] ## Risk Level [RISK_LEVEL]
To adapt this template, replace each square-bracket placeholder with your runtime values. [SOURCE_TEXT] accepts the document or passage to summarize. [WORD_COUNT_TARGETS] should be a comma-separated list of integers like 50, 150, 300. [FOCUS_TOPICS] is optional; pass an empty string or a list of topic phrases to bias key-point selection. [FEW_SHOT_EXAMPLES] should contain one or two worked examples showing the expected output shape for a sample input. [RISK_LEVEL] accepts low, medium, or high and can be used downstream to decide whether human review is required. If your application uses a template engine like Jinja2 or Mustache, replace the square brackets with your engine's native syntax. Always validate that [SOURCE_TEXT] is non-empty and that [WORD_COUNT_TARGETS] contains at least one positive integer before sending the prompt to the model.
Prompt Variables
Required inputs for the Structured Summary Prompt with Word Count Buckets. Substitute these placeholders before sending the prompt to the model. Validation checks should run in the application layer before inference.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[SOURCE_TEXT] | The full document or passage to summarize | The quarterly earnings report filed on... | Required. Must be non-empty string. Check length exceeds 50 characters. Truncate if over model context limit minus prompt overhead. |
[WORD_COUNT_BUCKETS] | Comma-separated list of target word counts for each summary tier | 50, 150, 300 | Required. Must parse as integer array. Each value must be positive and non-decreasing. Reject if any bucket exceeds 1000 words or if more than 5 buckets specified. |
[CONTEXT_DESCRIPTION] | One-sentence description of the source document type and domain | A technical SaaS product launch press release | Required. Must be non-empty string under 200 characters. Used to orient the model's key-point selection. Reject if contains PII patterns. |
[AUDIENCE] | Target reader persona for the summaries | Product managers evaluating competitive positioning | Required. Must be non-empty string under 150 characters. Shapes vocabulary and detail level. Default to 'general professional audience' if not specified. |
[KEY_POINTS_MINIMUM] | Minimum number of distinct key points to preserve across all buckets | 5 | Required. Must be positive integer between 1 and 20. Higher values force denser summaries. Validate as integer before substitution. |
[OUTPUT_FORMAT] | Desired output structure for the summaries | JSON with keys: bucket_sizes, summaries (array of {word_count_target, word_count_actual, summary_text, key_points_preserved}) | Required. Must be one of: 'JSON', 'Markdown sections', or 'Numbered list'. If JSON, include schema validation post-generation. Default to 'Markdown sections'. |
[FACT_GROUNDING_LEVEL] | Instruction for how strictly summaries must stick to source facts | strict | Required. Must be one of: 'strict' (no inference beyond source), 'moderate' (allow reasonable paraphrasing), or 'loose' (allow interpretive synthesis). Affects hallucination risk. Default to 'strict' for regulated content. |
Implementation Harness Notes
How to wire the Structured Summary Prompt with Word Count Buckets into a production application with validation, retries, and observability.
This prompt is designed to be called from an application layer that manages input assembly, output validation, and retry logic. The core workflow involves sending a source document and a set of target word-count buckets to the model, then receiving a structured JSON payload containing one summary per bucket. The application should treat the prompt as a stateless function: it receives [SOURCE_TEXT] and [WORD_COUNT_BUCKETS] as inputs and returns a [SUMMARIES] array. Do not rely on the model to enforce word-count limits perfectly; the application must validate compliance and handle failures programmatically.
Model Selection: Use a model with strong instruction-following and structured output capabilities, such as gpt-4o, claude-3-5-sonnet, or gemini-1.5-pro. Avoid smaller or older models that struggle with simultaneous constraints on length, structure, and factual consistency. If latency is critical, consider routing shorter source texts to a faster model while reserving the primary model for documents exceeding 2,000 tokens. Input Assembly: The application must pre-process [SOURCE_TEXT] to truncate it to a maximum token budget (e.g., 80% of the model's context window minus reserved output tokens). If the source exceeds this budget, chunk it and summarize each chunk independently before merging, or use a long-context model. Inject the word-count buckets as a JSON array of integers, e.g., [50, 150, 300]. Output Validation: Parse the model's response as JSON and validate the following before returning it to the user: (1) the response is valid JSON matching the expected schema; (2) the number of summaries equals the number of requested buckets; (3) each summary's word count falls within a tolerance band (e.g., ±15% of the target, or a stricter ±10% for buckets under 100 words); (4) each summary contains at least one key point from the source, verified by a lightweight entailment check or keyword overlap threshold. If validation fails, increment a retry counter and re-invoke the prompt with the same inputs and an added [VALIDATION_ERRORS] field describing what went wrong.
Retry and Fallback Strategy: Implement a maximum of 3 retries for validation failures. On the first retry, append the specific validation error (e.g., '50-word summary was 72 words; please shorten to within 10% of target') to the prompt. On the second retry, add a stronger constraint: 'You must output exactly the requested word counts. Do not exceed the target by more than 10%.' If the third attempt still fails, log the failure, return the best available output with a validation_warning flag, and route the task to a human review queue if the use case is high-stakes (e.g., executive briefings, legal summaries). For non-critical applications, accept the closest valid summary and surface a warning in the UI. Logging and Observability: Log every invocation with a unique trace_id, the model version, input token count, requested buckets, output word counts, validation pass/fail status, retry count, and latency. This data is essential for debugging drift when model behavior changes after an API update. Store the assembled prompt and raw response for at least 30 days to support failure analysis.
When to Add Product Code Instead of Prompt Tweaks: If word-count compliance remains inconsistent across retries, move enforcement out of the prompt and into post-processing. Use a separate, cheaper model call or a deterministic text-compression algorithm to trim or expand summaries to the exact target length after the primary model returns its output. If factual consistency is critical, integrate a retrieval step that grounds each summary claim against the source text using an NLI model before returning results to the user. Do not attempt to solve persistent reliability problems by endlessly refining the prompt; the application layer is the correct place for hard constraints. Human Review Triggers: Escalate to human review when validation fails after all retries, when the source text contains regulated content (e.g., financial disclosures, clinical notes), or when the output will be published without further editing. The review interface should display the source text, each summary with its target and actual word count, and a diff view highlighting claims that failed the entailment check.
Expected Output Contract
Defines the shape, types, and validation rules for the structured summary output. Use this contract to build post-processing validators and eval assertions before the summary enters downstream systems.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
summary_bucket | object | Must contain exactly one key matching a requested word-count bucket (e.g., 'short', 'medium', 'long'). Key name must be a lowercase string from the allowed bucket set. | |
summary_bucket.<bucket_key>.text | string | Non-empty string. Word count must fall within the target range specified for that bucket. Validate with word tokenizer, not character count. | |
summary_bucket.<bucket_key>.word_count | integer | Must be a positive integer. Must equal the actual word count of the 'text' field computed by the same tokenizer used in validation. Mismatch triggers a retry or repair. | |
summary_bucket.<bucket_key>.key_points | array of strings | Array must contain 3-7 items. Each string must be a complete sentence. No empty strings allowed. Each key point must be directly traceable to a claim in the source text. | |
summary_bucket.<bucket_key>.information_density_score | number | If present, must be a float between 0.0 and 1.0. Represents the ratio of unique factual claims to total words. Null allowed when density cannot be computed. | |
source_document_id | string | Must match the document identifier provided in the prompt input. Non-empty. Used for traceability in downstream systems. | |
generation_timestamp | string (ISO 8601) | Must be a valid ISO 8601 UTC timestamp (e.g., '2025-01-15T14:30:00Z'). Reject any non-UTC or ambiguous timezone formats. | |
model_version | string | If provided by the generation harness, must match the expected model identifier pattern (e.g., 'claude-3-opus-20240229'). Null allowed when injected by application layer rather than the model. |
Common Failure Modes
Structured summary prompts with word-count buckets fail in predictable ways. Here are the most common failure modes and how to guard against them before they reach production.
Word-Count Drift and Bucket Mismatch
What to watch: The model produces summaries that miss the target word-count bucket by a wide margin, often defaulting to a comfortable length rather than the specified constraint. This is especially common at extreme compression levels (very short or very long targets). Guardrail: Add a post-generation word-count validator that rejects outputs outside a tolerance band (e.g., ±10%). Include a retry prompt that explicitly states the actual vs. target word count and asks for adjustment. For high-stakes pipelines, use a secondary count-enforcement pass.
Key-Point Omission Under Aggressive Compression
What to watch: At low word-count targets, the model drops critical facts, entities, or conclusions to hit the length constraint. The summary becomes fluent but factually hollow, missing the information that made the source worth summarizing. Guardrail: Define a minimum set of required key points or entities that must survive compression. Use an LLM-as-judge eval that checks for the presence of each required element. If any are missing, reject and retry with explicit preservation instructions.
Hallucinated Details in Expanded Summaries
What to watch: At high word-count targets, the model pads the summary with plausible-sounding but fabricated details, examples, or context not present in the source. The output reads well but introduces false information. Guardrail: Run a fact-consistency check that extracts every claim from the summary and verifies it against the source text. Flag unsupported claims for human review or automatic removal. Include an explicit instruction: 'Do not add information not present in the source.'
Information Density Collapse in Mid-Range Buckets
What to watch: Medium-length summaries (e.g., 150-300 words) sometimes become verbose restatements of the title or first paragraph without capturing the full argument structure. The word count is met, but information density is low. Guardrail: Measure information density as the ratio of unique facts to total words. Set a minimum density threshold for each bucket. If density is too low, retry with an instruction to 'maximize unique information per sentence' or 'cover all major sections of the source.'
Bucket Boundary Gaming
What to watch: The model learns to hit the word-count target by adding filler phrases, redundant qualifiers, or repetitive conclusions rather than genuine content expansion. This is especially common when the source material is thin relative to the requested bucket size. Guardrail: Add a filler-word detection step that flags common padding phrases ('it is important to note that,' 'in conclusion,' 'as previously mentioned'). If filler ratio exceeds a threshold, reject and retry with an anti-padding instruction. Consider capping the bucket size relative to source length.
Source-Order Bias and Recency Weighting
What to watch: The model overweights information from the beginning and end of the source text while ignoring middle sections. This produces summaries that misrepresent the full document structure, especially for long-form content with arguments that build across sections. Guardrail: Chunk the source into sections and require the summary to reference each section proportionally. Use a coverage eval that checks whether each major section of the source is represented in the summary. If coverage is uneven, retry with explicit section-balancing instructions.
Evaluation Rubric
Use this rubric to test the quality of structured summaries before shipping. Each criterion targets a specific failure mode in word-count-bucketed summarization.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Word Count Compliance | Summary word count is within ±10% of the target bucket for each requested compression level. | Output exceeds or falls short of the tolerance band; word count is ignored in favor of fluency. | Automated word-count check against [WORD_COUNT_BUCKET] parameter; flag if deviation > 10%. |
Key Point Preservation | All [REQUIRED_KEY_POINTS] are present in the summary with no material omissions. | A required key point is missing, inverted, or reduced to a vague phrase that loses the original meaning. | LLM-as-judge pairwise check: does the summary contain the claim from each key point? Human spot-check on 20 samples. |
Fact Consistency with Source | No claim in the summary contradicts [SOURCE_TEXT]; invented details are absent. | The summary introduces a date, name, statistic, or causal claim not present in the source. | Automated NLI model check: entailment score per sentence against source; flag contradictions below 0.9 confidence. |
Information Density | Summary contains no filler phrases, meta-commentary, or repeated information across buckets. | Output includes phrases like 'This summary covers...' or repeats the same fact in multiple sentences. | Heuristic check for banned phrases; compression ratio test: unique information units ÷ total words must stay above 0.6. |
Bucket Independence | Each word-count bucket produces a distinct summary, not a truncated version of a longer one. | The 50-word summary reads like the first 50 words of the 200-word summary. | Cosine similarity between bucket embeddings must be below 0.85; human review for structural differences. |
Schema Compliance | Output matches the [OUTPUT_SCHEMA] exactly: correct keys, types, and no extra fields. | Missing required field, wrong type (string instead of array), or extra undocumented keys present. | JSON Schema validator run against output; reject on any validation error. |
Citation Format | If [INCLUDE_CITATIONS] is true, every factual claim has a source reference in the specified format. | A statistic or named entity appears without a citation marker, or citation format does not match [CITATION_STYLE]. | Regex pattern match for citation markers; count claims without adjacent citations; human audit on 10 samples. |
Abstention on Missing Information | When [SOURCE_TEXT] lacks information to fulfill a key point, the summary states the gap explicitly. | The model hallucinates an answer for a missing key point or silently omits it without noting the gap. | Adversarial test: provide source missing one key point; check output for explicit gap statement or hallucination. |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Use the base prompt with a single word-count target and minimal validation. Replace [WORD_COUNT_BUCKETS] with one bucket like "short": "50-75 words". Skip schema enforcement and eval harness wiring. Focus on testing whether the model preserves key points at different compression levels before investing in production infrastructure.
Watch for
- Word-count drift: models often overshoot short buckets and undershoot long ones
- Key-point omission: summaries that hit the word target but drop critical facts
- Fact distortion: compression that changes meaning rather than condensing it
- No baseline comparison: run the same source through all buckets to verify proportional compression

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us