Inferensys

Prompt

Priority Decay Over Time Scoring Prompt

A practical prompt playbook for using Priority Decay Over Time Scoring Prompt in production AI workflows.
Developer doing prompt engineering on laptop, prompt variations visible on screen, casual coding session.
PROMPT PLAYBOOK

When to Use This Prompt

Determines when to apply a time-decayed priority scoring prompt to prevent SLA breaches in backlog management systems.

This prompt is for backlog management systems where priority must increase as items age toward SLA deadlines. It produces a time-decayed priority score by combining an original priority score with an age factor, decay curve parameters, and the item's current position relative to its deadline. Use this when you need deterministic, auditable scoring that controls queue ordering, escalation timing, and resource allocation.

This is not a general-purpose prioritization prompt. It assumes you already have a base priority score and SLA deadline for each item. The prompt applies a decay function to elevate priority as the deadline approaches, making it suitable for operations engineers and support platform builders who need to prevent SLA breaches in large backlogs. Do not use this prompt when you lack a base priority score, when items have no deadline, or when you need to discover priority from unstructured text—use a classification or rubric-based priority prompt instead.

The prompt works best when wired into a scheduled job or event-driven trigger that recalculates scores as time advances. It expects structured input fields: a base score, a creation timestamp, an SLA deadline, and decay parameters. If your system cannot provide these fields deterministically, the prompt will produce unreliable results. Before deploying, validate the decay function against boundary conditions—items exactly at deadline, items past deadline, and items with extreme base scores—to ensure the curve behaves as intended.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Priority Decay Over Time Scoring Prompt delivers value and where it introduces operational risk.

01

Good Fit: SLA-Bound Backlogs

Use when: items have explicit SLA deadlines and the cost of breaching them is measurable. The prompt applies a decay curve that accelerates priority as the deadline approaches, preventing items from aging out of view. Guardrail: always provide the SLA deadline as a structured input field, not extracted from free text.

02

Bad Fit: Unbounded Queues

Avoid when: items have no deadline or the deadline is unknown. Without a target date, the decay function has no anchor and produces arbitrary scores. Guardrail: require a valid deadline input; if missing, route to a separate triage prompt that assigns a default SLA tier before decay scoring.

03

Required Inputs

What you need: original priority score, item creation timestamp, SLA deadline, and decay curve parameters (half-life or exponent). Guardrail: validate all inputs before prompt assembly—missing timestamps or negative half-life values produce nonsensical scores that corrupt queue ordering.

04

Operational Risk: Score Inflation

What to watch: all items eventually reach maximum priority as deadlines pass, creating a queue where everything is critical and nothing is distinguishable. Guardrail: cap the decay score at a maximum value and implement a post-deadline override that flags items for escalation rather than letting them compete with genuinely urgent work.

05

Operational Risk: Curve Misconfiguration

What to watch: a decay half-life that is too short causes premature escalation; too long causes items to breach SLA before priority rises enough to trigger action. Guardrail: test decay curves against historical queue data to calibrate parameters before production deployment, and monitor breach rates weekly.

06

Variant: Cost-of-Delay Decay

Use when: priority should reflect economic cost rather than SLA compliance. Replace the SLA deadline with a cost-of-delay function that compounds per day. Guardrail: ensure cost estimates are grounded in account data or contract terms—speculative cost inputs produce unreliable decay scores that undermine trust in the queue.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template for calculating time-decayed priority scores, ready to copy, adapt, and integrate into your backlog management system.

The following prompt template implements a deterministic priority decay function. It takes an original priority score, an item's age, and an SLA deadline to produce a new score that increases as the deadline approaches. The template is designed to be used as part of an application harness—not as a standalone chat interaction. Every input is parameterized with square-bracket placeholders that your application must populate before sending the request to the model. The prompt enforces a strict JSON output schema, requires explicit decay curve parameters, and instructs the model to show its work so that every score change is auditable.

text
You are a priority decay scoring function. Your job is to calculate a time-adjusted priority score for a backlog item based on its age, original priority, and SLA deadline. You must follow the decay function specification exactly and return only valid JSON.

