This prompt is designed for technical writers and engineering leads who need to convert raw pull request descriptions into polished, user-facing release notes. The core job is to translate developer-centric technical prose into structured summaries that categorize changes by impact, link to relevant issues, and distinguish breaking changes from additive features. You should use this prompt when you have a completed, merged PR with a non-trivial description and need a consistent, review-ready release note entry that can be published in a changelog or release announcement.
Prompt
PR Description to Release Note Extraction Prompt Template

When to Use This Prompt
Define the job, ideal user, required inputs, and constraints for extracting release notes from PR descriptions.
The ideal workflow assumes you have access to the full PR body, the PR title, linked issue references, and merge metadata such as the target branch and associated milestone. The prompt works best when the PR description follows a template that includes a motivation section, a description of changes, and a testing plan. Do not use this prompt for PRs that are still in draft, contain only trivial changes like typo fixes, or lack sufficient context to determine user impact. It is also not a replacement for a full changelog aggregation pipeline; it produces one entry at a time and should be paired with deduplication and categorization logic when processing multiple PRs for a single release.
Before integrating this prompt into a production pipeline, define your output schema and evaluation criteria. The prompt should produce a structured object with fields for the change category, a user-facing summary, any migration or upgrade notes, and linked issues. High-risk workflows—such as release notes for security patches or database migrations—require human review of the extracted entry before publication. Validate that the output correctly classifies breaking changes, does not omit referenced issues, and preserves the intended tone for your audience. Start by running the prompt against a golden set of PRs with known-good release notes to calibrate your eval thresholds.
Use Case Fit
Where this prompt works and where it does not. Use these cards to decide if the PR Description to Release Note Extraction template fits your workflow before you integrate it into a pipeline.
Good Fit: Structured PR Templates
Use when: your team uses standardized PR description templates with clear sections for summary, motivation, breaking changes, and linked issues. Guardrail: The prompt relies on predictable structure. If PRs are freeform, add a pre-processing step to extract key sections before running extraction.
Bad Fit: Commit-Level Granularity
Avoid when: you need per-commit release notes rather than per-PR summaries. This prompt expects the squashed or merged PR description as input. Guardrail: For commit-level extraction, use the Commit History to Structured Changelog template instead. Do not feed raw commit logs into this prompt.
Required Inputs
What you must provide: a complete PR description body, the PR merge status, linked issue references, and the target release version. Guardrail: Missing merge metadata causes the prompt to hallucinate release readiness. Validate that the PR is actually merged before passing it to the prompt, and include the merge commit SHA for traceability.
Operational Risk: Silent Hallucination of Impact
What to watch: the model may classify a routine dependency bump as a breaking change or invent migration steps that do not exist in the PR. Guardrail: Always diff the extracted release note against the original PR description. Flag any impact classification or migration guidance that does not have a direct counterpart in the source text for human review.
Operational Risk: Missing Cross-References
What to watch: the prompt may drop linked issues, related PRs, or contributor mentions that are present in the PR metadata but not in the description body. Guardrail: Post-process the output by reconciling extracted issue references against the PR's actual linked issues. Append any missing references before publishing the release note.
Pipeline Integration Point
Use when: this prompt runs as part of a release automation pipeline triggered by PR merge events. Guardrail: Do not publish the output directly. Route extracted release notes to a review queue where a technical writer or release manager approves, edits, or rejects each entry before it reaches the public changelog.
Copy-Ready Prompt Template
A reusable prompt template that extracts structured, user-facing release notes from pull request descriptions, with placeholders for input, output schema, constraints, and examples.
This prompt template is designed to be copied directly into your AI harness, whether you're using an API call, a prompt management platform, or a local evaluation runner. It takes a raw pull request description as its primary input and produces a structured release note entry suitable for publication in a changelog or release announcement. The template uses square-bracket placeholders for all dynamic components—input text, output format requirements, behavioral constraints, and few-shot examples—so you can adapt it without rewriting the core instruction logic.
textYou are a technical writer converting pull request descriptions into structured, user-facing release notes. ## INPUT [PR_DESCRIPTION] ## OUTPUT SCHEMA Return a JSON object with the following fields: - "summary": A one-sentence summary of the change for end users. - "impact": One of "breaking", "feature", "fix", "improvement", "deprecation", or "security". - "affected_components": An array of strings naming the services, APIs, or modules affected. - "migration_notes": A string with migration steps if the change is breaking or deprecating; otherwise null. - "linked_issues": An array of issue or ticket references found in the description. - "contributors": An array of contributor names or handles extracted from the description. - "confidence": One of "high", "medium", or "low" indicating how clearly the description maps to the output. ## CONSTRAINTS [CONSTRAINTS] ## EXAMPLES [EXAMPLES] ## INSTRUCTIONS 1. Classify the change impact based on the description's language, not the PR title alone. 2. If the description mentions breaking changes, deprecations, or migration steps, set "impact" accordingly and populate "migration_notes". 3. Extract all referenced issue numbers, ticket IDs, or links into "linked_issues". 4. Extract contributor names from "Co-authored-by" lines, @mentions, or explicit credit sections. 5. If the description is vague, contradictory, or missing key details, set "confidence" to "low" and note what's missing in a "review_notes" field. 6. Do not invent details not present in the PR description.
To adapt this template for your workflow, replace each placeholder with concrete values. For [PR_DESCRIPTION], inject the raw markdown or plain text of the pull request body. For [CONSTRAINTS], add domain-specific rules such as character limits, forbidden terms, or required regulatory language. For [EXAMPLES], provide 2–4 few-shot demonstrations showing a PR description paired with the expected JSON output. This is especially important for calibrating the impact classification and confidence scoring to match your team's conventions. If your release process requires additional fields—such as release_version, backport_targets, or QA_signoff—extend the output schema rather than relying on the model to infer them. Always validate the output against your schema before publishing, and route low-confidence results for human review.
Prompt Variables
Inputs required for the PR Description to Release Note Extraction prompt. Each placeholder must be populated before the prompt is assembled and sent. Validate inputs at the application layer before injection to prevent prompt injection and ensure output quality.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[PR_DESCRIPTION] | The raw markdown or plain text body of the pull request description. This is the primary source material for extraction. | Fixes #4521: Adds rate limiting to the /api/v2/users endpoint. Includes a new Redis-backed counter and configurable thresholds via RATE_LIMIT_MAX env var. | Check: string length > 0. Sanitize: strip HTML tags. Risk: if empty, prompt must return an empty release note set rather than hallucinating. |
[PR_TITLE] | The title of the pull request, used as a fallback for the release note headline if the description lacks a clear summary. | feat(api): add user endpoint rate limiting | Check: string length > 0. Must not contain WIP or DO NOT MERGE prefixes. If null, set to empty string and rely on [PR_DESCRIPTION] extraction. |
[PR_MERGE_COMMIT_SHA] | The full or short SHA of the merge commit. Used to generate a permalink to the change and for traceability in the output. | a1b2c3d4 | Check: matches regex ^[a-f0-9]{7,40}$. Required: true. If missing, the output must not fabricate a link. |
[REPOSITORY_NAME] | The full name of the repository, used to construct the permalink URL in the release note. | org-name/repo-name | Check: matches regex ^[\w.-]+/[\w.-]+$. Required: true. Must be validated against a known list to prevent link injection. |
[TARGET_AUDIENCE] | Specifies whether the release note is for developers, end-users, or internal stakeholders. Controls the tone and technical depth of the output. | developers | Check: must be one of enum ['developers', 'end-users', 'internal']. Default: 'developers'. If invalid, reject the request. |
[OUTPUT_FORMAT] | Defines the desired output structure, such as a markdown list, a JSON object, or a specific changelog schema. | json | Check: must be one of enum ['json', 'markdown']. Default: 'json'. The application parser must match this format. |
[KNOWN_ISSUE_LABELS] | A list of label strings that, if present on the PR, should classify the change as a known issue rather than a standard feature or fix. | ["known-issue", "wontfix-prod"] | Check: must be a valid JSON array of strings. If null or empty, no special classification is applied. Used for impact categorization logic. |
Implementation Harness Notes
How to wire the PR-to-release-note prompt into a CI/CD pipeline or documentation workflow with validation, retries, and human review.
This prompt is designed to run as a post-merge step in a CI/CD pipeline or as part of a release management bot. The primary input is the raw PR description body, which you should extract from your source control API (GitHub, GitLab, Bitbucket) along with merge metadata: PR number, author, merged timestamp, target branch, and associated issue references. Do not pass the entire PR object—strip it down to the description text and a structured [CONTEXT] block containing the metadata fields the prompt expects. This keeps the prompt focused and reduces token waste.
Wire the prompt into an application harness that handles the full lifecycle. First, validate the input: ensure the PR description is non-empty and meets a minimum length threshold (e.g., 50 characters) before calling the model. After receiving the model's JSON output, run a schema validator against your expected [OUTPUT_SCHEMA] to catch missing required fields, malformed enums (like impact values outside the allowed set), or empty release note summaries. If validation fails, implement a single retry with the validation error message appended to the prompt as additional [CONSTRAINTS]—do not retry more than once without human intervention. Log every prompt version, input hash, raw output, and validation result for auditability. For high-severity releases or regulated environments, route the extracted release note to a human review queue before publication, and include the PR link and diff in the review payload so the reviewer can verify accuracy against the actual code change.
Choose a model with strong JSON mode and instruction-following capabilities. This prompt benefits from low temperature settings (0.1–0.3) to produce consistent, deterministic output. If your release notes require cross-referencing with an internal knowledge base—for example, to link to existing migration guides or known issue trackers—add a retrieval step before the prompt call and inject the retrieved context into the [CONTEXT] block. Do not use this prompt for PRs labeled no-release-note or internal-only; filter those out in the harness before invocation. The most common production failure mode is the model summarizing implementation details instead of user-facing impact—mitigate this by including a strong negative example in [EXAMPLES] showing an implementation-heavy summary being rejected.
Expected Output Contract
Validate the shape and content of the extracted release note object before it enters the changelog pipeline. Each field maps to a specific extraction target from the PR description.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
release_note_title | string | Must be 5-120 characters. Must not contain the PR title verbatim. Must start with a capitalized verb or noun phrase. | |
impact_category | enum: breaking_change, feature, fix, maintenance, security, deprecation, known_issue, dependency | Must match exactly one allowed enum value. Validate against PR labels and merge commit message for consistency. | |
user_facing_summary | string | Must be 1-3 sentences. Must not include implementation details, internal class names, or file paths. Must be understandable by a non-engineering stakeholder. | |
migration_notes | string or null | Required when impact_category is breaking_change or deprecation. Must contain before/after code comparison or explicit step-by-step migration instructions. Null allowed for non-breaking categories. | |
linked_issues | array of strings | Each string must match the regex pattern for the issue tracker (e.g., #\d+ or PROJ-\d+). Array must contain at least one entry. Validate each reference resolves to an open or closed issue in the tracker. | |
contributors | array of strings | Each string must be a valid GitHub username or email. Deduplicate across multiple commit authors. Array must contain at least one entry matching the PR author. | |
breaking_change_details | object or null | Required when impact_category is breaking_change. Must contain fields: affected_surface (string), before_behavior (string), after_behavior (string), and remediation (string). Null allowed otherwise. | |
confidence_score | number between 0.0 and 1.0 | Model-assigned confidence in extraction accuracy. If below 0.7, flag for human review. Must be a float with one decimal place precision. |
Common Failure Modes
When extracting release notes from PR descriptions, these are the most common failure patterns that degrade output quality before you even get to evaluation.
Developer Shorthand Leaks Into User-Facing Copy
What to watch: PR descriptions often contain internal jargon, commit hash references, Slack channel names, and implementation details like 'refactored the caching layer' that mean nothing to end users. The model reproduces these verbatim instead of translating to user impact. Guardrail: Add a constraint requiring all output to pass a 'would a customer understand this?' test. Include a post-processing check that flags internal references, code symbols, and team-specific acronyms for human review before publication.
Breaking Changes Buried in Minor Notes
What to watch: PR authors sometimes mention breaking changes in passing or use soft language like 'updated behavior' or 'changed default' without calling out the migration impact. The model fails to escalate these to the breaking changes section. Guardrail: Include explicit detection rules for breaking change signals—API signature changes, removed parameters, altered defaults, dropped support, schema migrations. Require the model to flag any detected breaking change with a **BREAKING:** prefix and surface it in a dedicated section regardless of how the PR author phrased it.
Missing Issue and PR Cross-References
What to watch: The model generates release notes that mention fixes or features without linking back to the original issue tracker references present in the PR description. This breaks traceability for users who need to understand the full context. Guardrail: Require the output schema to include a references field that extracts all issue IDs, PR numbers, and discussion links from the source. Add a validation step that checks every generated entry against the source PR metadata for missing links.
Impact Classification Drift
What to watch: The model inconsistently classifies changes—a database migration might be labeled 'patch' in one entry and 'minor' in another, or a new endpoint gets classified as 'internal' when it's user-facing. Without consistent taxonomy, downstream consumers can't trust the categorization. Guardrail: Provide a strict classification schema with decision rules: breaking API change → major, new user-facing feature → minor, bug fix with no surface change → patch, internal refactor with no behavior change → skip. Include few-shot examples of each classification boundary.
Multi-PR Feature Fragmentation
What to watch: A single user-facing feature spans multiple PRs, each with its own description. The model treats each PR as an independent release note entry, producing fragmented and repetitive output instead of coalescing related changes. Guardrail: When processing multiple PRs for a release, include a deduplication and grouping step. Use the PR labels, milestone, or epic references to cluster related PRs. Generate one consolidated entry per feature with aggregated references rather than one entry per PR.
Silent Omission of Non-Functional Changes
What to watch: Performance improvements, dependency upgrades, security patches, and infrastructure changes are often described tersely in PRs and the model skips them entirely, treating them as 'not user-facing.' But users and operators need to know about latency changes, CVE fixes, and version bumps. Guardrail: Add explicit categories for performance, security, dependencies, and infrastructure in the output schema. Require the model to produce an entry for every PR, even if the user-facing impact is minimal—use a 'maintenance' category with a brief note rather than silent omission.
Evaluation Rubric
Use this rubric to test the quality of extracted release notes before shipping them to users. Each criterion targets a specific failure mode common in PR-to-release-note extraction.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Impact Classification Accuracy | The output correctly classifies the change as 'breaking', 'feature', 'fix', 'deprecation', or 'security' based on the PR description and linked issue metadata. | A PR labeled 'breaking' in metadata is classified as 'feature'. A security fix is classified as a general 'fix'. | Run a golden set of 20 PRs with known classifications. Assert exact match on category. Flag any mismatch for human review. |
User-Facing Language | The release note describes the change from the user's perspective, not the implementation detail. No internal function names, file paths, or commit SHAs appear in the final note. | The note says 'Fixed a race condition in the connection pool' instead of 'Refactored mutex locking in pool.go'. | Regex scan for file extensions, code symbols, and commit SHAs. Manual spot-check 10% of outputs for implementation leakage. |
Migration Note Presence | Every breaking change or deprecation entry includes a concrete migration step or replacement guidance. The migration note is not empty or a generic placeholder. | A deprecation entry says 'Use the /v2/orders endpoint instead' with a link. A breaking change entry has no migration guidance. | Assert that every entry with category 'breaking' or 'deprecation' has a non-empty [MIGRATION_NOTES] field with at least 50 characters and a URL or code snippet. |
Issue Reference Integrity | All issue references in the output match the PR's linked issues. No fabricated or hallucinated issue numbers are present. | The PR links to issue #4521. The release note references issue #4520 or a non-existent issue. | Parse all issue references from the output. Cross-reference against the PR's linked issues from the merge metadata. Flag any reference not present in the source. |
Contributor Attribution | The release note credits the correct contributor(s) from the PR metadata. Co-authors are included when present. | A PR authored by 'jane-doe' with co-author 'dev-bot' credits only 'jane-doe'. | Extract the contributor list from the output. Compare against the PR's author and co-author metadata. Assert set equality. |
Breaking Change Detection | The output identifies a breaking change when the PR description contains explicit breaking change language, a 'BREAKING CHANGE' footer, or a breaking change label. | A PR with 'BREAKING CHANGE: drops support for Node 16' in the body is classified as a 'feature'. | Scan PR descriptions for breaking change signals. Assert that every PR with a breaking change signal produces a 'breaking' category entry. Measure recall on a labeled dataset. |
Empty or Vague Output | The release note contains substantive, specific information. It does not output generic phrases like 'Various bug fixes' or 'General improvements' unless the PR description itself contains no specifics. | A PR with a detailed description of a memory leak fix produces 'Fixed a memory leak in the image processing pipeline' instead of 'Performance improvements'. | Check character length and entropy. Flag any output under 100 characters or matching a blocklist of vague phrases. Escalate for manual rewrite. |
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\nUse the base prompt with a single PR description and a simple markdown output schema. Skip strict JSON validation and focus on getting the extraction logic right. Test with 5-10 PRs of varying complexity.\n\n```markdown\n## Release Note\n[EXTRACTED_SUMMARY]\n\n**Impact:** [BREAKING|FEATURE|FIX|DEPENDENCY]\n**Migration Required:** [YES|NO]\n```\n\n### Watch for\n- Overly broad impact classification (everything marked as FEATURE)\n- Missing migration notes when PR description mentions breaking changes\n- Issue references not being carried into the release note\n- Summary length drifting from one sentence to full paragraphs

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