Inferensys

Prompt

Stale Content Detection Harness Prompt

A practical prompt playbook for using Stale Content Detection Harness Prompt in production AI workflows.
Operations team reviewing AI workflow automation on laptop, workflow builder visible, casual office setup.
PROMPT PLAYBOOK

When to Use This Prompt

Determine if the Stale Content Detection Harness Prompt fits your production monitoring workflow and understand its operational boundaries.

This prompt is an engineered component for AI quality engineers and platform teams who need to automate content freshness monitoring at scale. It is designed for production systems that run scheduled audits, CI/CD pipelines for knowledge base maintenance, or guardrails that prevent outdated information from reaching end users. The ideal user is someone building a monitoring harness—not someone performing a one-off manual review. You should use this prompt when you have a content item with associated metadata (publication date, last-updated timestamp, document type) and a domain-specific freshness policy that defines acceptable staleness windows. The prompt expects these structured inputs and returns a staleness report with severity levels, recommended actions, and confidence scores that can be consumed by downstream alerting or routing systems.

This is not a prompt for ad-hoc freshness checks, casual content reviews, or workflows where a human is expected to read the output and make a subjective call without further automation. If you need a quick staleness opinion on a single document, a simpler classification prompt will suffice. The harness prompt is overengineered for that use case. It is also not a replacement for a full retrieval pipeline or a real-time data validation system—it evaluates one content item at a time against a declared policy. Do not use this prompt when the freshness policy itself is undefined or when the content lacks reliable date metadata. The prompt's confidence scores degrade sharply when input timestamps are missing, ambiguous, or contradictory, and it will flag this uncertainty rather than guess.

Before integrating this prompt, ensure you have defined your domain-specific freshness thresholds, have a mechanism for extracting or providing publication dates, and have a plan for what happens when the prompt returns a high-severity staleness alert. The output is structured for machine consumption—expect to wire it into alerting systems, dashboard pipelines, or automated content refresh queues. If your workflow requires human review of staleness decisions, build that review step into the harness layer, not into the prompt itself. The prompt is a detection component; the surrounding application owns the escalation path.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Stale Content Detection Harness Prompt works and where it does not. Use these cards to decide if this prompt fits your pipeline before integrating it into CI/CD or scheduled audits.

01

Good Fit: Automated Content Audits

Use when: you have a scheduled job scanning a knowledge base, documentation site, or content corpus for outdated entries. Guardrail: pair the harness output with a ticketing system or refresh queue so flagged content does not sit in a report without action.

02

Bad Fit: Real-Time User-Facing Chat

Avoid when: the prompt is called synchronously in a chat or search flow where latency must stay under 500ms. Guardrail: run staleness detection asynchronously or pre-compute freshness scores. Reserve real-time paths for lightweight temporal classification prompts instead.

03

Required Inputs

What you need: a content item with a publication or retrieval date, a domain context for freshness expectations, and a query or topic to assess temporal relevance against. Guardrail: if publication dates are missing, run the Publication Date Extraction Prompt first and gate staleness detection on successful date extraction.

04

Operational Risk: False Staleness Flags

What to watch: evergreen content or intentionally historical references flagged as stale because the model over-applies recency bias. Guardrail: include a domain-specific freshness window configuration and require the model to output a confidence score. Route low-confidence flags to human review before triggering content updates.

05

Operational Risk: Missed Staleness in Fast Domains

What to watch: financial data, breaking news, or regulatory content that becomes stale within hours but the harness runs on a daily cadence. Guardrail: set the audit frequency based on domain decay rates. For sub-day freshness requirements, combine with the Real-Time Data Freshness Evaluation Prompt and trigger alerts on ingestion delay, not just scheduled scans.

06

Integration Pattern: CI/CD Content Gates

Use when: content updates go through a pull request or deployment pipeline. Guardrail: run the harness as a pre-merge check that blocks deployments if high-severity staleness is detected in the changed content paths. Require a human approval override for intentional historical references.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A production-ready prompt template for detecting stale content, suggesting replacements, and generating structured staleness alerts with severity levels and confidence scores.

