Inferensys

Prompt

Medical Literature Evidence Scoring Prompt Template

A practical prompt playbook for using Medical Literature Evidence Scoring 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

Understand the clinical decision-support job this prompt solves and when it should not be used.

This prompt is for clinical decision-support engineers who need to rank retrieved medical studies by evidence quality before generating answers. Use it when your RAG pipeline returns multiple studies for a clinical question and you must surface the strongest evidence first. The prompt applies evidence-based medicine (EBM) hierarchies, scoring each study by design, sample size, recency, and alignment with clinical practice guidelines. It outputs a ranked evidence table with strength-of-recommendation tags.

Do not use this prompt for primary diagnosis, for replacing systematic review methodologies, or when retrieved passages lack study metadata. This prompt assumes your retrieval step already returns study abstracts or structured metadata. It does not perform retrieval itself. The prompt is designed for a second-pass ranking step in a clinical RAG pipeline, not for generating final clinical recommendations without human review. If your system handles patient-specific data, you must add a human-in-the-loop gate after evidence ranking and before any answer generation.

Before deploying, validate that your retrieval pipeline consistently returns study design, sample size, publication date, and guideline references in a parseable format. The prompt will degrade silently if fed unstructured or incomplete metadata. Plan an eval suite that checks for conflating correlation with causation, over-weighting large observational studies over smaller RCTs, and missing retracted or superseded studies. If your use case involves real-time clinical decision-making, pair this prompt with a human approval step and log every ranked output for audit.

PRACTICAL GUARDRAILS

Use Case Fit

Where this prompt works, where it fails, and what you must provide before using it in a clinical decision-support pipeline.

01

Good Fit: Structured Evidence Ranking

Use when: you have a set of pre-retrieved study abstracts or metadata and need them ranked by evidence-based medicine (EBM) hierarchy. Guardrail: the prompt assumes studies are already fetched; do not use it for real-time literature search or retrieval.

02

Bad Fit: Diagnostic or Treatment Recommendations

Avoid when: the output will directly inform a specific patient's diagnosis or treatment without clinician review. Guardrail: this prompt scores evidence strength, not clinical appropriateness. Always route scored outputs through a human-in-the-loop approval step before patient-facing use.

03

Required Inputs: Study Metadata and Design Tags

What to watch: the prompt cannot infer study design, sample size, or recency from a title alone. Guardrail: each input record must include structured fields for study type, population size, publication year, and endpoint. Validate input completeness before calling the model.

04

Operational Risk: Conflating Correlation with Causation

Risk: the model may treat statistically significant associations as causal evidence, especially in observational studies. Guardrail: add an eval step that checks whether the output labels causal language inappropriately. Flag outputs that use 'causes' or 'prevents' for correlational studies.

05

Operational Risk: Guideline Drift Over Time

Risk: scored outputs become stale as clinical guidelines are updated. Guardrail: include a recency weight in the prompt and log the guideline version used. Schedule periodic re-evaluation of stored evidence scores against current guidelines.

06

Operational Risk: Missing Negative Studies

Risk: retrieval may surface only positive or highly cited studies, skewing the evidence table. Guardrail: explicitly instruct the prompt to note when negative or null-result studies are absent from the input set. Add a 'publication bias' flag to the output schema.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A production-ready prompt for ranking medical literature by evidence strength, study design, and clinical applicability.

This prompt template is designed to be pasted directly into your system instructions or user message for a medical literature evidence scoring task. It instructs the model to act as a clinical evidence analyst, ranking retrieved studies according to evidence-based medicine (EBM) hierarchies. The template uses square-bracket placeholders for all dynamic inputs, ensuring you can adapt it to different clinical questions, retrieved document sets, and output format requirements without modifying the core logic.

text
You are a clinical evidence analyst. Your task is to evaluate and rank the provided medical literature passages based on evidence-based medicine principles.

## INPUT
- Clinical Question: [CLINICAL_QUESTION]
- Patient Context (if any): [PATIENT_CONTEXT]
- Retrieved Studies: [RETRIEVED_STUDIES]