## Input
- Original Priority Score: [ORIGINAL_SCORE] (numeric, 0-100)
- Item Creation Timestamp: [CREATED_AT] (ISO 8601)
- Current Timestamp: [CURRENT_TIME] (ISO 8601)
- SLA Deadline Timestamp: [SLA_DEADLINE] (ISO 8601)
- Decay Curve: [DECAY_CURVE] (one of: "linear", "exponential", "step")
- Decay Half-Life (for exponential): [HALF_LIFE_HOURS] (numeric, required if curve is exponential)
- Step Thresholds (for step): [STEP_THRESHOLDS] (JSON array of {hours_remaining: number, multiplier: number}, required if curve is step)
- Maximum Score Cap: [MAX_SCORE] (numeric, default 100)
- Minimum Score Floor: [MIN_SCORE] (numeric, default original score)

## Output Schema
Return exactly this JSON structure with no additional text:
{
  "original_score": number,
  "adjusted_score": number,
  "age_hours": number,
  "hours_until_deadline": number,
  "decay_curve_applied": string,
  "decay_parameters": {
    "curve_type": string,
    "half_life_hours": number | null,
    "step_thresholds_applied": array | null
  },
  "calculation_steps": [
    {
      "step": string,
      "input": number,
      "output": number,
      "explanation": string
    }
  ],
  "cap_applied": boolean,
  "floor_applied": boolean,
  "confidence": "high" | "medium" | "low"
}

## Decay Function Specification
1. Calculate age_hours = (current_time - created_at) in hours.
2. Calculate hours_until_deadline = (sla_deadline - current_time) in hours. If negative, set to 0.
3. Calculate total_sla_window = (sla_deadline - created_at) in hours.
4. Calculate elapsed_ratio = age_hours / total_sla_window, clamped to [0, 1].
5. Apply decay curve:
   - Linear: multiplier = 1 + (elapsed_ratio * (max_score - original_score) / original_score), clamped so adjusted_score never exceeds max_score.
   - Exponential: multiplier = 2 ^ (elapsed_ratio * total_sla_window / half_life_hours), clamped to max_score / original_score.
   - Step: Find the step threshold where hours_until_deadline <= threshold.hours_remaining, apply that multiplier. If no threshold matches, use multiplier 1.0.
6. adjusted_score = original_score * multiplier.
7. Apply cap: if adjusted_score > max_score, set adjusted_score = max_score and cap_applied = true.
8. Apply floor: if adjusted_score < min_score, set adjusted_score = min_score and floor_applied = true.
9. Round adjusted_score to 2 decimal places.
10. Set confidence to "high" if all inputs are valid and calculation is deterministic; "medium" if any input is inferred or estimated; "low" if inputs are missing or contradictory.

## Constraints
- Do not invent missing inputs. If a required input is missing, return an error object: {"error": "Missing required input: [FIELD_NAME]"}.
- Do not apply the decay curve if hours_until_deadline is negative (past deadline). Instead, set adjusted_score = max_score and add a calculation step explaining that the SLA has been breached.
- If original_score is already at max_score, return it unchanged with cap_applied = false.
- All timestamps must be valid ISO 8601. If parsing fails, return an error object.

## Examples
Input: original_score=50, created_at="2025-01-01T00:00:00Z", current_time="2025-01-02T00:00:00Z", sla_deadline="2025-01-03T00:00:00Z", decay_curve="linear", max_score=100
Expected: adjusted_score=75.0, age_hours=24, hours_until_deadline=24, cap_applied=false

Input: original_score=80, created_at="2025-01-01T00:00:00Z", current_time="2025-01-03T12:00:00Z", sla_deadline="2025-01-03T00:00:00Z", decay_curve="linear", max_score=100
Expected: adjusted_score=100.0, hours_until_deadline=-12, cap_applied=true, calculation_steps includes "SLA breached"

Adaptation guidance: Replace each square-bracket placeholder with values from your application's data layer before sending the prompt. The [STEP_THRESHOLDS] placeholder expects a JSON array—your application must serialize this from your configuration store. If your system only supports one decay curve, remove the conditional parameters and hardcode the curve type. For production use, add a [REQUEST_ID] placeholder to correlate model responses with your logging and audit systems. The calculation steps in the output schema are designed to be logged verbatim for debugging and audit trails—do not remove them even if you don't display them to end users.

