Inferensys

Prompt

Multi-Factor Evidence Weighting Prompt Template

A practical prompt playbook for using Multi-Factor Evidence Weighting Prompt Template 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 Multi-Factor Evidence Weighting prompt.

This prompt is designed for RAG pipeline architects and search ranking engineers who need to assign calibrated, auditable scores to retrieved passages before they enter answer generation or downstream selection. The job-to-be-done is explicit: take a set of retrieved passages and produce a weighted relevance score for each one, broken down by multiple quality signals—relevance to the query, recency of the information, authority of the source, and specificity of the evidence. The output is not a final answer; it is a structured scoring artifact that feeds into re-ranking, filtering, or evidence selection logic. Use this when your retrieval system returns a candidate set that is too large, too noisy, or too opaque to pass directly to a generator, and you need a transparent, factorized scoring layer that can be audited, tuned, and calibrated against human judgments.

This prompt assumes you already have a retrieval set—from vector search, keyword search, hybrid retrieval, or a combination of backends—and that each passage carries metadata such as a publication date, source identifier, and source type. The ideal user is someone who can supply a query, a list of passages with that metadata, and a configurable weighting profile that defines how much each factor (relevance, recency, authority, specificity) should contribute to the final score. You should not use this prompt when you lack source metadata, when the retrieval set is already small and uniformly high-quality, or when latency constraints demand a single-pass ranking approach without factor-level transparency. It is also the wrong tool if you need a final answer or a synthesized summary—this prompt scores evidence; it does not consume it.

Before deploying, you must pair this prompt with evaluation checks. At minimum, validate that the output schema is parseable and that factor scores fall within expected ranges. For high-stakes domains—legal, medical, financial—add a human review step where an expert spot-checks score justifications against the original passages. Calibrate the factor weights against a golden dataset of human-judged passage relevance before locking in production thresholds. Avoid the temptation to treat the model's scores as ground truth; they are signals that require ongoing monitoring for drift, position bias, and overconfidence on ambiguous passages. If you observe score distributions shifting over time or across retrieval batches, revisit your weighting profile and eval criteria before downstream systems ingest degraded rankings.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Multi-Factor Evidence Weighting prompt delivers calibrated, auditable scores—and where it introduces risk without additional safeguards.

01

Good Fit: RAG Re-Ranking Pipelines

Use when: you have a retrieval set that needs multi-signal ranking before answer generation. Guardrail: always run factor contribution auditability checks to ensure no single signal dominates without justification.

02

Good Fit: Compliance-Auditable Evidence Selection

Use when: downstream reviewers need to understand why specific passages were prioritized. Guardrail: require explicit factor breakdowns and justification strings in the output schema; log them alongside the final score.

03

Bad Fit: Real-Time Sub-50ms Decision Loops

Avoid when: latency budget is too tight for multi-factor LLM scoring. Guardrail: pre-compute authority and recency signals offline; use the prompt only for offline calibration or async audit, not per-query scoring.

04

Required Inputs: Calibrated Signal Sources

What to watch: garbage scores in, garbage weights out. Guardrail: validate that recency timestamps, authority metadata, and relevance pre-scores exist and are populated before invoking the weighting prompt.

05

Operational Risk: Score Dominance and Drift

What to watch: one factor such as recency can silently overwhelm all other signals after a data pipeline change. Guardrail: implement sensitivity analysis checks that flag when any single factor contributes more than 60% of the final weight.

06

Operational Risk: Overconfident Scoring on Ambiguous Passages

What to watch: the model assigns high-confidence weights to passages that are genuinely ambiguous. Guardrail: require confidence-interval outputs and route low-confidence passages to human review or a secondary verification prompt.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template for assigning calibrated, multi-factor evidence scores with explicit factor breakdowns and audit trails.

This template is the core instruction set for a model acting as an evidence weighting engine. It is designed to be dropped into a RAG pipeline after initial retrieval but before answer synthesis. The prompt forces the model to decompose its scoring into four explicit factors—relevance, recency, authority, and specificity—and produce a final weighted score. The square-bracket placeholders allow you to inject the user query, the list of retrieved passages, your desired output schema, and any domain-specific constraints without rewriting the core logic. Use this template when you need calibrated, auditable scores rather than a simple relevance sort.