## RANKING CRITERIA
For each study, assign a score from 1 (weakest) to 5 (strongest) for each of the following dimensions. Provide a brief justification for each score.
1. Study Design: Score based on the EBM hierarchy (Systematic Review/Meta-Analysis of RCTs > RCT > Cohort Study > Case-Control > Case Series/Expert Opinion).
2. Sample Size and Power: Score based on the adequacy of the sample size to detect a clinically meaningful effect.
3. Recency: Score based on the publication date relative to the current standard of care. Penalize studies older than [RECENCY_THRESHOLD_YEARS] years unless they are seminal works.
4. Guideline Alignment: Score based on alignment with major clinical practice guidelines from [RELEVANT_GUIDELINE_BODIES].
5. Directness: Score based on how directly the study population, intervention, and outcome match the clinical question and patient context.

## OUTPUT FORMAT
Return a single JSON object with the following schema:
{
  "clinical_question": "string",
  "evidence_table": [
    {
      "study_id": "string",
      "title": "string",
      "study_design": "string",
      "scores": {
        "study_design": {"score": integer, "justification": "string"},
        "sample_size_power": {"score": integer, "justification": "string"},
        "recency": {"score": integer, "justification": "string"},
        "guideline_alignment": {"score": integer, "justification": "string"},
        "directness": {"score": integer, "justification": "string"}
      },
      "composite_score": float,
      "strength_of_recommendation": "Strong" | "Moderate" | "Weak" | "Insufficient",
      "key_limitations": ["string"]
    }
  ],
  "evidence_gaps": ["string"],
  "overall_assessment": "string"
}

## CONSTRAINTS
- Do not fabricate study details. If information for a score is missing from the retrieved text, note it as "Not reported" in the justification and assign a score of 1.
- The composite_score is the mean of the five dimension scores.
- Strength_of_recommendation mapping: >=4.0 is Strong, 3.0-3.9 is Moderate, 2.0-2.9 is Weak, <2.0 is Insufficient.
- Flag any study with a clear conflict of interest or industry funding in the key_limitations field.
- If no studies are provided or none are relevant, return an empty evidence_table and explain the gap.

To adapt this template for your application, replace the square-bracket placeholders with your data. The [CLINICAL_QUESTION] should be a focused, answerable question, ideally in PICO format. [PATIENT_CONTEXT] can include demographics, comorbidities, and preferences that affect directness scoring. [RETRIEVED_STUDIES] should be a pre-fetched set of study abstracts or summaries from your retrieval pipeline. Set [RECENCY_THRESHOLD_YEARS] based on the rate of change in the clinical domain—5 years is a common default, but fast-moving fields like oncology may require 2 years. [RELEVANT_GUIDELINE_BODIES] should list the specific organizations whose guidelines you want the model to reference, such as 'AHA/ACC' or 'NICE'. Before deploying, validate the JSON output against the schema and run evals to ensure the model does not conflate correlation with causation or overstate the strength of observational studies.

IMPLEMENTATION TABLE

Prompt Variables

Required and optional inputs for the Medical Literature Evidence Scoring prompt. Each placeholder must be populated before the prompt is sent to the model. Validation rules are designed for programmatic pre-flight checks in a production harness.

PlaceholderPurposeExampleValidation Notes

[CLINICAL_QUESTION]

The clinical question, expressed in PICO format (Population, Intervention, Comparison, Outcome) to frame evidence retrieval and scoring.

In adults with type 2 diabetes [P], does SGLT2 inhibitor therapy [I] compared to sulfonylurea [C] reduce cardiovascular mortality [O]?

Required. Must parse into four non-empty PICO components. Reject if fewer than three components are identifiable. Schema check: string, min 20 chars.

[RETRIEVED_STUDIES]

A list of study summaries retrieved from a biomedical database. Each entry must include title, abstract, study design, sample size, publication year, and journal.

[{"title": "...", "abstract": "...", "design": "RCT", "n": 5200, "year": 2023, "journal": "NEJM"}]

Required. Must be a valid JSON array with 1-20 objects. Each object requires title, abstract, design, n, and year fields. Schema check: array length > 0. Null not allowed.

[GUIDELINE_SOURCE]

The name and issuing body of the clinical practice guideline to align scoring against. Used to weight evidence by concordance with established recommendations.

American Diabetes Association (ADA) Standards of Care 2024

Optional. If provided, must be a non-empty string. If null, the prompt skips guideline-alignment scoring. Validation: string or null.

[EVIDENCE_HIERARCHY]

The evidence hierarchy to apply for study design ranking. Specifies the ordering from strongest to weakest study types.

