Inferensys

Prompt

Evidence Weight Aggregation Prompt for Multiple Signals

A practical prompt playbook for using Evidence Weight Aggregation Prompt for Multiple Signals 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

Define the job, ideal user, required inputs, and operational boundaries for the Evidence Weight Aggregation Prompt.

This prompt is for RAG pipeline architects and search ranking engineers who need to combine multiple independent evidence quality signals into a single, defensible ranking score. The job-to-be-done is aggregation: you already have sub-scores for relevance, recency, authority, specificity, and query alignment—likely produced by upstream scoring prompts or retrieval systems—and you need a final fused score that respects configurable signal importance. The ideal user is someone integrating this into a production re-ranking step where downstream answer generation or citation selection depends on a stable, explainable evidence ordering.

Use this prompt when you have heterogeneous signal sources with different scales or distributions and you need normalized aggregation with auditability. It is particularly valuable when signal importance varies by use case—for example, recency might dominate in news search while authority dominates in regulatory research. The prompt includes sensitivity analysis checks that detect when one signal overwhelms others, and dominance detection that flags cases where a single sub-score effectively determines the ranking. Do not use this prompt when you have only one signal, when sub-scores are already on a unified calibrated scale, or when you need raw score normalization without weighted aggregation. It is also not a replacement for upstream scoring prompts that generate the individual sub-scores.

Before wiring this into production, ensure each upstream sub-score is well-calibrated and that you have defined your signal importance weights based on domain requirements, not arbitrary defaults. The prompt expects structured inputs with explicit sub-scores per passage. If your upstream scorers produce inconsistent or unscaled outputs, normalize them before aggregation. For high-stakes domains like legal or medical evidence ranking, always include human review of the aggregated scores and the sensitivity analysis output before using the ranking to generate user-facing answers. The next section provides the copy-ready prompt template you can adapt.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Evidence Weight Aggregation Prompt delivers reliable multi-signal ranking and where it introduces operational risk.

01

Good Fit: Multi-Signal RAG Re-Ranking

Use when: you have multiple independent quality signals (relevance, recency, authority, specificity) that must be combined into a single ranked list. Guardrail: require each sub-score to be produced and logged separately before aggregation so signal dominance can be audited.

02

Bad Fit: Single-Signal or Binary Decisions

Avoid when: you only have one quality dimension or need a simple pass/fail filter. The aggregation overhead adds latency and complexity without benefit. Guardrail: use a single-factor scoring prompt or a threshold filter instead.

03

Required Inputs: Calibrated Sub-Scores

Risk: garbage sub-scores produce garbage aggregates. If upstream relevance or authority scores are uncalibrated, the weighted combination amplifies errors. Guardrail: validate each sub-score pipeline independently before wiring them into the aggregation prompt.

04

Operational Risk: Signal Dominance

Risk: one signal, such as recency, can overwhelm all others and hide relevance failures. Guardrail: include explicit dominance detection in the prompt output, flagging any case where a single factor contributes more than 60% of the final score.

05

Operational Risk: Weight Drift in Production

Risk: hardcoded signal weights that made sense during development become misaligned as retrieval corpora or user behavior change. Guardrail: treat weights as configurable parameters, not prompt constants, and run sensitivity analysis weekly.

06

Boundary: When Human Review Is Required

Risk: aggregated scores can mask individual signal failures that a human would catch. Guardrail: escalate to human review when any sub-score falls below its minimum threshold, even if the aggregate score passes.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt for aggregating multiple evidence quality signals into a final ranking score with sensitivity analysis and dominance detection.

The prompt below accepts a set of pre-computed sub-scores for a single evidence passage—relevance, recency, authority, specificity, and query alignment—and produces an aggregated weight with a detailed breakdown. It is designed to be wired into a re-ranking step of a RAG pipeline where multiple scoring models have already produced raw signals. The prompt forces the model to explain its aggregation logic, detect when one signal dominates the final score, and flag sensitivity risks where small changes in a sub-score would flip the ranking order.