text
You are an evidence weighting engine for a retrieval-augmented generation system. Your task is to evaluate each retrieved passage against the user query and assign a calibrated score based on four factors. You must provide a detailed breakdown for every passage so that downstream selection and audit are possible.

## INPUT
User Query: [QUERY]
Retrieved Passages:
[PASSAGES]

## SCORING FACTORS
For each passage, evaluate the following four factors independently on a scale of 0.0 to 1.0:

1. **Relevance**: How semantically aligned is the passage with the user's information need? Consider implicit intent, not just keyword overlap. A score of 1.0 means the passage directly addresses the core question.
2. **Recency**: How current is the information relative to the query's temporal requirements? If the query implies a need for recent information, penalize older passages. If the query is about a historical or timeless topic, recency should not be penalized. Use the publication date if available.
3. **Authority**: How credible is the source? Consider the source type (e.g., peer-reviewed journal, official documentation, personal blog), the author's or publisher's domain expertise, and any reputation signals present in the metadata. A score of 1.0 indicates a highly authoritative, trusted source for this domain.
4. **Specificity**: How detailed and precise is the evidence? A highly specific passage contains concrete facts, figures, or direct claims that support an answer. A vague passage that only provides general background context should receive a low score, even if it is topically relevant.

## WEIGHTED SCORE CALCULATION
Calculate a final weighted score using these default weights, which you may adjust if the query explicitly demands a different emphasis:
- Relevance: 40%
- Recency: 20%
- Authority: 20%
- Specificity: 20%

If you adjust the weights, you must explain why in the `weight_adjustment_rationale` field.

## OUTPUT SCHEMA
Return a valid JSON object conforming to this structure:
[OUTPUT_SCHEMA]

## CONSTRAINTS
[CONSTRAINTS]

## EXAMPLES
[EXAMPLES]

To adapt this template, start by populating [QUERY] with the user's original question and [PASSAGES] with the raw retrieval results, including any available metadata like source URLs and publication dates. The [OUTPUT_SCHEMA] placeholder should be replaced with a strict JSON schema that includes fields for passage_id, the four factor scores, the weighted_score, and a justification string. The [CONSTRAINTS] block is where you inject domain-specific rules, such as 'Always assign an authority score of 0.0 to passages from social media' or 'If no publication date is present, default recency to 0.5.' The [EXAMPLES] block is critical for calibration; provide 2–3 few-shot examples showing a passage, the correct factor breakdown, and the final score to anchor the model's behavior. Before deploying, run this prompt against a golden evaluation set where human experts have scored the same passages. Compare the model's factor scores and final weights to human judgments using correlation metrics and check for systematic biases like consistently over-scoring the first passage or penalizing short passages.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Multi-Factor Evidence Weighting Prompt. Each placeholder must be populated before the prompt is sent. Validation notes describe how to verify the input is well-formed before execution.

PlaceholderPurposeExampleValidation Notes

[QUERY]

The user question or information need that evidence is being scored against

What are the side effects of drug X in elderly patients?

Non-empty string check. Must contain a complete question or statement. Reject if only stop words or under 10 characters.

[PASSAGES]

Array of retrieved evidence passages to score, each with text content and metadata

[{"id":"p1","text":"...","source":"PubMed","date":"2024-03"}]

Must be a valid JSON array. Each object requires id and text fields. Reject if array is empty or contains duplicate ids. Max 50 passages per batch.

[WEIGHT_CONFIG]

Configurable weights for each scoring factor: relevance, recency, authority, specificity

{"relevance":0.40,"recency":0.20,"authority":0.25,"specificity":0.15}

Must be valid JSON object. All four keys required. Values must sum to 1.0 with tolerance of 0.01. Each weight must be between 0.0 and 1.0.

[RECENCY_THRESHOLD_DAYS]

Maximum age in days before recency score begins to decay for time-sensitive queries

365

Must be a positive integer. Null allowed if query is not time-sensitive. If set, passages older than this threshold receive progressively lower recency scores.

[AUTHORITY_SIGNALS]