["Systematic Review/Meta-Analysis", "RCT", "Cohort Study", "Case-Control", "Case Series", "Expert Opinion"]

Optional. Must be a JSON array of strings if provided. Defaults to standard EBM hierarchy if null. Validation: array with 3-10 unique string elements.

[OUTPUT_SCHEMA]

The expected JSON schema for the scored evidence table output. Defines fields, types, and constraints for each scored study.

{"type": "object", "properties": {"scored_studies": {"type": "array", "items": {"type": "object", "properties": {"title": {"type": "string"}, "score": {"type": "number", "minimum": 0, "maximum": 100}, "strength_of_recommendation": {"type": "string", "enum": ["Strong", "Moderate", "Weak", "Insufficient"]}}}}}}

Required. Must be a valid JSON Schema draft-07 object. Schema check: parseable JSON, contains scored_studies array with score and strength_of_recommendation fields.

[MAX_STUDIES]

The maximum number of studies to include in the final scored output. Controls output size and token usage.

10

Optional. Must be an integer between 1 and 50. Defaults to 10 if null. Validation: integer, 1 <= value <= 50.

[CONFIDENCE_THRESHOLD]

The minimum confidence score a study must achieve to be included in the output. Filters out low-quality evidence.

0.3

Optional. Must be a float between 0.0 and 1.0. Defaults to 0.0 if null. Validation: number, 0.0 <= value <= 1.0.

[DATE_CUTOFF]

The earliest publication year to consider. Studies published before this year are excluded or flagged as potentially outdated.

2019

Optional. Must be an integer year between 1990 and current year. If null, no date filtering is applied. Validation: integer, 1990 <= value <= current_year.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Medical Literature Evidence Scoring prompt into a clinical decision-support application with validation, retries, and human review gates.

This prompt is designed to operate as a scoring and ranking step within a larger clinical evidence pipeline, not as a standalone chatbot. The typical integration pattern is: retrieve candidate studies from a biomedical search API (PubMed, Semantic Scholar, or an internal vector store), pass the top-N results into this prompt along with the clinical question and patient context, receive a scored evidence table, and then feed the top-ranked studies into a downstream synthesis or answer-generation step. The prompt expects structured inputs and produces structured outputs, which makes it suitable for API-driven workflows where the model response is parsed by application code before any user-facing content is rendered.

Input assembly requires four components mapped to the prompt's placeholders: [CLINICAL_QUESTION] is the PICO-formatted query (Population, Intervention, Comparison, Outcome); [PATIENT_CONTEXT] contains relevant demographics, comorbidities, and medications as structured text; [RETRIEVED_STUDIES] is a JSON array of study objects with fields for title, abstract, study design, sample size, publication date, journal, and DOI; and [EVIDENCE_HIERARCHY] defines the ranking weights for study designs (e.g., meta-analysis > RCT > cohort > case-control > case series). The application layer should validate that each study object contains the required fields before assembly, rejecting or flagging records with missing abstracts or unknown study designs. For production systems, implement a pre-filter that removes retracted papers (checking against the PubMed retraction index or Retraction Watch database) and studies older than a configurable recency threshold unless the clinical domain explicitly requires historical evidence.

Output parsing and validation must be strict because downstream synthesis depends on correctly ranked evidence. The prompt requests a JSON output with a ranked_evidence array where each entry includes rank, study_id, composite_score, strength_of_recommendation, and scoring_rationale. Implement a post-processing validator that checks: (1) the response is valid JSON, (2) every study_id in the output matches an input study, (3) composite_score values are numeric and within the expected range, (4) strength_of_recommendation tags use only the allowed enum values (Strong, Moderate, Weak, Insufficient), and (5) no study appears more than once. If validation fails, use a retry loop with the error details appended to the prompt context—but cap retries at two attempts before logging the failure and routing to a human review queue. Log every scoring run with the input query, model version, output scores, and validation status for auditability.

Model selection and latency considerations matter here because evidence scoring requires careful reasoning over study methodology. Use a model with strong instruction-following and structured output capabilities (GPT-4o, Claude 3.5 Sonnet, or equivalent). For high-throughput clinical workflows, consider batching multiple clinical questions against the same retrieval set, but be aware that context windows fill quickly with full abstracts. If latency exceeds 5 seconds, implement a streaming parse that extracts the JSON array incrementally, or pre-score studies with a lightweight classifier model and use this prompt only for the top-20 candidates. For regulated clinical decision-support systems (FDA Class II or EU MDR software), this prompt output must be treated as decision support, not decision replacement—always route scored evidence through a clinician review interface that displays the rationale and allows re-ranking or dismissal before any recommendation reaches the patient.