This template is the core instruction set for your stale content detection harness. It accepts a content item, a set of freshness rules, and an optional evidence context, then produces a structured staleness report. The prompt is designed to be wired into a CI/CD pipeline, a scheduled audit job, or an on-demand content review workflow. Every square-bracket placeholder must be replaced with your application's data before the prompt is sent to the model. The template enforces a strict JSON output schema so downstream validators can parse the result without ambiguity.

text
You are a content freshness auditor. Your task is to evaluate whether a piece of content is stale, suggest a replacement if it is, and generate an alert with a severity level and confidence score.

## INPUT

**Content to evaluate:**
[CONTENT]

**Content metadata:**
- Publication date: [PUBLICATION_DATE]
- Content type: [CONTENT_TYPE]
- Domain: [DOMAIN]
- Authoritative source: [IS_AUTHORITATIVE_SOURCE]

**Freshness rules:**
[FRESHNESS_RULES]

**Current date:** [CURRENT_DATE]

**Optional evidence context (retrieved passages that may supersede this content):**
[EVIDENCE_CONTEXT]

## OUTPUT SCHEMA

Return a single JSON object with these fields:

{
  "content_id": "string, the identifier provided in metadata or a generated hash",
  "is_stale": "boolean, true if the content exceeds freshness thresholds or has been superseded",
  "staleness_severity": "string, one of: 'critical', 'high', 'medium', 'low', 'none'",
  "confidence_score": "number between 0.0 and 1.0, how confident you are in the staleness determination",
  "staleness_reasons": ["array of strings, specific reasons why the content is or is not stale"],
  "recommended_action": "string, one of: 'replace', 'review', 'keep', 'deprecate', 'append_notice'",
  "replacement_suggestion": "string or null, a specific suggestion for what should replace this content, citing evidence if available",
  "replacement_evidence": ["array of strings or null, specific passages from EVIDENCE_CONTEXT that support the replacement"],
  "temporal_gap": "string or null, human-readable description of the time gap between content publication and current date or superseding evidence",
  "alert_message": "string or null, a concise alert message suitable for logging or notification systems, only present if is_stale is true"
}

## CONSTRAINTS

1. If [EVIDENCE_CONTEXT] is empty or not provided, base staleness solely on [FRESHNESS_RULES] and the gap between [PUBLICATION_DATE] and [CURRENT_DATE].
2. If [EVIDENCE_CONTEXT] contains newer information that directly contradicts or supersedes [CONTENT], mark is_stale as true regardless of the publication date gap.
3. Do not fabricate replacement evidence. Only cite passages that actually appear in [EVIDENCE_CONTEXT].
4. If you are uncertain about staleness, set confidence_score below 0.7 and set recommended_action to 'review'.
5. For domains marked as high-risk in [FRESHNESS_RULES], default to 'review' when confidence_score is below 0.85.
6. Never output markdown fences or extra text outside the JSON object.
7. If [CONTENT] is empty or unreadable, return is_stale as null and set recommended_action to 'review' with an alert_message explaining the input was invalid.

After pasting this template into your prompt layer, replace each bracketed variable with data from your content store, freshness policy engine, and retrieval pipeline. The [FRESHNESS_RULES] placeholder should contain domain-specific thresholds such as 'financial earnings data expires after 90 days' or 'breaking news content expires after 24 hours.' The [EVIDENCE_CONTEXT] placeholder should be populated with passages from your retrieval system that may supersede the content under review. If your application does not have a retrieval pipeline, pass an empty string and the prompt will fall back to date-gap analysis. Before deploying, run this prompt against a golden dataset of known-stale and known-fresh content to calibrate your severity thresholds and confidence score expectations.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Stale Content Detection Harness Prompt. Each variable must be populated before the prompt is sent to the model. Validation notes describe how to programmatically verify the input before execution.

PlaceholderPurposeExampleValidation Notes

[CONTENT_BLOCK]

The full text of the content to evaluate for staleness

Article body, product description, or knowledge base entry as a plain text string