Domain-specific authority indicators used to assess source credibility

["peer_reviewed","government_domain","citation_count","author_credentials"]

Must be a non-empty array of strings. Each signal must match a known authority indicator in the scoring rubric. Reject if signal names are unrecognized.

[OUTPUT_SCHEMA]

Expected JSON structure for scored passages including factor breakdowns and final weight

{"passage_id":"string","scores":{"relevance":0.0,"recency":0.0,"authority":0.0,"specificity":0.0},"weighted_total":0.0,"justification":"string"}

Must be valid JSON Schema or example structure. All four factor scores required. weighted_total must be computable from factor scores and weight config. justification field required for auditability.

[CALIBRATION_REFERENCES]

Optional human-judged reference scores for calibration comparison

[{"passage_id":"p1","human_scores":{"relevance":0.85,"recency":0.70,"authority":0.90,"specificity":0.60}}]

Null allowed. If provided, must be valid JSON array matching passage ids in [PASSAGES]. Each human_score value must be between 0.0 and 1.0. Used for eval comparison, not prompt execution.

PRACTICAL GUARDRAILS

Common Failure Modes

Multi-factor evidence weighting fails in predictable ways. These are the most common production failure modes and the guardrails that catch them before they corrupt downstream answers.

01

Recency Dominance Over Relevance

What to watch: Freshness scores overwhelm relevance signals, causing the system to select recent but tangentially related passages over older, directly relevant evidence. This is common when recency weights are not capped or when decay functions are too steep. Guardrail: Apply a recency ceiling so no passage can outrank a highly relevant one on freshness alone. Log cases where recency delta exceeds relevance delta by more than 2x for review.

02

Authority Blindness to Niche Experts

What to watch: Generic authority signals such as domain reputation or publisher size drown out niche expert sources that lack broad recognition but carry high domain specificity. A small research lab's preprint may be more authoritative than a general news article but scores lower. Guardrail: Include a specificity-weighted authority sub-score that boosts sources with deep topical alignment, even if their general authority signal is moderate. Audit false negatives where human reviewers would have selected the niche source.

03

Score Collapse from Uncalibrated Sub-Signals

What to watch: When relevance, recency, authority, and specificity scores operate on different scales, one signal dominates the weighted sum without the operator realizing it. A 0-100 relevance scale combined with a 0-1 recency scale silently makes recency irrelevant. Guardrail: Normalize all sub-scores to a common scale before aggregation. Run sensitivity analysis on each batch to detect signals contributing less than 5% of final score variance and flag for recalibration.

04

Overfitting to Surface Keyword Overlap

What to watch: The relevance sub-score rewards lexical overlap rather than semantic alignment, boosting passages that share query terms but address a different intent. A passage about 'Apple the company' scores high for a query about 'apple nutrition' because of shared tokens. Guardrail: Pair lexical relevance scoring with an intent-alignment check that penalizes passages where the inferred topic diverges from the query's information need. Log intent-mismatch cases with high relevance scores for human audit.

05

Confidence Inflation on Ambiguous Passages

What to watch: The model assigns high-confidence scores to passages it cannot reliably assess, particularly when evidence is technical, domain-specific, or contains mixed signals. Downstream selection treats these overconfident scores as trustworthy. Guardrail: Require the prompt to output a confidence interval alongside each factor score. Flag passages where the interval width exceeds a threshold for human review or automatic downgrading before final ranking.

06

Threshold Cutoff Removing Critical Context

What to watch: A global score threshold filters out passages that fall just below the cutoff but contain essential context for answering the query. This is especially dangerous when the threshold is applied before evidence synthesis rather than after ranking. Guardrail: Apply tiered filtering instead of hard cutoffs. Keep passages in a 'contextual reserve' tier even if they fall below the primary threshold, and allow the synthesis step to pull from the reserve when the primary set is insufficient. Monitor answer abstention rates before and after threshold changes.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test whether the multi-factor evidence weighting prompt produces calibrated, auditable scores before deploying to a production RAG pipeline. Each criterion targets a specific failure mode observed in evidence scoring systems.

CriterionPass StandardFailure SignalTest Method

Factor Score Auditability