text
You are an evidence scoring aggregator for a retrieval-augmented generation pipeline. Your job is to combine multiple evidence quality sub-scores into a single aggregated weight and explain your reasoning.

## INPUT
- Passage ID: [PASSAGE_ID]
- Passage text: [PASSAGE_TEXT]
- Query: [QUERY]
- Relevance score (0.0–1.0): [RELEVANCE_SCORE]
- Recency score (0.0–1.0): [RECENCY_SCORE]
- Authority score (0.0–1.0): [AUTHORITY_SCORE]
- Specificity score (0.0–1.0): [SPECIFICITY_SCORE]
- Query-alignment score (0.0–1.0): [QUERY_ALIGNMENT_SCORE]
- Signal importance weights: [SIGNAL_IMPORTANCE_WEIGHTS]
  - relevance_weight: [RELEVANCE_WEIGHT]
  - recency_weight: [RECENCY_WEIGHT]
  - authority_weight: [AUTHORITY_WEIGHT]
  - specificity_weight: [SPECIFICITY_WEIGHT]
  - query_alignment_weight: [QUERY_ALIGNMENT_WEIGHT]
- Aggregation method: [AGGREGATION_METHOD]  // one of: weighted_sum, weighted_product, harmonic_mean
- Sensitivity threshold: [SENSITIVITY_THRESHOLD]  // e.g., 0.05 for flagging score changes that would alter ranking

## OUTPUT SCHEMA
Return a JSON object with this exact structure:
{
  "passage_id": string,
  "aggregated_weight": number,  // 0.0–1.0
  "aggregation_method": string,
  "factor_contributions": {
    "relevance_contribution": number,
    "recency_contribution": number,
    "authority_contribution": number,
    "specificity_contribution": number,
    "query_alignment_contribution": number
  },
  "dominance_detected": boolean,
  "dominant_signal": string | null,  // name of signal if one contributes >50% of total weight
  "dominance_explanation": string | null,
  "sensitivity_analysis": {
    "most_sensitive_signal": string,
    "score_change_to_flip_tier": number | null,  // how much this signal must change to move passage up/down a relevance tier
    "tier_boundary_proximity": "high" | "medium" | "low"  // how close the aggregated weight is to a tier boundary
  },
  "aggregation_notes": string,  // brief explanation of the aggregation result
  "quality_flags": string[]  // any concerns: ["single_signal_dominance", "high_sensitivity", "low_confidence_input", "missing_signal"]
}

## CONSTRAINTS
1. Apply the specified aggregation method exactly. Do not substitute.
2. If any sub-score is missing or null, set aggregated_weight to null and list "missing_signal" in quality_flags.
3. Flag dominance when any single factor_contribution exceeds 50% of the aggregated_weight.
4. For sensitivity analysis, calculate how much the most_sensitive_signal must change to cross the nearest tier boundary. Use tier boundaries at 0.0–0.3 (low), 0.31–0.7 (medium), 0.71–1.0 (high).
5. If the passage text is empty or clearly unrelated to the query, set aggregated_weight to 0.0 and explain in aggregation_notes.
6. Do not invent sub-scores. Use only the values provided.

## EXAMPLES
[EXAMPLES]

## RISK LEVEL
[RISK_LEVEL]  // "low" | "medium" | "high" — if high, add explicit human-review recommendation in aggregation_notes

Adapt this template by adjusting the [SIGNAL_IMPORTANCE_WEIGHTS] to reflect your domain priorities. For legal document retrieval, authority_weight might dominate. For news summarization, recency_weight should be elevated. The [AGGREGATION_METHOD] parameter lets you switch between weighted_sum for linear combination, weighted_product for multiplicative interaction where a single zero score collapses the result, or harmonic_mean to penalize variance across signals. The [SENSITIVITY_THRESHOLD] controls how aggressively the model flags passages that could shift tiers with minor score changes—set this lower (0.02–0.03) for high-stakes ranking where stability matters. Replace [EXAMPLES] with 2–3 worked examples showing correct aggregation for passages at different quality levels, including one edge case where a signal is missing or a passage is clearly irrelevant. Set [RISK_LEVEL] to "high" when the downstream system makes automated decisions from ranked evidence without human review; this instructs the model to include explicit cautionary language in aggregation_notes.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Evidence Weight Aggregation Prompt. Each placeholder must be populated before the prompt is sent. Validation notes describe how to programmatically verify the input before execution.

