This prompt is designed for RAG pipeline architects and search ranking engineers who need to incorporate temporal awareness into evidence scoring. Use it when your retrieval system returns documents spanning months or years and downstream answer quality depends on prioritizing recent information. The prompt applies a configurable decay function to an existing evidence relevance score based on the evidence age, a domain-specific half-life, and the query's time sensitivity. It is designed to be inserted as a re-ranking or scoring step after initial retrieval and before answer generation, and it assumes you already have a base relevance score for each evidence passage and reliable publication or crawl dates.
Prompt
Evidence Freshness Decay Scoring Prompt

When to Use This Prompt
Determine whether temporal decay scoring is the right tool for your evidence ranking pipeline and when simpler or different approaches are required.
This approach is most effective in fast-moving domains where information becomes stale predictably. Examples include security vulnerability databases where a CVE from last month is far more actionable than one from 2019, financial earnings data where last quarter's report matters more than a report from three years ago, news summarization where yesterday's article is more relevant than last year's coverage, and incident response where recent postmortems carry more weight than historical ones. In each case, the decay function should be tuned to the domain's natural information half-life: hours for breaking news, days for incident response, quarters for financial reports, and years for scientific literature. The prompt includes a staleness threshold configuration so you can explicitly deprioritize or exclude evidence that has aged past usefulness.
Do not use this prompt when temporal relevance is irrelevant to answer quality. Evergreen domains such as mathematical proofs, historical analysis, philosophical arguments, or stable technical documentation should not apply freshness decay because older evidence may be equally or more authoritative. Applying decay in these domains introduces a recency bias that degrades answer quality. Similarly, avoid this prompt when your retrieval system already handles temporal ranking through index-time boosting or when publication dates are unreliable or missing. If more than 20% of your evidence lacks trustworthy dates, temporal decay will introduce noise rather than signal. For queries that explicitly ask for historical or archival information, set the time-sensitivity parameter to zero or bypass the decay step entirely.
Before deploying this prompt in production, validate that your decay parameters produce sensible rankings on a golden dataset of queries with known temporally-correct answers. Watch for two common failure modes: over-decay where moderately aged but still-relevant evidence is incorrectly buried, and under-decay where the half-life is set too long and stale evidence persists in top ranks. Run A/B comparisons against a baseline without decay to confirm the temporal signal improves answer quality rather than just shuffling rankings. For high-stakes domains such as medical guidelines or legal precedents, always include a human review step before final answer generation, because temporal decay can inadvertently suppress authoritative sources that happen to be older but remain the standard of care or controlling law.
Use Case Fit
Where the Evidence Freshness Decay Scoring Prompt delivers value and where it introduces risk.
Good Fit: Time-Sensitive RAG Pipelines
Use when: Your retrieval corpus contains documents with clear publication or update timestamps and the domain has a known information half-life (e.g., news, financial filings, incident reports). Guardrail: Always pair decay scoring with a hard cutoff threshold to exclude dangerously stale documents regardless of other relevance signals.
Bad Fit: Evergreen or Historical Analysis
Avoid when: The query requires historical context, legal precedent, or foundational knowledge where older documents are equally authoritative. Applying decay here silently removes critical evidence. Guardrail: Implement a query-intent classifier that disables decay scoring for historical, legal, or foundational queries before the prompt runs.
Required Inputs
What you need: Each evidence passage must carry a reliable publication_date or last_updated field. You also need a domain-specific half_life_days parameter and a query-level time_sensitivity flag. Guardrail: Validate that every passage entering the scorer has a parseable date. Reject or quarantine passages with missing timestamps before scoring.
Operational Risk: Score Distortion
What to watch: Decay scoring can overwhelm other evidence quality signals (relevance, authority, specificity) when freshness is weighted too heavily. This produces factually correct but shallow answers from recent but low-authority sources. Guardrail: Cap the maximum contribution of freshness to the total evidence score and log cases where decay dominates other factors for pipeline audit.
Operational Risk: Staleness Threshold Drift
What to watch: Hard staleness thresholds set during development become wrong as the domain evolves. A 30-day threshold for security advisories may be too slow during active exploitation. Guardrail: Externalize staleness thresholds as configuration, not hardcoded in the prompt. Monitor the age distribution of selected evidence and alert when the pipeline consistently selects documents near the threshold boundary.
Bad Fit: Untrusted or Missing Timestamps
Avoid when: Documents lack verifiable publication dates or timestamps come from untrusted sources (user-submitted content, scraped pages without date metadata). Decay scoring on fabricated dates produces dangerously misleading freshness signals. Guardrail: Require timestamp provenance metadata. If source trustworthiness is unknown, route to a source authority assessment prompt before applying decay.
Copy-Ready Prompt Template
A reusable prompt template for applying configurable freshness decay scoring to evidence passages based on publication date, domain half-life, and query time-sensitivity.
This prompt template implements a temporal decay scoring function for evidence passages. It evaluates each piece of evidence against the query's time-sensitivity requirements, the evidence's publication or modification date, and a configurable domain half-life to produce a freshness score. The template is designed to be wired into a RAG re-ranking pipeline where stale evidence must be deprioritized before answer generation. Use this when your retrieval corpus spans multiple time periods and your queries have implicit or explicit recency requirements—such as in news summarization, financial intelligence, incident response, or regulatory monitoring systems.
textYou are an evidence freshness evaluator for a retrieval-augmented generation system. Your task is to assign a freshness decay score to each evidence passage based on its age, the domain's information half-life, and the query's time-sensitivity. [INPUT] Query: [QUERY] Query Time-Sensitivity: [TIME_SENSITIVITY] (Choose one: high, medium, low, none) Current Date: [CURRENT_DATE] Evidence Passages: [EVIDENCE_PASSAGES] [CONSTRAINTS] 1. For each passage, compute a freshness score between 0.0 (completely stale) and 1.0 (fully current). 2. Apply the domain half-life specified in [DOMAIN_HALF_LIFE] days. Evidence older than the half-life should receive a score no higher than 0.5 unless the query time-sensitivity is "none." 3. If query time-sensitivity is "high," apply an aggressive decay: evidence older than [STALENESS_THRESHOLD_HIGH] days must score below 0.3. 4. If query time-sensitivity is "low" or "none," decay should be gradual. Do not penalize older evidence for evergreen or historical queries. 5. Evidence with missing or unparseable dates must be flagged with a freshness score of null and a reason of "MISSING_DATE." 6. Do not modify the original evidence content or the existing relevance score. Append the freshness fields only. [OUTPUT_SCHEMA] Return a JSON object with the following structure: { "query_freshness_assessment": { "time_sensitivity": "[high|medium|low|none]", "applied_half_life_days": number, "staleness_threshold_applied": number | null, "rationale": "Brief explanation of the decay function applied." }, "passages": [ { "passage_id": "string", "original_relevance_score": number, "publication_date": "string | null", "age_in_days": number | null, "freshness_score": number | null, "freshness_rationale": "string", "staleness_flag": "current | aging | stale | evergreen | missing_date" } ] } [EXAMPLES] Example Input: Query: "Latest GPU driver release notes for vulnerability CVE-2024-0091" Time-Sensitivity: high Current Date: 2024-11-15 Domain Half-Life: 30 days Staleness Threshold (High): 90 days Evidence: [{"passage_id": "p1", "content": "NVIDIA driver 550.90 patch notes from October 2024...", "publication_date": "2024-10-20", "relevance_score": 0.94}] Example Output: { "query_freshness_assessment": { "time_sensitivity": "high", "applied_half_life_days": 30, "staleness_threshold_applied": 90, "rationale": "Security vulnerability queries require current patch information. Applied aggressive decay with a 90-day staleness cutoff." }, "passages": [ { "passage_id": "p1", "original_relevance_score": 0.94, "publication_date": "2024-10-20", "age_in_days": 26, "freshness_score": 0.87, "freshness_rationale": "Published 26 days ago, within the 30-day half-life. Slight decay applied but evidence remains highly current for this security query.", "staleness_flag": "current" } ] } [TOOLS] No external tools are required. Perform all date calculations using the provided current date. [RISK_LEVEL] Medium. Incorrect staleness flags can cause the downstream RAG system to use outdated security or financial information. Always validate that evergreen domains (e.g., historical analysis, scientific fundamentals) are not subjected to aggressive decay. If time-sensitivity is ambiguous, default to "medium" and document the assumption.
To adapt this template for your application, replace the bracketed variables with data from your retrieval pipeline. The [EVIDENCE_PASSAGES] placeholder should receive a JSON array of passage objects, each containing at minimum a passage_id, content, publication_date, and relevance_score. The [DOMAIN_HALF_LIFE] and [STALENESS_THRESHOLD_HIGH] values should be calibrated per domain—financial news may use a 7-day half-life, while academic literature may use 365 days or more. For evergreen domains, set [TIME_SENSITIVITY] to "none" and the decay function will preserve all scores near 1.0 regardless of age.
Before deploying this prompt into a production re-ranking pipeline, validate the output against a golden dataset of passages with known publication dates and expected staleness flags. Pay particular attention to edge cases: evidence published today should always score 1.0, evidence with missing dates must not silently receive a default score, and queries marked as time-insensitive must not have their evidence unfairly penalized. After scoring, the downstream selection step should multiply the original relevance score by the freshness score (or apply a weighted combination) to produce the final ranking. If the freshness score is null due to a missing date, escalate the passage for human review or exclude it with a logged warning rather than silently admitting it to the ranked list.
Prompt Variables
Inputs the Evidence Freshness Decay Scoring Prompt needs to work reliably. Validate these before sending the prompt to the model.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[EVIDENCE_LIST] | Array of evidence objects to score for freshness decay | [{"id": "doc-1", "text": "...", "publication_date": "2024-01-15", "domain": "cybersecurity"}] | Must be valid JSON array with at least 1 object. Each object requires publication_date in ISO 8601 format. Empty array triggers abort. |
[QUERY_TIMESTAMP] | Reference point for calculating evidence age | "2025-03-15T10:00:00Z" | Must be valid ISO 8601 datetime string. Cannot be earlier than any publication_date without explicit override flag. Null defaults to current UTC time. |
[DOMAIN_HALF_LIFE_MAP] | Configurable half-life in days per domain for decay calculation | {"cybersecurity": 30, "medical_research": 365, "evergreen": null} | Must be valid JSON object mapping domain strings to integers or null. Null means no decay applied. Missing domain key triggers fallback to [DEFAULT_HALF_LIFE]. |
[DEFAULT_HALF_LIFE] | Fallback half-life in days when domain not in map | 180 | Must be positive integer. Used when evidence domain is missing from [DOMAIN_HALF_LIFE_MAP]. Set to null to require explicit domain mapping. |
[QUERY_TIME_SENSITIVITY] | Categorical indicator of how time-sensitive the query is | "high" | Must be one of: "high", "medium", "low", "evergreen". Controls decay function steepness. "evergreen" bypasses decay entirely. Invalid value triggers abort. |
[STALENESS_THRESHOLD] | Score below which evidence is considered stale and flagged | 0.3 | Must be float between 0.0 and 1.0. Evidence scoring below this value gets staleness_flag: true in output. Set to 0.0 to disable staleness flagging. |
[DECAY_FUNCTION] | Mathematical decay function to apply | "exponential" | Must be one of: "exponential", "linear", "logarithmic", "step". Controls decay curve shape. Invalid value triggers fallback to "exponential" with warning. |
[OUTPUT_SCHEMA] | Expected output structure for scored evidence | {"evidence_id": "string", "freshness_score": "float", "staleness_flag": "boolean", "decay_applied": "boolean", "age_days": "integer"} | Must be valid JSON Schema or type description. Output validator checks each field presence and type. Missing required fields in output triggers repair retry. |
Implementation Harness Notes
How to wire the Evidence Freshness Decay Scoring Prompt into a RAG pipeline or search ranking application.
This prompt is designed to operate as a scoring microservice within a larger retrieval pipeline, not as a standalone chat interaction. It receives a batch of evidence passages, each with a publication or crawl date, and returns decay-adjusted scores. The implementation harness must handle date parsing, decay function configuration, and score normalization before the results are consumed by a downstream re-ranker or evidence selector. Because freshness decay is domain-specific, the harness should expose configurable half-life parameters and staleness thresholds rather than hardcoding them into the prompt.
Wire the prompt into your application as a post-retrieval scoring step. After your initial retrieval returns candidate passages with metadata, extract the [PUBLICATION_DATE] for each passage and the [QUERY_TIMESTAMP] from the user request. Pass these into the prompt along with the [DOMAIN_HALF_LIFE] and [STALENESS_THRESHOLD] configured for your domain. The model returns a structured JSON array with original scores, decay multipliers, and adjusted scores. Validate the output schema strictly: every passage must receive a decay multiplier between 0.0 and 1.0, and the adjusted score must equal the original score multiplied by the decay multiplier. Reject any response that fails schema validation or contains scores outside the expected range, and retry with a stricter output constraint instruction. Log every scoring decision, including the passage ID, publication date, decay multiplier, and adjusted score, so that pipeline operators can audit freshness decisions later.
For high-stakes domains such as financial intelligence or medical literature, route passages that fall below the staleness threshold to a human review queue instead of silently discarding them. The model's staleness classification is a strong signal but not infallible—an evergreen research paper might be incorrectly flagged as stale if the publication date metadata is missing or malformed. Implement a pre-prompt date validation step that rejects passages with unparseable or missing dates before they reach the model, returning an explicit error to the pipeline operator rather than allowing the model to guess. When deploying to production, run periodic eval checks comparing the model's decay decisions against domain-expert judgments on a golden dataset of passages with known freshness characteristics, and recalibrate the half-life parameter if systematic drift is detected.
Common Failure Modes
What breaks first when applying freshness decay to evidence scores in production, and how to guard against it.
Evergreen Content Penalized by Recency Bias
What to watch: Foundational, timeless documents (e.g., mathematical proofs, historical analyses) receive unfairly low scores because a naive decay function treats all content as perishable. Guardrail: Implement a domain half-life override. For domains tagged as 'evergreen' or 'foundational,' set the decay rate to near-zero or bypass the freshness scorer entirely.
Temporal Context Mismatch in the Query
What to watch: The model fails to detect that a query is time-sensitive ('latest security patch') or time-agnostic ('explain TCP handshake'), applying a uniform decay policy that degrades answer quality. Guardrail: Add a pre-scoring classification step that explicitly labels the query's temporal requirement (e.g., 'requires_recent', 'time_agnostic') and adjusts the decay function weight accordingly.
Stale Publication Dates in Metadata
What to watch: A document's indexed publication_date is missing, null, or reflects the ingestion date rather than the original publication date, causing the decay scorer to miscalculate age. Guardrail: Validate date fields before scoring. If a credible date is missing, flag the evidence with an 'unknown_freshness' status and apply a conservative default score rather than assuming it is brand new or ancient.
Score Dominance Masking Relevance Failures
What to watch: A highly recent but tangentially relevant document outranks a slightly older, perfectly relevant document because the freshness weight overwhelms the relevance signal. Guardrail: Implement a weighted multiplicative model rather than additive, and set a hard cap on the maximum boost freshness can provide. Monitor for cases where the top-ranked document has a high freshness score but a low relevance sub-score.
Rapid Decay in Fast-Moving Incident Response
What to watch: During an active incident, evidence older than a few hours is aggressively decayed, but the retrieval system hasn't ingested the latest updates yet, leaving the pipeline with zero valid evidence. Guardrail: Implement a 'grace period' or step-function decay rather than continuous exponential decay for ultra-fresh domains. If the top-N results are all below the staleness threshold, trigger a re-retrieval or escalate to a human.
Inconsistent Decay Across Multi-Source Synthesis
What to watch: When synthesizing an answer from multiple sources, the model uses evidence with wildly different freshness scores, creating a disjointed narrative that mixes outdated facts with current ones. Guardrail: Add a coherence check post-scoring. If the variance in freshness scores within the selected evidence set exceeds a threshold, force the model to explicitly note the temporal discrepancy in the output or discard the outliers.
Evaluation Rubric
How to test output quality before shipping. Run these checks against a golden dataset of evidence passages with known publication dates and expected decay behavior.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Freshness Decay Accuracy | Score for a 30-day-old article in a 90-day half-life domain is within 5% of expected decay value | Deviation >5% from expected score or score increases with age | Run 50 labeled passage-date pairs through the prompt; compute MAE against ground-truth decay scores |
Staleness Threshold Enforcement | Passages older than [STALENESS_THRESHOLD_DAYS] receive score 0.0 and staleness flag true | Non-zero score or false staleness flag on known-stale passage | Feed 20 passages with ages exceeding threshold; assert all return score=0.0 and staleness=true |
Evergreen Domain Protection | Passage from evergreen domain receives decay factor >=0.95 regardless of age | Decay factor <0.90 for evergreen domain passage older than 5 years | Test 10 passages from domains marked evergreen in [DOMAIN_HALF_LIFE_MAP]; verify minimal decay |
Query Time-Sensitivity Alignment | High-sensitivity query applies aggressive decay; low-sensitivity query applies minimal decay to same passage | Decay scores identical for high-sensitivity and low-sensitivity queries on same passage | Pair 15 passages with both [QUERY_TIME_SENSITIVITY]=high and low variants; verify score spread >0.3 |
Output Schema Compliance | Every output contains required fields: evidence_id, raw_score, decay_factor, adjusted_score, staleness_flag, decay_rationale | Missing field, extra field, or wrong type in any output | Validate 100 outputs against [OUTPUT_SCHEMA] using JSON Schema validator; 0 failures required |
Score Range Boundedness | All adjusted_score values fall within [0.0, 1.0] inclusive | Score <0.0 or >1.0 in any output | Run full golden dataset; assert min >= 0.0 and max <= 1.0 across all outputs |
Decay Rationale Auditability | Decay rationale references publication date, domain half-life, and query sensitivity explicitly | Rationale missing date reference, half-life value, or sensitivity level | Sample 30 outputs; human reviewer checks each rationale for three required references; >90% pass rate required |
Edge Case: Missing Publication Date | Passage with null or missing [PUBLICATION_DATE] receives staleness_flag=true and adjusted_score=raw_score with decay_factor=null | System crash, hallucinated date, or non-null decay_factor on missing-date passage | Feed 10 passages with null publication dates; assert no crashes and correct null handling |
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
Start with the base prompt and a single decay function (exponential half-life). Use hardcoded domain half-life values from a small lookup table instead of dynamic configuration. Skip confidence intervals and output only the decay-adjusted score and a simple staleness flag.
codeApply exponential decay with a half-life of [HALF_LIFE_DAYS] days. If the adjusted score falls below [STALENESS_THRESHOLD], mark as STALE. Return: { "original_score": [SCORE], "decayed_score": [NEW_SCORE], "staleness": "STALE"|"FRESH" }
Watch for
- Hardcoded half-life values that don't match the actual domain
- No handling of missing publication dates
- Evergreen content incorrectly marked as stale
- Single-function approach failing on domains with non-exponential decay patterns

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