Failure modes to monitor include: the model conflating correlation with causation when scoring observational studies (mitigate by requiring explicit causal language checks in eval), overweighting recent but small studies over older landmark trials (mitigate by tuning recency weights in the hierarchy definition), hallucinating study details when abstracts are truncated (mitigate by enforcing minimum abstract length in pre-processing), and producing inconsistent scores for the same study across similar clinical questions (mitigate by running periodic eval suites with golden-scored reference sets and measuring rank correlation metrics like Kendall's tau). The most dangerous failure is the model assigning a high strength-of-recommendation tag to a single small study that contradicts established guidelines—always cross-check top-ranked studies against a guideline reference database when available, and flag discrepancies for human review.

IMPLEMENTATION TABLE

Expected Output Contract

Fields, types, and validation rules for the scored evidence table output. Use this contract to build a parser, validator, or retry loop before the output reaches downstream consumers.

Field or ElementType or FormatRequiredValidation Rule

evidence_table

Array of objects

Must be a JSON array. Reject if missing or not an array.

evidence_table[].study_id

String

Must match the [STUDY_ID] from the input list. Reject if missing or unrecognized.

evidence_table[].study_design

String (enum)

Must be one of: Meta-analysis, Systematic Review, RCT, Cohort, Case-Control, Case Series, Expert Opinion. Reject unknown values.

evidence_table[].sample_size

Integer

Must be a positive integer. Reject if zero, negative, or non-numeric.

evidence_table[].recency_score

Integer (1-5)

Must be an integer between 1 and 5 inclusive. Reject out-of-range values.

evidence_table[].guideline_alignment

String (enum)

Must be one of: Aligned, Partially Aligned, Not Aligned, Insufficient Data. Reject unknown values.

evidence_table[].strength_of_recommendation

String (enum)

Must be one of: Strong, Weak, Insufficient. Reject unknown values.

evidence_table[].evidence_score

Float (0.0-1.0)

Must be a float between 0.0 and 1.0 inclusive. Reject out-of-range values. Score must be consistent with component inputs; flag if study_design is Meta-analysis and score is below 0.5.

evidence_table[].rationale

String

Must be a non-empty string. Must reference at least one specific study attribute (design, size, recency, or alignment). Reject generic rationales like 'good study'.

causality_warning

String or null

If present, must be a non-empty string flagging correlation-causation concerns. Null allowed. Reject if present but empty.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when scoring medical literature evidence and how to guard against it in production.

01

Conflating Correlation with Causation

What to watch: The model treats observational studies as proof of causation, assigning high scores to correlational findings without noting the study design limitation. Guardrail: Add a dedicated output field causality_confidence and require the model to explicitly state whether the study design supports causal inference. Eval must include test cases with clearly correlational claims.

02

Ignoring Sample Size and Statistical Power

What to watch: The model ranks a small, underpowered study above a large, well-designed trial because the smaller study's abstract language sounds more definitive. Guardrail: Require the prompt to extract and weight sample_size, power_analysis, and effect_size as explicit scoring dimensions. Add a validator that flags studies with n<30 receiving high strength-of-evidence scores.

03

Recency Bias Overriding Evidence Quality

What to watch: A recent but methodologically weak study outranks an older, landmark RCT simply because the publication date is newer. Guardrail: Implement a weighted scoring formula where study design and sample size dominate recency. Recency should act as a tiebreaker, not a primary ranker. Include a recency_weight parameter in the prompt template.

04

Guideline Misalignment and Conflicting Recommendations

What to watch: The model scores evidence highly that contradicts current major society guidelines without flagging the conflict. Guardrail: Add a guideline_alignment field that requires the model to check against a provided guideline reference set. If no guidelines are provided, the model must note this as a limitation. Eval must include test pairs with known guideline conflicts.

05

Abstract-Only Scoring Without Full-Text Verification

What to watch: The model assigns high scores based on abstract content alone, missing critical methodological flaws buried in the full text. Guardrail: Add a source_completeness flag to the output schema. If only an abstract is available, cap the maximum evidence score and require a warning. The prompt must instruct the model to note when full-text access would change the assessment.

06

Population Mismatch and Overgeneralization

What to watch: The model applies evidence from a study on one population (e.g., adults) to a query about a different population (e.g., pediatrics) without noting the mismatch. Guardrail: Require the prompt to extract study_population and query_population and compute a population_match_score. Flag any mismatch above a threshold for human review. Include pediatric-to-adult and comorbidity-mismatch test cases in eval.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test the Medical Literature Evidence Scoring prompt before shipping. Each criterion targets a known failure mode in evidence-based medicine ranking. Run these checks against a golden set of 20-50 scored study batches.

CriterionPass StandardFailure SignalTest Method

Study Design Hierarchy Adherence

Systematic reviews and RCTs score higher than observational studies for the same clinical question when recency and sample size are comparable

Case series or expert opinion outranks a relevant, recent, large-N RCT without explicit justification in the reasoning field

Golden-set comparison: 10 pairs where design hierarchy should dominate. Measure rank-order accuracy >= 95%

Sample Size Weighting Calibration

Within the same study design tier, larger-N studies receive higher scores. The score difference is proportional to the log-scale sample size difference

A study with N=50 scores within 5% of a study with N=5000 when all other factors are identical

Synthetic test: 5 study sets varying only sample size. Check monotonic score increase with N

Recency Penalty Application

Studies older than [RECENCY_THRESHOLD_YEARS] receive a recency penalty that increases with age. Landmark studies flagged as [IS_LANDMARK=true] are exempt

A 15-year-old non-landmark study outscores a 2-year-old study of identical design and sample size

Temporal drift test: 8 studies with identical metadata except publication year. Verify penalty curve matches spec

Guideline Alignment Tag Accuracy

Studies explicitly cited by a guideline from [AUTHORITATIVE_BODY_LIST] receive the guideline-aligned tag. Studies contradicting a guideline receive a conflict flag, not a penalty

A study that contradicts a major guideline is scored lower solely due to the contradiction rather than flagged separately

Tag audit: 15 studies with known guideline relationships. Check tag precision and recall >= 0.95

Confidence Interval Reporting

When [OUTPUT_SCHEMA] requires effect-size CI, the field is populated from the abstract or full text. Null is allowed only when CI is absent from the source

CI field contains fabricated values or is null when the abstract explicitly reports a 95% CI

Source-grounding check: 20 outputs compared against source PDFs. CI fabrication rate must be 0%

Correlation vs. Causation Language

Observational study findings use associative language (associated with, linked to). RCT findings may use causal language (reduces, prevents) when supported by the design

An observational study output contains causal claims such as 'X prevents Y' or 'X causes Y' without a qualifying statement about study design limitations

Keyword scan: detect causal verbs in observational study rows. Flag rate must be < 2% in test set

Strength-of-Recommendation Tag Consistency

Grade A recommendations require consistent Level 1 evidence. Grade B requires Level 2 or extrapolated Level 1. Grade C/D require Level 3-5 or any level with conflicting results

A single small-N observational study receives a Grade A recommendation tag

Rule-based validator: apply GRADE criteria as post-processing check. Inconsistency rate must be 0% on golden set

Missing Evidence Handling

When [INPUT_STUDIES] contains fewer than [MIN_STUDIES_FOR_SCORING], the output includes an insufficiency flag and abstains from producing a ranked table

System produces a ranked table with 1-2 studies and no insufficiency warning

Boundary test: submit batches of 0, 1, and 2 studies. Verify abstention behavior matches spec

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a small set of 5-10 retrieved abstracts. Use a frontier model (GPT-4o, Claude 3.5 Sonnet) without strict schema enforcement. Focus on getting the evidence hierarchy logic right before adding validation layers.

code
You are a clinical evidence reviewer. Score the following retrieved studies by study design, sample size, recency, and alignment with [CLINICAL_QUESTION].

Use the Oxford Centre for Evidence-Based Medicine levels.

Studies:
[RETRIEVED_ABSTRACTS]

Output a ranked table with columns: Study ID, Design, Level of Evidence, Sample Size, Recency Score (1-5), Guideline Alignment (1-5), Overall Score (1-10), Strength of Recommendation Tag.

Watch for

  • Model conflating statistical significance with clinical significance
  • Missing explicit recency thresholds (what counts as "recent" for this domain?)
  • No handling of conflicting evidence across studies
  • Output format drift when study count varies
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.