What to do next: Copy this template into your prompt management system. Build a validation layer that checks the returned JSON against the schema before the score enters your queue ordering logic. Create a set of boundary-condition test cases—items exactly at their SLA deadline, items with zero age, items with original scores at the cap—and run them through the prompt before deploying. If the model returns a confidence of "medium" or "low," route the item to a human reviewer rather than trusting the adjusted score automatically.

IMPLEMENTATION TABLE

Prompt Variables

Inputs required for the Priority Decay Over Time Scoring Prompt. Each placeholder must be populated before the prompt is assembled and sent to the model. Validation notes describe how to verify the input is well-formed before execution.

PlaceholderPurposeExampleValidation Notes

[ITEM_LIST]

Array of backlog items, each with an original priority score, creation timestamp, and SLA deadline

[{"id": "TKT-101", "original_score": 0.75, "created_at": "2025-03-01T08:00:00Z", "sla_deadline": "2025-03-05T08:00:00Z"}]

Must be a valid JSON array. Each item requires id (string), original_score (number 0-1), created_at (ISO 8601), sla_deadline (ISO 8601). Reject if any item is missing required fields.

[CURRENT_TIME]

Reference timestamp for calculating elapsed time and remaining SLA window

"2025-03-04T12:00:00Z"

Must be ISO 8601 UTC string. Must be parseable by Date constructor. Reject if CURRENT_TIME is before any item's created_at field.

[DECAY_FUNCTION]

Mathematical function name or formula that defines how priority increases as deadline approaches

"exponential"

Must be one of: "linear", "exponential", "logarithmic", "step". Reject unknown function names. If custom formula provided, validate it contains only allowed operators and the variable t for time ratio.

[DECAY_PARAMETERS]

Parameters controlling the decay curve shape, such as rate constant, half-life, or step thresholds

{"rate": 0.5, "half_life_hours": 24}

Must be a valid JSON object. Required keys depend on DECAY_FUNCTION: exponential requires rate or half_life; linear requires slope; step requires thresholds array. Reject if required keys are missing or values are non-positive.

[MAX_SCORE]

Upper bound for the final decayed priority score, used to normalize output to a known range

1.0

Must be a positive number. Typically 1.0 for normalized scoring. Reject if MAX_SCORE is less than or equal to 0. Warn if MAX_SCORE is less than the highest original_score in ITEM_LIST.

[OUTPUT_SCHEMA]

Expected JSON structure for each scored item in the response

{"id": "string", "original_score": "number", "age_factor": "number", "decayed_score": "number", "sla_remaining_hours": "number", "position": "integer"}

Must be a valid JSON Schema or example object. Required fields: id, original_score, age_factor, decayed_score, sla_remaining_hours, position. Reject if required fields are missing from schema definition.

[CONFIDENCE_THRESHOLD]

Minimum confidence level required for the decay calculation to be accepted without human review

0.85

Must be a number between 0 and 1. If model confidence in any item's decayed_score falls below this threshold, flag that item for human review. Reject if threshold is outside 0-1 range.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Priority Decay Over Time Scoring Prompt into a production application with validation, retries, logging, and human review.

The Priority Decay Over Time Scoring Prompt is designed to be called as a stateless function within a larger backlog management or ticket triage system. It expects a structured input containing the original priority score, the item's creation timestamp, the current timestamp, the SLA deadline, and the decay curve parameters. The prompt returns a JSON object with the decayed score, the age factor applied, the decay curve used, and the item's position relative to its SLA window. This output should be consumed by a queue ordering service, a dashboard, or an alerting system—not displayed directly to end users without interpretation.

To wire this into an application, build a thin service wrapper that constructs the prompt payload from your database fields. Validate inputs before calling the model: ensure timestamps are ISO 8601, original scores are within the expected numeric range, and decay parameters (curve type, half-life, floor) are present and valid. After receiving the model response, validate the output schema—check that decayed_score is a number between the configured floor and the original score, that age_factor is positive, and that sla_position (e.g., 'within_window', 'at_risk', 'breached') is one of the expected enum values. If validation fails, retry once with a more constrained prompt that includes the validation error message. If the retry also fails, log the failure, fall back to a deterministic decay calculation using the same curve parameters, and flag the item for human review. This dual-path approach ensures the system never stalls on a malformed model output while still capturing edge cases for prompt improvement.