Must be non-empty string with minimum 50 characters. Truncate to model context window minus prompt overhead. Strip HTML/markdown if model expects plain text.

[CONTENT_TYPE]

Domain category that determines freshness thresholds and decay rates

financial_report, news_article, technical_documentation, regulatory_filing, product_spec

Must match one of the predefined content type enums. Reject unknown types before prompt assembly. Map to shelf-life config in application layer.

[PUBLICATION_DATE]

ISO 8601 timestamp of when the content was published or last updated

2024-11-15T14:30:00Z

Must parse as valid ISO 8601. Null allowed if date is genuinely unknown. If null, set staleness detection mode to content-internal signal analysis only.

[REFERENCE_TIMESTAMP]

The point in time against which staleness is measured

2025-01-22T09:00:00Z

Must parse as valid ISO 8601. Default to current UTC timestamp if not provided. Cannot be earlier than PUBLICATION_DATE without triggering a configuration warning.

[STALENESS_THRESHOLD_DAYS]

Maximum age in days before content is considered stale for this content type

30

Must be a positive integer. Validate against content type defaults: financial=1, news=7, technical=365, regulatory=90. Override allowed but must be logged.

[REPLACEMENT_SOURCE_QUERY]

Search query string used to find fresher alternative content

site:sec.gov Q4 2024 earnings

Must be non-empty string. Used for suggested replacement retrieval. Validate query syntax for target search backend. Escape special characters before injection into retrieval calls.

[OUTPUT_SEVERITY_LEVELS]

Enum set defining the severity classification tiers for staleness alerts

["critical", "warning", "info", "fresh"]

Must be a valid JSON array of strings. Minimum 2 levels. Map each level to action rules in downstream alerting system. Default: critical (exceeds threshold by 2x), warning (exceeds threshold), info (approaching threshold), fresh (within threshold).

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Stale Content Detection Harness Prompt into a production application, CI/CD pipeline, or scheduled audit workflow.

The Stale Content Detection Harness Prompt is designed to be called programmatically, not used as a one-off chat interaction. It expects a structured input payload containing the content to evaluate, a domain context, and optional freshness windows. The output is a machine-readable JSON report with severity levels, recommended actions, and confidence scores. This structured contract makes it suitable for integration into automated content monitoring pipelines, pre-publication review gates, and scheduled knowledge base audits.

To wire this prompt into an application, wrap it in a function that accepts a StalenessCheckRequest object with fields: content_text (string), content_type (enum: article, report, documentation, data_snapshot, market_data), publication_date (ISO 8601 string or null), domain (enum: news, finance, legal, medical, technical, general), and freshness_window_days (integer or null). The function should inject these into the prompt's [INPUT] placeholder, call the model with response_format set to json_object (or equivalent structured output mode), and validate the returned JSON against a schema that requires: staleness_score (0-1 float), severity (enum: fresh, aging, stale, critical), findings (array of objects with claim, evidence_age, recommended_action, and confidence), and overall_recommendation (string). If the model returns malformed JSON, implement a retry loop with the repair prompt from the Output Repair and Validation Prompts pillar, passing the raw output and the expected schema. Log every evaluation with the input hash, model version, timestamp, and staleness score for trend analysis.

For CI/CD integration, invoke this harness as a gate in your content pipeline before publication or after scheduled content refreshes. If severity returns critical or stale, block the pipeline and route to a human review queue. For scheduled knowledge base audits, run the harness against all documents older than their domain-specific freshness window, aggregate results into a StalenessAuditReport, and generate prioritized refresh tickets. Avoid using this prompt for real-time streaming data freshness checks—those require latency monitoring, not content analysis. For high-stakes domains like finance and healthcare, always require human review of stale and critical findings before taking automated action. Pair this harness with the Temporal Relevance Scoring Prompt for pre-retrieval filtering and the Recency-Boosted Reranking Prompt for post-retrieval ordering to build a complete freshness-aware RAG pipeline.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the structure, types, and validation rules for the Stale Content Detection Harness output. Use this contract to build a parser, validator, or downstream alerting integration.

