This prompt is designed for content syndication developers and platform engineers who need to generate valid RSS 2.0 or Atom 1.0 feeds from source material that may be structured (database records, API responses) or unstructured (blog posts, release notes, meeting summaries). The core job-to-be-done is transforming a collection of content items into a standards-compliant XML feed that passes validation against the W3C Feed Validator and renders correctly in common feed readers. The ideal user is someone who already understands the difference between RSS and Atom, knows their target consumer requirements, and needs a reliable, schema-first generation path rather than a tutorial on syndication formats.
Prompt
RSS and Atom Feed Generation Prompt Template

When to Use This Prompt
Define the job, reader, and constraints for generating syndication feeds from structured or unstructured content sources.
Use this prompt when you have a batch of content items with at least a title, publication date, and unique identifier for each entry. The prompt works best when you provide a clear [OUTPUT_SCHEMA] that specifies the feed format (RSS 2.0 or Atom 1.0), required channel metadata (title, link, description, language), and per-item fields (title, link, guid/id, pubDate/updated, description/summary). Include [CONSTRAINTS] for date format requirements (RFC 822 for RSS, RFC 3339 for Atom), GUID permanence rules, enclosure MIME type validation, and any feed reader compatibility targets. The prompt template includes placeholders for [EXAMPLES] of correct feed entries, which is critical for teaching the model the exact XML structure, namespace declarations, and escaping behavior you expect.
Do not use this prompt when you need real-time feed generation from streaming data, when feed items require complex digital signatures or encryption, or when the source content contains untrusted HTML that must be sanitized before inclusion in description elements. This prompt is also insufficient for generating podcast-specific RSS extensions (iTunes namespace, Google Play namespace) without explicit examples in the [EXAMPLES] block. For high-risk syndication pipelines where feed validity directly impacts content distribution revenue, always pair this prompt with a post-generation validation harness that runs the output through a feed validator, checks for broken links, and verifies date ordering before publishing. Human review is required when feeds include legal disclaimers, copyright assertions, or content that must comply with platform-specific terms of service.
Use Case Fit
Where the RSS and Atom Feed Generation Prompt Template works, where it fails, and the operational prerequisites for production use.
Good Fit: Syndication Pipelines
Use when: You need to generate valid RSS 2.0 or Atom 1.0 XML from structured content records (title, link, description, pubDate, GUID). Guardrail: Provide a strict XML schema or DTD reference in the prompt and validate output with a feed validator before publishing.
Bad Fit: Unstructured Content Ingestion
Avoid when: The input is raw HTML, free-text articles, or scraped content without extracted metadata. The model will hallucinate dates, GUIDs, and author fields. Guardrail: Extract and normalize all required feed fields upstream before calling the generation prompt.
Required Inputs
What you must provide: A list of content items with at minimum title, link, and description or content. For RSS, pubDate in RFC 822 format. For Atom, updated in RFC 3339. Guardrail: Validate date formats and URI schemes before passing them to the prompt to prevent malformed feed elements.
Operational Risk: Reader Compatibility
What to watch: Generated feeds may parse correctly but fail silently in common feed readers (Feedly, NetNewsWire, podcast apps) due to missing recommended elements like itunes:summary or media:content. Guardrail: Test output against at least three major feed readers and the W3C Feed Validator before production deployment.
Operational Risk: GUID Collisions
What to watch: The model may generate non-unique or non-permanent GUIDs when not given explicit GUID values, breaking feed reader deduplication. Guardrail: Always provide a deterministic GUID per item (e.g., tag:domain.com,2024:post-123) and instruct the model to use it verbatim without modification.
Operational Risk: Encoding and Escaping
What to watch: Content containing HTML markup, ampersands, or non-ASCII characters can produce invalid XML if not properly CDATA-wrapped or entity-escaped. Guardrail: Pre-process content to wrap HTML bodies in <![CDATA[...]]> sections or entity-encode special characters before passing to the prompt.
Copy-Ready Prompt Template
A reusable prompt with square-bracket placeholders for generating RSS 2.0 or Atom 1.0 feeds from structured or unstructured content.
This prompt template is designed to produce a complete, standards-compliant RSS 2.0 or Atom 1.0 feed document. It accepts a list of content items, feed-level metadata, and a target format specification. The template enforces strict XML structure, correct date formatting (RFC 822 for RSS, RFC 3339 for Atom), proper GUID handling, and valid enclosure elements. Use this as the core instruction block in your feed generation pipeline, replacing the square-bracket placeholders with your application's data before sending the request to the model.
textYou are a precise XML feed generator. Your task is to produce a single, complete, and valid [FEED_FORMAT] feed document based on the provided inputs. The output must be nothing but the XML document itself, starting with the XML declaration and the root feed element. # INPUT DATA ## Feed Metadata - Title: [FEED_TITLE] - Link: [FEED_LINK] - Description: [FEED_DESCRIPTION] - Language: [FEED_LANGUAGE] - Last Build Date (for RSS): [LAST_BUILD_DATE] - Updated Date (for Atom): [UPDATED_DATE] - Generator: [GENERATOR_STRING] ## Content Items [ITEMS_ARRAY] # OUTPUT CONSTRAINTS 1. **Format**: Generate a valid [FEED_FORMAT] document. If RSS 2.0, use `<rss version="2.0">` as the root. If Atom 1.0, use `<feed xmlns="http://www.w3.org/2005/Atom">` as the root. 2. **Dates**: For RSS, all dates must be in RFC 822 format (e.g., `Mon, 01 Jan 2024 12:00:00 GMT`). For Atom, all dates must be in RFC 3339 format (e.g., `2024-01-01T12:00:00Z`). 3. **GUIDs**: For RSS, each `<guid>` must have an `isPermaLink` attribute set to `true` or `false`. If the GUID is a URL, use `true`; otherwise, use `false` and ensure the value is a unique string. 4. **Enclosures**: For any item with an enclosure, include a valid `<enclosure>` element with `url`, `length`, and `type` attributes. The `length` must be a positive integer representing bytes. 5. **Escaping**: Properly escape all XML special characters (`&`, `<`, `>`, `"`, `'`) in text content. Use CDATA sections only when explicitly requested for a specific field. 6. **Encoding**: The XML declaration must specify `encoding="UTF-8"`. 7. **Completeness**: Include all provided items. Do not truncate or summarize the feed content. 8. **Output Only**: Do not include any explanatory text, markdown fences, or conversational preamble. The response must start with `<?xml` and end with the closing root tag. # EXAMPLES [FEW_SHOT_EXAMPLES] # RISK LEVEL [RISK_LEVEL]
Adaptation Guidance: The [ITEMS_ARRAY] placeholder should be replaced with a serialized representation of your content items, each containing fields like title, link, description, pubDate, guid, and optional enclosure details. The [FEW_SHOT_EXAMPLES] placeholder is critical for format adherence; provide at least one complete, valid feed example matching your target format. For high-stakes publishing pipelines, set [RISK_LEVEL] to HIGH and ensure downstream validation with a feed validator like the W3C Feed Validation Service before distribution. If your items contain HTML in the description field, add an explicit instruction to wrap that content in a CDATA section to prevent parser errors.
Prompt Variables
Required inputs for the RSS and Atom feed generation prompt. Each placeholder must be populated before the prompt is sent to the model. Validation notes describe how to programmatically verify the input before execution.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[FEED_TYPE] | Specifies whether to generate RSS 2.0 or Atom 1.0 XML | rss | Must be exactly 'rss' or 'atom'. Reject any other value before prompt assembly. |
[CHANNEL_TITLE] | The title of the feed channel | Inference Systems Blog | Required non-empty string. Max 255 characters. No HTML tags allowed. |
[CHANNEL_LINK] | The canonical URL of the website the feed represents | Must be a valid absolute URL with http or https scheme. Parse with URL constructor before use. | |
[CHANNEL_DESCRIPTION] | A short description of the feed content | Practical prompt engineering for production AI systems. | Required non-empty string. Max 500 characters. Should not contain unescaped HTML. |
[ENTRIES] | Array of feed entry objects with title, link, guid, pubDate, and optional description, author, enclosure fields | [{"title": "Prompt Playbooks Launch", "link": "https://...", "guid": "https://...", "pubDate": "2025-01-15T10:00:00Z"}] | Must be a valid JSON array with 1-100 entries. Each entry requires title, link, and pubDate. Validate array length and required field presence before prompt assembly. |
[LANGUAGE] | RFC 5646 language tag for the feed | en-US | Optional. If provided, must match regex ^[a-z]{2,3}(-[A-Z]{2,3})?$. Default to 'en-US' if null. |
[LAST_BUILD_DATE] | ISO 8601 timestamp of the last feed build | 2025-01-15T14:30:00Z | Optional. If provided, must parse as valid ISO 8601 UTC datetime. Use Date.parse() or equivalent. Null allowed. |
[ENCLOSURE_SUPPORT] | Whether to include media enclosure elements in entries | Must be boolean true or false. Controls whether enclosure fields in [ENTRIES] are rendered. Default false if null. |
Implementation Harness Notes
How to wire the RSS and Atom feed generation prompt into a reliable application workflow.
Integrating an LLM-based feed generator into a production system requires treating the prompt as a deterministic function with strict input validation, output verification, and a clear retry/fallback path. The prompt template expects structured inputs—a list of articles with titles, URLs, dates, and optional content—and produces a complete XML document. Before calling the model, your application layer must sanitize all user-provided text fields to prevent prompt injection, validate that required fields (title, link, pubDate/updated) are present and non-null, and format all datetime objects into the RFC 822 (RSS) or RFC 3339 (Atom) strings the prompt demands. Missing or malformed dates are the most common cause of feed validator failures, so pre-formatting them in code rather than relying on the model to interpret arbitrary date strings is essential.
The model call itself should be wrapped in a harness that enforces a strict output contract. Configure your API request with response_format set to a JSON Schema object containing a single feed_xml string property, or use a constrained text completion with stop sequences that prevent the model from generating explanatory text before or after the XML declaration. On receiving the response, run a multi-stage validation pipeline: first, parse the string with a strict XML parser (reject on any parse error); second, validate against the RSS 2.0 or Atom 1.0 schema using a library like feedparser or a dedicated XML Schema validator; third, check feed-reader compatibility rules such as GUID uniqueness, enclosure URL accessibility, and the presence of at least one <title> and <link> element in the channel/feed header. If any stage fails, log the raw output and the specific validation error, then retry once with the same prompt plus the validation error message appended as a correction instruction. If the retry also fails, fall back to a template-based feed generator built in application code—never ship a broken feed to subscribers.
For high-volume or user-facing systems, add observability hooks around every generation call. Log the input article count, the model used, the token consumption, the validation pass/fail status, and the latency of each pipeline stage. Set up alerts on validation failure rate spikes, which often indicate prompt drift or upstream data quality issues. If your feed includes user-generated content, implement a human review queue for first-time publishers or content flagged by automated safety classifiers before the feed XML is cached and served. Finally, cache successfully generated feeds at the HTTP level with ETag and Last-Modified headers based on the newest article's publication date, and regenerate only when new articles are added—this keeps costs predictable and response times fast while ensuring subscribers always receive valid, standards-compliant XML.
Expected Output Contract
Defines the required fields, types, and validation rules for the generated RSS 2.0 or Atom 1.0 feed. Use this contract to build a post-generation validator before the feed is served to readers or aggregators.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
Feed format declaration | XML processing instruction or root element | Parse check: root must be <rss version="2.0"> or <feed xmlns="http://www.w3.org/2005/Atom"> | |
Channel or feed title | String (plain text or CDATA) | Schema check: element must be present and non-empty; length <= [MAX_TITLE_LENGTH] characters | |
Channel or feed link | Valid absolute URL | Parse check: must pass URL constructor; scheme must be http or https | |
Channel or feed description / subtitle | String (plain text or CDATA) | Schema check: element must be present and non-empty; length <= [MAX_DESCRIPTION_LENGTH] characters | |
Item or entry pubDate / updated | RFC 822 (RSS) or RFC 3339 (Atom) datetime string | Parse check: must parse with Date.parse() or equivalent; must not be a future date beyond [ALLOWED_FUTURE_TOLERANCE_MINUTES] minutes | |
Item or entry guid / id | String (RSS) or valid IRI (Atom) | Schema check: must be present, non-empty, and unique across all items/entries in the feed | |
Item or entry title | String (plain text or CDATA) | Schema check: element must be present and non-empty; length <= [MAX_TITLE_LENGTH] characters | |
Enclosure / link with rel="enclosure" | Object with url, length, type attributes | Parse check: if present, url must be valid absolute URL; length must be a positive integer; type must be a valid MIME type string |
Common Failure Modes
RSS and Atom feed generation fails in predictable ways. These are the most common production issues and how to prevent them before your feed breaks readers, validators, or downstream aggregators.
Invalid RFC 822 / RFC 3339 Date Formats
What to watch: Models frequently produce dates like 2024-01-15 or Jan 15, 2024 instead of the required Mon, 15 Jan 2024 10:30:00 GMT (RSS) or 2024-01-15T10:30:00Z (Atom). Feed readers silently reject items with malformed dates. Guardrail: Provide an explicit date format example in the prompt and validate all <pubDate> and <updated> fields against a regex or date parser before serving the feed.
Non-Unique or Missing GUID / ID Elements
What to watch: Models may duplicate GUIDs across items, omit the isPermaLink attribute in RSS, or generate non-URI IDs in Atom. Podcast clients and aggregators use GUIDs for deduplication—duplicates cause skipped episodes. Guardrail: Instruct the model to use the item's canonical URL as the GUID with isPermaLink="true" for RSS, or a full URN/URI for Atom. Post-generate, assert uniqueness across all <guid> or <id> elements.
Unescaped XML Special Characters in Content
What to watch: Item descriptions or titles containing &, <, >, or unicode control characters break XML parsers. Models often forget to wrap HTML content in CDATA sections or escape entities. Guardrail: Require all text content fields to pass through an XML escape function. For RSS <description> with HTML, mandate CDATA wrapping. Validate the full feed against an XML well-formedness checker before serving.
Missing or Invalid Enclosure Attributes
What to watch: For podcast feeds, models may omit required url, length, or type attributes on <enclosure>, or provide a length of 0. Podcast directories like Apple Podcasts reject items with broken enclosures. Guardrail: Explicitly require all three enclosure attributes in the prompt. Validate that length is a positive integer, type matches a known MIME type, and url returns a 200 status on HEAD request.
Channel-Level Metadata Drift Across Items
What to watch: The model may produce inconsistent <language>, <copyright>, or <category> values between the channel header and individual items, or omit required channel elements like <title>, <link>, and <description>. Guardrail: Define channel-level metadata as explicit variables in the prompt template. Validate that required RSS 2.0 channel elements are present and that item-level overrides don't contradict channel defaults.
Atom Namespace Declaration Omission
What to watch: When generating Atom feeds, models often forget the required xmlns="http://www.w3.org/2005/Atom" namespace on the root <feed> element. Without it, Atom readers parse the feed as generic XML and fail to recognize entries. Guardrail: Include the Atom namespace declaration as a non-negotiable part of the prompt template. Validate that the root element contains the correct default namespace before any other checks.
Evaluation Rubric
Criteria for testing RSS 2.0 and Atom 1.0 feed output quality before shipping to production. Use these checks in automated eval suites or manual QA gates.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
XML Well-Formedness | Feed parses without errors in a standard XML parser | Parser throws fatal error or reports unclosed tags | Parse output with lxml or equivalent; assert zero parse errors |
Feed Standard Schema Validity | Feed validates against RSS 2.0 or Atom 1.0 XSD/RELAX NG schema | Schema validator reports missing required elements or invalid child elements | Run feed through W3C Feed Validator or local schema validator; assert zero errors |
Date Format Compliance | All date fields conform to RFC 822 (RSS) or RFC 3339 (Atom) | Date strings fail to parse with standard datetime libraries | Parse every date field with dateutil.parser or equivalent; assert no parse exceptions |
GUID Uniqueness and Permanence | Every item has a unique GUID; GUIDs are stable across feed regenerations | Duplicate GUIDs detected or GUID changes when item content is unchanged | Extract all GUIDs; assert set length equals item count; regenerate feed and compare GUIDs |
Enclosure Element Correctness | Enclosure elements have valid url, length, and type attributes; length matches actual file size | Missing type attribute, length is zero or negative, or URL returns 404 | HEAD request each enclosure URL; assert 200 status; assert Content-Length matches enclosure length attribute |
Character Encoding and Entity Escaping | Feed declares correct encoding; reserved XML characters are escaped; no mojibake | Encoding declaration mismatches actual byte sequence; unescaped ampersands in text content | Decode feed with declared encoding; assert no UnicodeDecodeError; grep for raw & not followed by entity pattern |
Required Channel/Feed Metadata Completeness | RSS channel has title, link, description; Atom feed has id, title, updated | Missing required element causes reader to reject feed or display blank metadata | XPath check for required elements; assert all required elements present and non-empty |
Reader Compatibility Smoke Test | Feed renders correctly in at least three common feed readers | Reader shows raw XML, empty items, or fails to display content | Load feed in Feedly, NetNewsWire, and Miniflux; assert items display with correct titles and links |
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 feed entry and relaxed validation. Replace [FEED_SCHEMA] with a simple inline description instead of a full XSD. Drop the [VALIDATION_RULES] placeholder and rely on manual spot checks.
Watch for
- RFC 822/RFC 3339 date format drift in
pubDateandupdatedfields - Missing GUID
isPermaLinkattribute causing reader deduplication failures - Enclosure length values that don't match actual file sizes

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