Skip to content
Showcase/Clinical Trial NLI
advancedtext

Clinical Trial NLI

Natural language inference for clinical trial reports, determining whether a given statement is entailed or contradicted by clinical trial evidence. Based on SemEval-2023 Task 7 (Jullien et al.).

Submit

Configuration Fileconfig.yaml

# Clinical Trial NLI
# Based on Jullien et al., SemEval 2023
# Paper: https://aclanthology.org/2023.semeval-1.307/
# Dataset: https://github.com/ai-systems/Task-7-SemEval-2023
#
# This task asks annotators to determine whether a statement about a clinical
# trial is entailed or contradicted by the provided evidence from the trial
# report. Annotators also provide an explanation of the evidence supporting
# their judgment.
#
# NLI Labels:
# - Entailment: The statement is supported by the clinical trial evidence
# - Contradiction: The statement is contradicted by the clinical trial evidence

annotation_task_name: "Clinical Trial NLI"
task_dir: "."

data_files:
  - sample-data.json

item_properties:
  id_key: "id"
  text_key: "text"

output_annotation_dir: "annotation_output/"
output_annotation_format: "json"

port: 8000
server_name: localhost

annotation_schemes:
  - annotation_type: radio
    name: nli_judgment
    description: "Is the statement entailed or contradicted by the clinical trial evidence?"
    labels:
      - "Entailment"
      - "Contradiction"
    keyboard_shortcuts:
      "Entailment": "1"
      "Contradiction": "2"
    tooltips:
      "Entailment": "The statement is supported by or can be inferred from the trial evidence"
      "Contradiction": "The statement conflicts with or is negated by the trial evidence"

  - annotation_type: text
    name: evidence_explanation
    description: "Explain which part of the evidence supports your judgment"

annotation_instructions: |
  You will see a statement about a clinical trial and the corresponding trial evidence.
  1. Read the statement carefully.
  2. Read the clinical trial evidence provided.
  3. Determine whether the statement is entailed (supported) or contradicted by the evidence.
  4. Write a brief explanation of which evidence supports your judgment.

html_layout: |
  <div style="padding: 15px; max-width: 800px; margin: auto;">
    <div style="background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 12px; margin-bottom: 12px;">
      <strong style="color: #1e40af;">Trial ID:</strong>
      <span style="font-size: 14px; margin-left: 8px; font-family: monospace;">{{trial_id}}</span>
    </div>
    <div style="background: #fef3c7; border: 1px solid #fde68a; border-radius: 8px; padding: 16px; margin-bottom: 16px;">
      <strong style="color: #92400e;">Statement:</strong>
      <p style="font-size: 16px; line-height: 1.7; margin: 8px 0 0 0;">{{text}}</p>
    </div>
    <div style="background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 16px; margin-bottom: 16px;">
      <strong style="color: #0369a1;">Trial Evidence:</strong>
      <p style="font-size: 15px; line-height: 1.6; margin: 8px 0 0 0;">{{evidence}}</p>
    </div>
  </div>

allow_all_users: true
instances_per_annotator: 50
annotation_per_instance: 2
allow_skip: true
skip_reason_required: false

Sample Datasample-data.json

[
  {
    "id": "clinical_nli_001",
    "text": "The treatment group showed statistically significant improvement in blood pressure levels compared to the placebo group.",
    "evidence": "Primary endpoint: Mean systolic blood pressure reduction was 12.3 mmHg (SD 4.1) in the treatment arm vs. 2.1 mmHg (SD 3.8) in the placebo arm (p < 0.001). The treatment demonstrated clinically meaningful blood pressure reduction at week 12.",
    "trial_id": "NCT04523817"
  },
  {
    "id": "clinical_nli_002",
    "text": "No adverse events were reported in the experimental group during the study period.",
    "evidence": "Safety outcomes: In the experimental group, 23 patients (15.3%) reported at least one adverse event, including headache (8.7%), nausea (4.0%), and fatigue (2.6%). Three serious adverse events were recorded, though none were deemed related to the intervention.",
    "trial_id": "NCT04198726"
  }
]

// ... and 8 more items

Get This Design

View on GitHub

Clone or download from the repository

Quick start:

git clone https://github.com/davidjurgens/potato-showcase.git
cd potato-showcase/semeval/2023/task07-clinical-trial-nli
potato start config.yaml

Details

Annotation Types

radiotext

Domain

NLPBiomedicalSemEval

Use Cases

Clinical NLIEvidence VerificationMedical Text Analysis

Tags

semevalsemeval-2023shared-taskclinical-trialsnlibiomedicalevidence

Found an issue or want to improve this design?

Open an Issue