Every weighted score includes a per-factor breakdown with a specific reason tied to passage content

Output contains only a final aggregate score without factor-level justification or the justification is generic and untethered to the passage

Parse the JSON output and assert that each scored passage has a non-empty factor_breakdown object with at least relevance, recency, authority, and specificity keys, each containing a score and a non-empty rationale string

Score Calibration Against Human Judgments

Model-assigned scores correlate with human expert scores at Spearman's ρ ≥ 0.7 on a held-out calibration set of 50 passage-query pairs

Model scores show weak or negative correlation with human judgments, or the model systematically over-scores low-quality passages

Run the prompt on a pre-labeled calibration dataset with 3 human annotators per passage; compute Spearman's rank correlation between median human score and model score; flag any passage where the absolute score difference exceeds 2 points on a 1-5 scale

Recency Decay Appropriateness

Freshness scores reflect the temporal requirements of the query: time-sensitive queries penalize older passages, while evergreen queries do not apply inappropriate decay

A passage from last year is scored as low recency for an evergreen query, or a 3-year-old passage receives a high recency score for a breaking-news query

Construct a test set with 10 time-sensitive queries and 10 evergreen queries with known publication dates; assert that recency scores for passages older than the query's temporal window are below the configured staleness threshold for time-sensitive queries, and that recency scores for evergreen queries show no significant negative correlation with passage age

Specificity vs. Relevance Discrimination

Specificity and relevance scores are independently assigned and do not collapse into a single dimension; vague passages that are on-topic receive high relevance but low specificity

A passage that is topically relevant but contains no concrete facts receives high scores on both relevance and specificity, indicating the model cannot distinguish general context from specific evidence

Include 5 vague-but-relevant passages in the test set; assert that specificity scores are at least 1 point lower than relevance scores on a 1-5 scale for these passages, and that the specificity rationale explicitly notes the absence of concrete claims or data

Authority Score Grounding

Authority scores are justified by observable source characteristics such as domain, author credentials, publication venue, or citation patterns, not by the passage's agreement with the query

The model assigns high authority to a passage simply because it supports the expected answer, or assigns low authority to a credible source without explanation

Audit a sample of 20 scored passages; for each, verify that the authority rationale references at least one source-level attribute such as domain, author, publisher, or peer-review status, and does not reference the passage's content alignment with the query

Confidence Interval Calibration

When confidence intervals are requested, the model expresses lower confidence for ambiguous or borderline passages and higher confidence for clear-cut assessments

The model assigns narrow confidence intervals to passages where factor signals conflict, or assigns wide intervals uniformly regardless of passage clarity

Construct a test set with 10 clear-cut passages where all factors align and 10 ambiguous passages where factors conflict; assert that the mean confidence interval width for ambiguous passages is at least 1.5x the mean width for clear-cut passages

Aggregation Weight Sensitivity

The final aggregated score is not dominated by a single factor when multiple factors are configured with non-zero weights; changing one factor's weight produces a proportional change in the final score

One factor such as relevance consistently accounts for more than 80% of the final score variance even when other factors are weighted equally, indicating the model is ignoring the weighting configuration

Run the prompt on the same passage set with two different weight configurations where one factor's weight is doubled; assert that the final score changes in the expected direction for at least 80% of passages and that no single factor explains more than 60% of the score variance under equal weighting

Output Schema Compliance

The output is valid JSON matching the specified schema with all required fields present and correctly typed

The output is missing required fields, contains malformed JSON, uses incorrect types such as strings where numbers are expected, or includes extra unstructured text outside the JSON object

Validate the raw model output against the [OUTPUT_SCHEMA] using a JSON Schema validator; assert zero validation errors; retry once with a schema-reminder prompt if validation fails, then flag for human review on second failure

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a small hand-labeled set of 10–15 passage-query pairs. Replace [FACTOR_WEIGHTS] with equal weights (0.25 each) and remove the calibration step. Use a single model call per passage rather than batching.

Watch for

  • Scores clustering around 0.5–0.7 without meaningful separation
  • Factor justifications that are generic ("seems relevant") rather than passage-specific
  • No baseline human judgments to compare against, so you won't know if the scoring is useful
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.