PlaceholderPurposeExampleValidation Notes

[EVIDENCE_ITEMS]

Array of evidence objects, each containing pre-computed sub-scores and metadata for aggregation

[{"id":"doc-1","relevance":0.85,"recency":0.72,"authority":0.90,"specificity":0.68,"query_alignment":0.81,"source":"journal-a","date":"2024-11-15"}]

Must be a valid JSON array. Each item must contain all five sub-score fields as floats between 0.0 and 1.0. Reject if any sub-score is missing or out of range.

[SIGNAL_WEIGHTS]

Configurable importance weights for each evidence quality signal that control how sub-scores combine into the final aggregated score

{"relevance":0.35,"recency":0.15,"authority":0.20,"specificity":0.15,"query_alignment":0.15}

Must be a valid JSON object with all five signal keys present. Values must be floats between 0.0 and 1.0. Sum must equal 1.0 within a tolerance of 0.01. Reject if any key is missing or sum deviates beyond tolerance.

[AGGREGATION_METHOD]

The mathematical method used to combine weighted sub-scores into a final evidence score

weighted_sum

Must be one of: weighted_sum, weighted_geometric_mean, weighted_harmonic_mean, or max_weighted. Reject unrecognized values. Default to weighted_sum if null.

[SENSITIVITY_THRESHOLD]

Threshold ratio that triggers a dominance warning when one signal's weighted contribution exceeds others by this factor

0.60

Must be a float between 0.0 and 1.0. If null, default to 0.50. Reject values outside range. Used to detect when a single signal overwhelms the aggregation.

[OUTPUT_SCHEMA]

Expected structure for the aggregated output, including score fields, breakdowns, and warnings

{"include_breakdown":true,"include_dominance_warnings":true,"include_confidence":true,"sort_by":"aggregated_score","sort_order":"descending"}

Must be a valid JSON object with boolean fields for include_breakdown, include_dominance_warnings, and include_confidence. sort_by must be one of: aggregated_score, relevance, recency, authority, specificity, or query_alignment. sort_order must be asc or desc.

[NORMALIZATION_METHOD]

How raw sub-scores are normalized before aggregation when input scores come from different scoring systems

min_max

Must be one of: min_max, z_score, softmax, or none. If none, raw scores are used as-is. Reject unrecognized values. Required when combining scores from heterogeneous retrievers.

[MIN_EVIDENCE_COUNT]

Minimum number of evidence items required before aggregation proceeds; used to prevent unstable rankings from too few samples

3

Must be a positive integer. If the length of [EVIDENCE_ITEMS] is less than this value, the prompt should return an insufficient-data error instead of attempting aggregation. Default to 2 if null.

PRACTICAL GUARDRAILS

Common Failure Modes

When aggregating multiple evidence quality signals into a final ranking score, these failure modes surface first in production. Each card identifies a specific breakage pattern and the guardrail that prevents it.

01

Single-Signal Dominance

What to watch: One signal such as recency overwhelms all others, causing the aggregated score to ignore relevance or authority entirely. A 2-hour-old irrelevant document outranks a 2-day-old authoritative source. Guardrail: Apply per-signal contribution caps and run dominance detection checks that flag any passage where a single factor exceeds 60% of the total score.

02

Score Scale Incompatibility

What to watch: Relevance is scored 0-1, recency is scored 0-100, and authority uses categorical labels. Raw aggregation produces nonsense because the scales are not normalized before weighting. Guardrail: Normalize all sub-scores to a common 0-1 scale before aggregation. Validate that each signal's distribution is comparable before combining.

03

Missing Signal Default Collapse