Field or ElementType or FormatRequiredValidation Rule

stale_content_report

JSON Object

Top-level object must contain 'report_id', 'generated_utc', 'findings', and 'summary' keys.

report_id

String (UUID v4)

Must match standard UUID v4 regex pattern. Reject on parse failure.

generated_utc

String (ISO 8601)

Must parse to a valid UTC datetime. Timestamp must not be in the future beyond a 60-second clock-skew tolerance.

findings

Array of Objects

Array must not be empty if 'summary.total_documents_analyzed' > 0. Each object must conform to the 'finding_item' schema.

findings[].content_id

String

Must match the [CONTENT_ID] placeholder format provided in the input. Null or empty string is not allowed.

findings[].staleness_status

Enum: 'CURRENT', 'STALE', 'SUPERSEDED', 'UNKNOWN'

Value must be one of the four defined enum members. Case-sensitive check required.

findings[].confidence_score

Number (0.0 to 1.0)

Must be a float within the inclusive range [0.0, 1.0]. Reject if score is outside this range or not a number.

findings[].recommended_action

Enum: 'KEEP', 'REFRESH', 'REPLACE', 'HUMAN_REVIEW'

Value must be one of the four defined enum members. If status is 'STALE', action must not be 'KEEP'.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when detecting stale content in production and how to guard against it.

01

Temporal Blindness from Missing Metadata

What to watch: The model cannot detect staleness when source documents lack publication dates, last-updated timestamps, or effective periods. Without temporal anchors, the harness defaults to 'unknown freshness' and either over-trusts or over-rejects evidence. Guardrail: Pre-process all documents with a publication date extraction step before staleness detection. Require a minimum confidence threshold for extracted dates. Route documents with unextractable dates to a human review queue or apply a conservative staleness penalty.

02

Domain-Decay Mismatch

What to watch: Applying a uniform freshness window across all content types causes false positives in slow-moving domains (legal precedents, scientific fundamentals) and false negatives in fast-moving domains (breaking news, market data). A 30-day window is too aggressive for a physics textbook and too lenient for a stock price. Guardrail: Implement a domain-classification step before staleness scoring. Maintain a configurable decay-rate registry keyed by content type, subject area, and use case. Validate decay windows against human-annotated freshness judgments quarterly.

03

Relative Date Misinterpretation

What to watch: The model misinterprets relative timestamps like 'last quarter,' 'recently,' 'this year,' or 'updated 2 days ago' when the reference point is ambiguous. A document scraped in January saying 'updated last month' could mean December or November, and the model may anchor to the wrong date. Guardrail: Normalize all relative dates to absolute ISO 8601 timestamps during ingestion, not during staleness detection. Resolve relative expressions against a known crawl or publication reference date. Flag documents with unresolvable relative dates for manual review.

04

Supersession Blind Spot

What to watch: A document passes freshness checks because its publication date is recent, but the content has been superseded by a newer source covering the same topic. The harness detects temporal freshness but misses content obsolescence. Guardrail: Add a cross-reference check that compares retrieved documents against a registry of known superseding publications. When multiple sources cover the same entity or event, prefer the most recent authoritative version. Include a 'superseded-by' field in staleness reports.

05

Confidence Score Inflation

What to watch: The model assigns high confidence to staleness judgments based on weak signals—a vague copyright year, an inferred date from surrounding context, or a single ambiguous timestamp. These inflated scores bypass review thresholds and let stale content through. Guardrail: Require multiple corroborating temporal signals before assigning high confidence. Implement a confidence calibration step that compares model-assigned scores against ground-truth staleness labels. Down-weight confidence when only a single weak temporal signal is available.

06

Alert Fatigue from Low-Severity Flags

What to watch: The harness generates staleness alerts for every marginally outdated document, overwhelming review queues with low-priority findings. Teams begin ignoring alerts, and genuinely critical staleness issues slip through. Guardrail: Implement severity tiering with clear thresholds: critical (time-sensitive query + severely stale evidence), warning (moderate staleness in time-aware context), and informational (stale but query is time-agnostic). Route only critical and warning tiers to active review. Suppress informational alerts or batch them into daily digests.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test the Stale Content Detection Harness Prompt before integrating it into a CI/CD pipeline or scheduled audit. Each criterion targets a specific failure mode observed in production staleness detection systems.

