This prompt is designed for AI engineers and platform teams building deterministic context pruning and compression pipelines for long-running conversational AI systems. The core job-to-be-done is to programmatically rank every turn in a conversation history by its future utility, enabling the system to discard low-value turns when context windows are exceeded. You should use this prompt when you need a repeatable, auditable scoring mechanism that goes beyond simple recency-based eviction, and when you require a structured output that can be consumed directly by your application's context assembly logic. The ideal user is someone who already has a conversation history stored as structured turns and needs to make a hard decision about what to keep before making an LLM call.
Prompt
Salience Scoring Prompt for Conversation Turns

When to Use This Prompt
Define the job-to-be-done, ideal user, and constraints for the Salience Scoring Prompt for Conversation Turns.
This prompt is not a general-purpose summarizer or a replacement for a vector database. Do not use it when you need to retrieve information from external knowledge bases (that's a RAG retrieval job) or when you simply need a prose summary of the conversation (use a session summarization prompt instead). It is also not suitable for real-time, per-token streaming decisions; it operates on complete, discrete turns. The prompt assumes you have already segmented the conversation into turns with clear speaker roles. If your chat logs are unstructured or lack speaker attribution, you must preprocess them before invoking this salience scorer. The output is a ranked list with scores, not a compressed history—you will need a separate pruning step in your application code to act on these scores.
Before integrating this prompt, you must define your salience rubric based on your application's specific needs. A support bot might prioritize turns containing error codes and resolution steps, while a research copilot might prioritize hypothesis statements and data references. The prompt template includes a [RUBRIC] placeholder for this reason. Start by annotating 50–100 real conversations with your own salience judgments to establish a baseline, then use the inter-rater reliability checks described in the evaluation harness to calibrate the model's scoring against your human-annotated ground truth. Never deploy this prompt without a validation layer that checks for missing turns, score distribution anomalies, and schema compliance.
Use Case Fit
Where the Salience Scoring Prompt delivers value and where it creates risk. Use these cards to decide if this prompt belongs in your context pruning pipeline.
Good Fit: Deterministic Context Budgeting
Use when: you have a hard token limit and must programmatically discard turns. The prompt's structured rubric and ranked output enable deterministic pruning decisions without relying on opaque model heuristics. Guardrail: always validate that the pruned history still contains the system prompt and the most recent user turn.
Bad Fit: Real-Time Latency-Sensitive Chat
Avoid when: scoring must complete within a strict latency budget on every turn. Running a separate model call to score all prior turns adds overhead that can violate user-facing response time SLAs. Guardrail: run salience scoring asynchronously or only when the context budget is actually exceeded, not on every turn.
Required Input: Complete Turn History with Metadata
Risk: scoring accuracy degrades significantly without turn-level metadata such as speaker role, timestamp, and tool call outcomes. The model cannot reliably assess future utility from raw text alone. Guardrail: include a structured turn schema with role, timestamp delta, and a binary flag for whether the turn contains a decision or commitment.
Operational Risk: Inter-Rater Drift Over Time
Risk: the model's salience scoring distribution can drift as conversation patterns change, causing either over-retention (wasted budget) or under-retention (dropped critical context). Guardrail: periodically run the inter-rater reliability check against your human-annotated golden set and alert if Cohen's kappa falls below 0.7.
Bad Fit: Single-Turn or Stateless Interactions
Avoid when: your application handles isolated, stateless requests with no conversation history to prune. Salience scoring adds cost and latency with no benefit. Guardrail: check session turn count before invoking the prompt; skip entirely for sessions with fewer than the minimum pruning threshold.
Required Input: Domain-Specific Salience Rubric
Risk: a generic salience rubric produces scores that don't align with your application's actual information needs. Turns important for compliance or handoff may be discarded. Guardrail: customize the rubric with domain-specific examples of high-salience turns, including regulatory commitments, user corrections, and escalation triggers.
Copy-Ready Prompt Template
A reusable prompt for scoring conversation turns by salience, ready to copy, adapt, and integrate into a context pruning pipeline.
This template provides the core instruction set for a model to act as a salience scorer. It is designed to be dropped into a larger application harness where conversation history is fed in programmatically. The prompt uses square-bracket placeholders for all dynamic inputs, ensuring you can swap in different rubrics, conversation logs, and output schemas without rewriting the core logic. The goal is to produce a deterministic, ranked list of turns that your application can use to prune low-value context before the next LLM call.
textYou are a conversation salience scorer. Your task is to evaluate each turn in a multi-turn conversation and assign a salience score based on a defined rubric. The output will be used to deterministically prune the conversation history, retaining only the most critical turns for future context. ## INPUT ### Conversation History [CONVERSATION_HISTORY] ### Salience Rubric [RUBRIC] ### Output Schema [OUTPUT_SCHEMA] ## INSTRUCTIONS 1. **Parse the Input:** Read the full [CONVERSATION_HISTORY]. Each turn is a discrete unit of analysis. 2. **Apply the Rubric:** For each turn, evaluate its content against every dimension in the [RUBRIC]. A turn's score should reflect its decision relevance, factual density, and future utility. Do not score based on politeness or length alone. 3. **Generate Structured Output:** Produce a JSON object conforming to the [OUTPUT_SCHEMA]. The output must include a `scored_turns` array where each object contains the original `turn_id`, a `score`, and a `rationale`. 4. **Rank and Justify:** The `scored_turns` array must be sorted in descending order by `score`. The `rationale` field must cite specific evidence from the turn and the rubric dimension that most influenced the score. ## CONSTRAINTS - Do not modify the original turn text in the output. - If a turn is completely empty or contains only a greeting with no substantive content, assign it a score of 0. - If the rubric is ambiguous for a specific turn, explain the ambiguity in the `rationale` and assign a conservative (lower) score. - Output only the valid JSON object. Do not include any text outside the JSON structure.
To adapt this template, start by defining your [RUBRIC]. A strong rubric for a support copilot might include dimensions like 'Contains a Decision,' 'States a Constraint,' and 'Introduces a New Fact.' For a research assistant, you might prioritize 'States a Hypothesis' and 'Cites a Source.' The [OUTPUT_SCHEMA] should be a strict JSON schema you validate against in your application code. A common failure mode is scoring turns in isolation; ensure your rubric instructs the model to consider a turn's importance relative to the entire conversation. After generating scores, always run a validation check to confirm all turn_ids from the input are present in the output and that no scores fall outside your defined range. For high-stakes pruning, implement an inter-rater reliability check by running the prompt twice with a slightly different [RUBRIC] ordering and flagging sessions where the top-k turns diverge significantly for human review.
Prompt Variables
Required inputs for the Salience Scoring Prompt. Each variable must be populated before the prompt is assembled and sent to the model. Missing or malformed inputs are the most common cause of scoring inconsistency.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[CONVERSATION_HISTORY] | The full list of conversation turns to be scored, including speaker roles and timestamps | User: "How do I reset my password?" Assistant: "I can help with that. First, are you logged in?" | Must be a valid JSON array of turn objects. Each turn requires 'role', 'content', and 'turn_index' fields. Empty array is allowed but will produce an empty score list. |
[SALIENCE_RUBRIC] | The scoring dimensions and scale that define what makes a turn salient for this use case | {"dimensions": ["decision_relevance", "factual_density", "future_utility"], "scale": {"min": 1, "max": 5}} | Must be a valid JSON object with a 'dimensions' array of 1-5 named dimensions and a 'scale' object with integer min and max. Missing dimensions cause the model to invent its own criteria. |
[PRUNING_STRATEGY] | Instruction for how scores will be used, which shapes the model's scoring behavior | Retain top 10 turns by composite score. Discard turns scoring below 3 on decision_relevance. | Must be a non-empty string. Acceptable values include 'top_k', 'threshold', 'budget_aware', or a custom description. Vague strategies produce uncalibrated scores. |
[SESSION_METADATA] | Context about the session that helps the model weigh salience correctly | {"session_duration_minutes": 22, "user_type": "enterprise_admin", "primary_intent": "password_reset"} | Must be a valid JSON object. Allowed keys: 'session_duration_minutes', 'user_type', 'primary_intent', 'escalation_status'. Unknown keys are ignored. Null allowed if no metadata is available. |
[OUTPUT_SCHEMA] | The exact JSON schema the model must use to return scored turns | {"type": "array", "items": {"turn_index": "integer", "scores": {"decision_relevance": "integer"}}} | Must be a valid JSON Schema object. The 'items' definition must include 'turn_index' and a 'scores' object with one key per rubric dimension. Schema mismatch with the rubric causes parse failures. |
[FEW_SHOT_EXAMPLES] | Calibrated examples of scored turns that anchor the model's interpretation of the rubric | [{"turn": "User: I need to export all user data for GDPR.", "scores": {"decision_relevance": 5, "factual_density": 4}}] | Must be a JSON array of 2-5 example objects. Each example requires a 'turn' object matching the history schema and a 'scores' object matching the rubric dimensions. Fewer than 2 examples reduces inter-rater reliability. |
[INTER_RATER_REFERENCE] | Human-annotated salience scores for a subset of turns, used for calibration checks | [{"turn_index": 3, "annotator_scores": {"decision_relevance": 4}}] | Must be a JSON array or null. When provided, the prompt instructs the model to note alignment with human scores. Each entry requires 'turn_index' and 'annotator_scores' matching rubric dimensions. Null disables calibration instructions. |
Implementation Harness Notes
How to wire the salience scoring prompt into a production context pruning pipeline with validation, retries, and human review gates.
The salience scoring prompt is designed to operate as a deterministic filter inside a context pruning pipeline, not as a standalone chat interaction. In production, you will call this prompt once per conversation turn batch (or per full session) before the context window budget is exceeded. The output is a ranked list of turns with salience scores and a recommended retention cutoff. Your application layer should consume this JSON output and prune turns below the threshold before assembling the next model request. This prompt is not a replacement for summarization; it decides what to keep, not how to compress what remains.
Integration pattern: Wrap the prompt in a function that accepts a list of conversation turns and a token budget. Each turn should include the speaker role, message text, and a turn index. The function should: (1) format the turns into the [TURN_LIST] placeholder, (2) inject the [SALIENCE_RUBRIC] (your domain-specific scoring dimensions such as decision relevance, factual density, future actionability, and unresolved question presence), (3) set the [TOKEN_BUDGET] to the number of turns or tokens you can retain, and (4) call the model with response_format set to JSON mode using the provided [OUTPUT_SCHEMA]. Validate the response against the schema before pruning. If validation fails, retry once with the error message appended to the prompt. If the retry also fails, log the failure and fall back to a safe default: retain the most recent N turns and any turns containing explicit user corrections or unresolved questions.
Model selection and latency: Use a fast, instruction-following model for this task (GPT-4o-mini, Claude Haiku, or equivalent). Salience scoring is a high-frequency, cost-sensitive operation that runs before every major context assembly step. Avoid using large reasoning models here; the rubric is structured enough that a smaller model can produce reliable scores. Set a strict timeout (under 2 seconds) and implement a circuit breaker: if the scoring step fails or times out more than three times in a rolling window, skip scoring and retain all turns within the budget, emitting a monitoring alert. Human review gate: For high-stakes domains (healthcare, legal, finance), implement a sampling-based review where 5% of scored batches are sent to a human reviewer who compares the model's salience rankings against the rubric. Track inter-rater agreement over time and trigger a prompt revision if agreement drops below 0.8.
Logging and observability: Log every scoring call with the input turn count, output retention count, validation status, retry count, and latency. Attach the scored turn IDs to downstream model requests so you can trace whether pruned turns contained information that later proved necessary. If users frequently re-ask questions that were pruned, your salience rubric or threshold is too aggressive. What to avoid: Do not use this prompt to score turns one at a time; the model needs the full conversation context to assess relative salience. Do not prune turns before human-visible conversation review is complete if the session is subject to audit. And do not treat the salience score as a confidence measure for downstream reasoning; it is a ranking signal for pruning decisions only.
Expected Output Contract
Defines the strict JSON schema for the salience scoring output. Each turn receives a score and structured justification. Use this contract to build a post-processing validator before pruning logic consumes the output.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
salience_scores | Array of objects | Root must be an array. Length must equal the number of input turns. Reject if length mismatch. | |
salience_scores[].turn_id | String or Integer | Must match the [TURN_ID] from the input exactly. Reject on missing or non-matching IDs. | |
salience_scores[].total_score | Number (0.0-1.0) | Must be a float between 0.0 and 1.0 inclusive. Reject if out of range or non-numeric. | |
salience_scores[].decision_relevance | Number (0.0-1.0) | Must be a float between 0.0 and 1.0. Represents weight of the turn on the final outcome or action. | |
salience_scores[].factual_density | Number (0.0-1.0) | Must be a float between 0.0 and 1.0. Represents concentration of unique, verifiable facts introduced in the turn. | |
salience_scores[].future_utility | Number (0.0-1.0) | Must be a float between 0.0 and 1.0. Represents likelihood the turn content will be needed in subsequent conversation turns. | |
salience_scores[].justification | String | Must be a non-empty string (1-2 sentences). Must reference specific content from the turn. Reject if generic or empty. | |
salience_scores[].pruning_priority | String (Enum) | Must be one of: 'retain', 'compress', 'discard'. Reject on any other value. 'retain' requires total_score >= 0.7. |
Common Failure Modes
Salience scoring prompts are brittle in production because models struggle with consistent ordinal judgment, drift on rubric definitions, and fail silently on edge cases. These are the most common failure modes and how to guard against them.
Score Inflation on Neutral Turns
What to watch: The model assigns middling scores (e.g., 3/5) to nearly every turn when unsure, destroying the ranking signal needed for deterministic pruning. This happens most often when the rubric lacks sharp anchors for low-salience turns. Guardrail: Include scored few-shot examples of low-salience turns (greetings, acknowledgments, off-topic chatter) explicitly labeled as 1/5 with a justification. Validate score distribution variance in eval; if standard deviation drops below 0.8, flag the batch for review.
Recency Bias Overriding Decision Relevance
What to watch: The model inflates scores for recent turns and depresses scores for earlier turns that contain critical decisions or constraints, causing the pruner to drop essential context. This is a positional attention failure, not a semantic one. Guardrail: Randomize turn order in a separate validation pass and compare scores. If a turn's score shifts by more than 1 point when position changes, apply a positional debiasing factor or use a two-pass approach: score each turn independently, then rank globally.
Rubric Drift Across Long Sessions
What to watch: The model gradually shifts its interpretation of the salience rubric over a long scoring session, so turns at the end are scored against a different implicit standard than turns at the beginning. This makes pruning thresholds inconsistent. Guardrail: Re-anchor the rubric every N turns by re-inserting the full rubric definition and calibration examples as a system reminder. Monitor inter-rater reliability between the first 10 and last 10 scored turns in sessions exceeding 30 turns.
Factual Content Confused with Salience
What to watch: The model scores fact-dense turns highly even when those facts are irrelevant to the user's current goal or future decisions. A turn listing product specs gets a 5/5 while a turn stating a binding constraint gets a 3/5. Guardrail: Separate the rubric dimensions explicitly: "decision relevance" and "future utility" must be scored independently from "information density." Use a structured output schema that requires a separate score per dimension, and set the pruning threshold on decision relevance first.
Silent Failure on Empty or Corrupted Input
What to watch: The model receives an empty turn list, malformed JSON, or turns with missing fields and still produces a ranked output—either hallucinating turn content or assigning arbitrary scores. This passes schema validation but produces garbage pruning decisions. Guardrail: Add a pre-processing validation step that checks for minimum turn count, required fields per turn, and non-empty content before calling the scoring prompt. If validation fails, abort scoring and fall back to a safe retention policy (keep all turns or use recency-only pruning).
Inter-Rater Reliability Collapse on Ambiguous Turns
What to watch: Turns that are genuinely ambiguous—partial corrections, mid-edit messages, implicit references—produce wildly different scores across repeated runs or across human annotators. The model's confidence is high but the score is effectively random. Guardrail: Flag turns where the model's score deviates from human-annotated gold labels by more than 1 point. For production, implement a consistency check: re-score ambiguous turns with temperature=0.2 across 3 runs and flag any turn with a score range > 1 for human review or conservative retention.
Evaluation Rubric
Use this rubric to evaluate the quality of the salience scoring prompt's output before integrating it into a production context pruning pipeline. Each criterion targets a specific failure mode common in conversation turn scoring.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Schema Compliance | Output is valid JSON matching the [OUTPUT_SCHEMA] with all required fields present. | JSON parsing fails; required field like | Automated schema validation against the expected JSON Schema definition. |
Score Discrimination | Salience scores show clear variance (standard deviation > 0.5) across a 10-turn test session, with decisive turns scoring above 8 and small talk below 3. | All turns receive nearly identical scores (e.g., all 5s or 7s); no clear ranking emerges. | Calculate score variance on a golden dataset of mixed-signal conversations. |
Decision Relevance | Turns containing explicit decisions, user corrections, or confirmed actions are scored >= 8. | A turn where the user says 'Yes, proceed with the refund' is scored below 7. | Spot-check specific high-importance turns in a curated test set and assert a minimum score threshold. |
Factual Grounding | Turns introducing new, verifiable facts (dates, amounts, names) are scored higher than purely social or acknowledgment turns. | A turn stating 'My order number is 12345' is scored lower than 'Okay, thanks'. | Pairwise comparison test: assert the factual turn has a higher score than the social turn in the same context. |
Future Utility | Turns containing unresolved questions or pending actions receive a high | A turn ending with 'Can you check on that?' has | Assert the |
Inter-Rater Reliability | Scores from the prompt align with human-annotated salience scores with a Spearman rank correlation > 0.8. | A turn ranked as most important by a human is ranked in the bottom half by the prompt. | Run the prompt on a golden dataset with human annotations and calculate the Spearman correlation. |
Context Independence | A turn's score is stable when the surrounding conversation history is truncated to only the 3 preceding turns. | A turn's score changes by more than 2 points when earlier history is removed. | Re-score the same turn with varying history lengths and assert score stability within a tolerance. |
Hallucination Avoidance | The | The rationale states 'User expressed urgency' when the turn text contains no such signal. | Manual review of rationales on a test set, or use an LLM-as-judge to detect unsupported claims in the rationale. |
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 rubric and a small sample of 20-30 turns. Use a frontier model (GPT-4o, Claude 3.5 Sonnet) with the prompt as-is. Skip inter-rater reliability checks initially. Output raw JSON scores without schema enforcement.
Watch for
- Score inflation on turns with emotional content but low factual density
- Model confusing 'interesting' with 'salient'
- Missing [RUBRIC_DEFINITIONS] placeholder causing inconsistent scoring criteria

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