What to watch: When a passage lacks a publication date or authority metadata, the aggregation silently assigns a default of zero or mid-scale, distorting the final ranking. Guardrail: Require explicit null handling per signal. When a signal is missing, reduce its weight to zero and redistribute across remaining signals rather than imputing a guess.

04

Weight Configuration Drift

What to watch: Signal weights tuned for one query domain such as news are applied unchanged to another such as legal research, where recency should matter far less than authority. Guardrail: Store weights as query-type-specific configurations. Validate that the active weight profile matches the detected query domain before scoring begins.

05

Overconfident Low-Evidence Scoring

What to watch: The aggregation produces a confident high score for a passage that has only one strong signal and weak or missing signals everywhere else, masking the evidence gap. Guardrail: Attach a confidence interval to every aggregated score. Flag passages where fewer than half of the configured signals contributed meaningful data.

06

Correlated Signal Double-Counting

What to watch: Relevance and specificity scores are highly correlated in practice, so weighting both independently inflates passages that are merely on-topic rather than genuinely strong evidence. Guardrail: Run inter-signal correlation checks on each retrieval batch. When two signals exceed a correlation threshold, merge them or reduce their combined weight to avoid double-counting.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test the Evidence Weight Aggregation Prompt before shipping. Each criterion targets a known failure mode in multi-signal scoring pipelines.

CriterionPass StandardFailure SignalTest Method

Signal Dominance Detection

No single signal contributes more than 60% of the final score unless explicitly configured as dominant

One signal score is 0.95 and all others are below 0.3, but the final aggregated score is above 0.85 without a dominance flag in the output

Run 10 test cases where one signal is deliberately extreme and others are moderate; check that the output includes a dominance_warning field when the condition is met

Weight Configuration Adherence

Final aggregated score reflects the provided [SIGNAL_WEIGHTS] map within a 5% tolerance

The prompt ignores a configured weight of 0.0 for recency and still factors recency into the final score

Supply a weight map with one signal set to 0.0; verify that signal's contribution is null or 0.0 in the score_breakdown output

Sensitivity Analysis Output

Output includes a sensitivity_analysis object showing how the final score changes when each sub-score varies by ±0.1

The sensitivity_analysis field is missing, empty, or shows identical values for all signals indicating no actual analysis was performed

Parse the output JSON and confirm sensitivity_analysis exists with per-signal delta values that differ from the base score

Score Normalization Consistency

All sub-scores and the final aggregated score fall within the [SCORE_RANGE] bounds, typically 0.0 to 1.0

A sub-score of 1.5 appears in the breakdown or the final score exceeds the configured maximum

Validate all numeric score fields against the [SCORE_RANGE] schema; flag any out-of-bounds value as a failure

Missing Signal Handling

When a sub-score is null or missing in [INPUT_SIGNALS], the prompt excludes it from aggregation and notes the exclusion

The prompt hallucinates a value for a missing signal or fails with an unhandled error instead of producing a valid output

Provide an input where recency_score is null; check that the output excludes recency from the breakdown and includes an excluded_signals array

Justification Traceability

Each signal's contribution to the final score is explained with a specific reference to the input value and applied weight

Justifications are generic statements like 'recency was considered' without mentioning the actual input score or weight applied

Spot-check 3 justifications per test case; each must contain the signal name, its input value, and its configured weight

Conflict Flagging Between Signals

When two signals point in opposite directions with a delta greater than [CONFLICT_THRESHOLD], the output includes a signal_conflict flag

A case where relevance is 0.9 and authority is 0.1 produces no conflict warning in the output

Feed cases with deliberate high-vs-low signal pairs; assert that signal_conflict is true when the delta exceeds the configured threshold

Aggregation Method Compliance

The aggregation method used matches the configured [AGGREGATION_METHOD] field exactly

The prompt defaults to weighted average when [AGGREGATION_METHOD] is set to 'geometric_mean' or 'harmonic_mean'

Test with each supported method; verify the score_breakdown.method field matches the input configuration and the math is correct for that method

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Evidence Weight Aggregation prompt into a production RAG pipeline with validation, retries, and audit logging.