For model choice, use a fast, inexpensive model (e.g., GPT-4o-mini, Claude Haiku) because the scoring logic is deterministic given the inputs—the model is acting as a calculation engine with explanation, not a creative reasoner. Set temperature=0 to eliminate variance across calls for the same item. Log every scoring event with the input parameters, the raw model response, the validated output, and any fallback path taken. This audit trail is critical for SLA compliance reporting and for debugging scoring anomalies. If your system scores thousands of items per hour, consider batching multiple items into a single prompt call with an array input to reduce API overhead, but keep batch sizes small (5–10 items) to avoid timeout risks and to keep per-item error isolation manageable.

Human review should be triggered when the model's decayed score conflicts with the deterministic fallback calculation by more than a configurable threshold (e.g., 15% difference), when the SLA position is 'breached' but the decayed score hasn't dropped below the escalation floor, or when the model returns an uncertainty_flag indicating ambiguous input. These cases should create a review task in your operations queue with the original inputs, both scores, and the discrepancy highlighted. Do not route decay-scored items directly to customer-facing SLAs without at least a week of shadow-mode validation comparing model-scored priorities against your existing manual or rules-based system.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the structure, types, and validation rules for the priority decay score output. Use this contract to build a parser, validator, or downstream queue sorter that consumes the model response.

Field or ElementType or FormatRequiredValidation Rule

original_priority_score

number (0.0-1.0)

Must be a float between 0 and 1 inclusive. Reject if missing or outside range.

decay_curve

string enum

Must be one of: linear, exponential, logarithmic, custom. Reject if not in allowed set.

decay_parameters

object

Must contain 'half_life_hours' (number > 0) if curve is exponential, 'rate_per_hour' (number > 0) if linear, or 'base' and 'factor' if logarithmic. Reject if required param missing for chosen curve.

age_hours

number

Must be a non-negative float representing hours since item creation. Reject if negative or null.

sla_deadline_hours

number

Must be a positive float. If null, treat as no SLA and skip deadline proximity boost. Reject if zero or negative when provided.

decayed_priority_score

number (0.0-1.0)

Must be a float between 0 and 1 inclusive. Reject if greater than original_priority_score when decay is not configured to boost. Validate against expected formula output within 0.01 tolerance.

deadline_proximity_boost

number (0.0-1.0)

If present, must be a float between 0 and 1. Null allowed when sla_deadline_hours is null. Reject if boost pushes decayed_priority_score above 1.0.

current_position_in_queue

integer

If present, must be a non-negative integer. Null allowed when queue position is unknown. Reject if negative.

PRACTICAL GUARDRAILS

Common Failure Modes

Priority decay scoring introduces time-dependent math and boundary conditions that break silently in production. These are the most common failure modes and how to prevent them.

01

Negative Decay at Extreme Age

What to watch: Items older than the maximum age window can produce negative priority scores if the decay function lacks a floor. This causes items to fall below newly created low-priority items in the queue. Guardrail: Clamp the decay multiplier to a minimum of 0.0 and add an explicit floor parameter in the prompt's output schema. Test with ages 10x the SLA window.

02

Clock Drift Between Scoring and Queue Execution

What to watch: If the prompt uses current_time from the model's context and the queue consumer reads items minutes later, the decay score is already stale. Items near SLA boundaries can breach before re-scoring. Guardrail: Pass an explicit reference_timestamp as an input variable rather than relying on the model's sense of now. Re-score items at dequeue time if the age delta exceeds a threshold.

03

Incorrect Decay Curve for the SLA Shape

What to watch: Using linear decay when the SLA has a hard cliff at deadline produces scores that don't reflect real urgency. Conversely, exponential decay can over-prioritize items days before any real risk. Guardrail: Make the decay function type an explicit input parameter (linear, exponential, step). Include a test harness that plots the score curve against the SLA timeline and validates the inflection point matches the breach window.

04

Silent Overflow on Large Original Scores

What to watch: When the original priority score is already high (e.g., 1000) and the decay multiplier is large, the combined score can overflow the output schema's numeric type or produce nonsensical values. Guardrail: Normalize all input scores to a bounded range (e.g., 0-100) before applying decay. Add a max_output_score constraint in the prompt and validate it in the application layer.

05

Age Calculation from Wrong Baseline