CriterionPass StandardFailure SignalTest Method

Staleness Classification Accuracy

Correctly labels content as 'current', 'at-risk', or 'stale' against a golden dataset with 90%+ agreement

Misclassifies a known-stale 2019 financial report as 'current' or a just-published article as 'stale'

Run prompt against 50 labeled content-date pairs with known staleness thresholds; measure precision/recall per class

Severity Level Calibration

Assigns 'critical' severity to time-sensitive domains (finance, security) when content exceeds the freshness window by 2x; assigns 'low' to evergreen content

Flags a 3-year-old Wikipedia article on ancient history as 'critical' or a 2-day-old security advisory as 'low'

Test with 20 domain-query pairs spanning time-sensitive and time-agnostic categories; verify severity aligns with domain-specific [FRESHNESS_WINDOW]

Replacement Suggestion Relevance

Suggests a replacement source that is more recent, from an authoritative domain, and topically aligned with the stale content

Suggests a replacement from an unrelated topic, a source older than the original, or hallucinates a non-existent URL

Validate suggested replacements against a known set of newer authoritative sources; check URL reachability and publication date ordering

Confidence Score Honesty

Returns confidence >= 0.8 when publication date is explicit and domain freshness rules are clear; returns confidence <= 0.5 when date extraction is ambiguous

Returns 0.95 confidence for content with a missing publication date or an ambiguous relative timestamp like 'last quarter'

Feed 30 documents with varying date clarity; verify confidence correlates with extraction certainty using Spearman rank correlation > 0.7

Structured Output Schema Compliance

Output is valid JSON matching the [OUTPUT_SCHEMA] with all required fields present and correct types

Missing 'recommended_action' field, 'confidence_score' is a string instead of float, or 'stale_sources' array is null when staleness is detected

Validate output against JSON Schema using a programmatic validator; reject any response that fails schema.parse()

Temporal Window Boundary Handling

Correctly applies [FRESHNESS_WINDOW] boundaries: content exactly at the boundary is classified as 'at-risk', not 'stale' or 'current'

Classifies content published exactly 30 days ago as 'stale' when the window is 30 days, or as 'current' when it should be 'at-risk'

Test with boundary-date inputs (window start, window end, window+1 day, window-1 day); verify consistent boundary behavior across 10 trials

Multi-Source Staleness Aggregation

When multiple sources are provided, reports staleness per-source and generates an aggregate alert if any source is stale

Reports only the first source's staleness, ignores a stale source when others are current, or fails to generate an aggregate alert

Provide retrieval sets with mixed freshness (2 current, 1 stale); verify per-source staleness flags and aggregate alert presence

Actionable Alert Message Generation

Alert message includes the specific stale source, the freshness threshold violated, the detected publication date, and a concrete next step

Alert message is generic ('Some content may be outdated'), missing the threshold value, or omitting the detected date

Review 25 alert messages against a checklist: source named, threshold stated, detected date included, action specified; require 4/4 checklist items present

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a single model call and lighter validation. Remove the multi-pass verification loop and simplify the output schema to just stale, reason, and severity. Run against a small sample of known-stale and known-fresh documents to calibrate thresholds.

code
[SYSTEM]
You are a content freshness auditor. Analyze the provided content and determine if it is stale relative to [DOMAIN] standards.

[INPUT]
Content: [CONTENT]
Publication Date: [PUB_DATE]
Domain: [DOMAIN]

[OUTPUT_SCHEMA]
{
  "stale": boolean,
  "reason": string,
  "severity": "low" | "medium" | "high"
}

Watch for

  • Overly broad staleness flags on evergreen content
  • Missing date parsing for ambiguous formats like "Q3" or "recently"
  • No confidence calibration—prototype scores may be overconfident
Prasad Kumkar

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.