The Evidence Weight Aggregation prompt is not a standalone tool; it is a scoring node inside a retrieval pipeline. Wire it after your multi-signal scorers (relevance, recency, authority, specificity) have produced raw sub-scores for each passage. The prompt consumes a structured input object containing per-passage sub-scores and signal importance weights, and it returns an aggregated final score with a sensitivity analysis. In a typical RAG harness, this prompt runs as a map-reduce step: map over each passage to compute its aggregated weight, then sort the scored passages before passing the top-k to the answer generation prompt. Because this prompt performs arithmetic reasoning over multiple numerical inputs, prefer a model with strong quantitative reasoning capabilities (e.g., GPT-4o, Claude 3.5 Sonnet) rather than a lightweight model optimized for simple classification.

Validation is the first line of defense. Before calling the prompt, validate that all sub-scores are present, numeric, and within the expected range (e.g., 0.0 to 1.0). After receiving the output, run a structural validator that checks: (1) the aggregated_score field is a number between 0.0 and 1.0, (2) the sensitivity_analysis object contains a dominant_signal field and a dominance_detected boolean, (3) each sub-score contribution is accounted for in the factor_contributions map, and (4) the confidence_interval has both lower and upper bounds. If validation fails, retry once with the same input and a stronger constraint instruction appended to the prompt. If the retry also fails, log the passage ID and raw sub-scores for manual review rather than silently passing a malformed score downstream. For high-stakes domains (legal, medical, financial), add a human review queue for any passage where dominance_detected is true and the dominant signal accounts for more than 70% of the final weight.

Logging and observability are critical because aggregated scores drive downstream answer selection. Log the full input sub-scores, the aggregated output, the model version, and the prompt template hash for every invocation. Store these in a structured format (JSON) in your observability platform so you can trace why a specific passage was ranked above another. When debugging ranking anomalies, compare the logged factor_contributions against your expected signal importance weights. A common failure mode is the model ignoring your explicit signal importance configuration and applying its own implicit weighting. To catch this, add an eval step that computes the expected contribution of each signal (sub-score × importance weight) and compares it to the model's reported factor_contributions. Flag any invocation where the deviation exceeds 0.15 for any single factor. For cost-sensitive pipelines, cache the prompt prefix containing the scoring rubric and output schema; only the per-passage sub-score object changes between calls, making this prompt highly cache-friendly when using a provider that supports prefix caching.

When integrating this prompt into a multi-source retrieval pipeline, normalize raw scores from different retrievers (vector, keyword, hybrid) before passing them as sub-scores. The prompt expects sub-scores on a consistent 0.0–1.0 scale. If your retrievers produce scores on different scales (e.g., cosine similarity 0.7–1.0, BM25 0–50), apply min-max normalization per source before aggregation. Do not rely on the model to handle incompatible score distributions; it will produce misleading aggregated weights. For production deployments, wrap the prompt call in a circuit breaker that falls back to a simple weighted average if the model API is unavailable or consistently returns invalid outputs. The fallback should be deterministic and auditable: compute sum(sub_score[i] × importance_weight[i]) / sum(importance_weights) and log that the fallback was used. This ensures your RAG pipeline degrades gracefully rather than failing entirely when the scoring model is unreachable.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a single aggregation method (weighted sum). Use hardcoded signal weights instead of configurable importance parameters. Skip sensitivity analysis and dominance detection. Accept raw JSON output without schema enforcement.

code
Aggregate the following evidence quality sub-scores into a single final score using a weighted sum:
- Relevance: [RELEVANCE_SCORE]
- Recency: [RECENCY_SCORE]
- Authority: [AUTHORITY_SCORE]
- Specificity: [SPECIFICITY_SCORE]
- Query Alignment: [ALIGNMENT_SCORE]

Weights: relevance=0.35, recency=0.15, authority=0.25, specificity=0.15, alignment=0.10

Watch for

  • Missing schema checks letting malformed scores through
  • Overly broad instructions producing narrative instead of structured output
  • No calibration against human judgments, so score quality is unknown
  • Single aggregation method hiding when one signal dominates
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.