What to watch: Calculating age from created_at when the SLA timer starts from first_response_deadline or last_status_change produces decay scores that don't match operational reality. Items appear less urgent than they are. Guardrail: Require an explicit age_baseline_timestamp input field. The prompt should refuse to calculate age if this field is missing rather than defaulting to created_at.

06

Batch Scoring Inconsistency Across Queue Segments

What to watch: When scoring a large backlog in batches, items at the batch boundary can receive different scores because the model's internal calibration drifts across calls. This creates unfair queue ordering. Guardrail: Use a deterministic post-processing step for the decay math after the model extracts structured inputs. Keep the model's role limited to extracting original_score and age_baseline, then apply the decay formula in application code.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test whether the Priority Decay Over Time Scoring Prompt produces correct, auditable, and production-safe decay scores before deploying to a live backlog or queue.

CriterionPass StandardFailure SignalTest Method

Decay Curve Correctness

Score increases monotonically as [CURRENT_TIME] approaches [SLA_DEADLINE] for a fixed [ORIGINAL_SCORE] and [DECAY_CURVE]

Score decreases or remains flat when time-to-deadline shrinks; score jumps discontinuously

Run 5 test cases with fixed inputs and varying [CURRENT_TIME] values; assert score(t1) < score(t2) when t1 < t2 < deadline

Boundary Condition: At Deadline

Score equals [ORIGINAL_SCORE] * [DECAY_CURVE] maximum multiplier when [CURRENT_TIME] equals [SLA_DEADLINE]

Score exceeds theoretical maximum; score is null or zero at deadline; score formula produces division by zero

Set [CURRENT_TIME] = [SLA_DEADLINE]; assert output score matches precomputed ceiling value within 0.01 tolerance

Boundary Condition: Past Deadline

Score equals maximum penalty value or triggers [OVERDUE_FLAG] = true when [CURRENT_TIME] exceeds [SLA_DEADLINE]

Score continues increasing without bound; score resets to zero; overdue condition not flagged

Set [CURRENT_TIME] = [SLA_DEADLINE] + 1 hour; assert [OVERDUE_FLAG] is true and score is at ceiling

Boundary Condition: Far Future

Score approaches [ORIGINAL_SCORE] * minimum multiplier when [CURRENT_TIME] is far from [SLA_DEADLINE]

Score is zero or negative; score exceeds [ORIGINAL_SCORE]; decay curve applies in wrong direction

Set [CURRENT_TIME] = [SLA_DEADLINE] - 30 days; assert score is within 5% of [ORIGINAL_SCORE] * min_multiplier

Input Validation: Missing Fields

Prompt returns structured error or null score with [MISSING_FIELD] flag when required inputs are absent

Model hallucinates plausible values for missing fields; returns score without indicating missing data

Send request with [ORIGINAL_SCORE] omitted; assert output contains error indicator, not a guessed score

Output Schema Compliance

Response matches [OUTPUT_SCHEMA] exactly: all required fields present, correct types, no extra fields

Missing [CURRENT_PRIORITY_SCORE]; extra commentary fields; numeric fields returned as strings

Validate output against JSON Schema; assert no schema violations and all required fields are non-null

Auditability: Parameter Trace

Output includes [DECAY_PARAMETERS] with curve type, half-life or decay rate, and multiplier range used in calculation

Decay parameters missing or inconsistent with actual score calculation; parameters present but values don't match formula

Recompute score from output parameters and inputs; assert computed score matches [CURRENT_PRIORITY_SCORE] within 0.001

Consistency Across Similar Inputs

Two items with identical [ORIGINAL_SCORE], [SLA_DEADLINE], and [CURRENT_TIME] produce identical scores

Score varies by more than 0.1% between identical inputs; model adds random jitter or hallucinates differences

Run same input 3 times; assert all [CURRENT_PRIORITY_SCORE] values are identical

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a simple decay function (linear or exponential). Use hardcoded parameters for half-life and max age. Skip schema validation initially—focus on getting the decay curve direction right.

Replace [DECAY_FUNCTION] with linear and set [HALF_LIFE_HOURS] to 24. Use a small test set of 5-10 items with known ages.

Watch for

  • Scores decreasing instead of increasing with age
  • Negative scores when age exceeds max bounds
  • Missing handling for items with no creation timestamp
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.