Safe Biomedical NLI
Safe biomedical natural language inference task requiring annotators to determine entailment or contradiction between clinical premise-hypothesis pairs and provide reasoning. Based on SemEval-2024 Task 2 (Safe Biomedical NLI).
Configuration Fileconfig.yaml
# Safe Biomedical NLI
# Based on Jullien et al., SemEval 2024
# Paper: https://aclanthology.org/volumes/2024.semeval-1/
# Dataset: https://github.com/SemEval/semeval-2024-task2
#
# This task asks annotators to determine the entailment relationship
# between a clinical premise and hypothesis, focusing on safety-critical
# biomedical reasoning. Annotators must also provide their reasoning.
annotation_task_name: "Safe Biomedical 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: "Does the premise entail or contradict the hypothesis?"
labels:
- "Entailment"
- "Contradiction"
keyboard_shortcuts:
"Entailment": "1"
"Contradiction": "2"
tooltips:
"Entailment": "The premise supports or implies the hypothesis is true"
"Contradiction": "The premise contradicts or implies the hypothesis is false"
- annotation_type: text
name: reasoning
description: "Explain your reasoning for the entailment judgment."
annotation_instructions: |
You will be shown a clinical premise and a hypothesis. Your task is to:
1. Read the premise carefully, noting medical facts and conditions.
2. Read the hypothesis.
3. Determine whether the premise entails (supports) or contradicts the hypothesis.
4. Provide a brief explanation of your reasoning.
Note: Focus on the logical relationship, not your personal medical knowledge.
html_layout: |
<div style="padding: 15px; max-width: 800px; margin: auto;">
<div style="background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 16px; margin-bottom: 16px;">
<strong style="color: #0369a1;">Premise:</strong>
<p style="font-size: 16px; line-height: 1.7; margin: 8px 0 0 0;">{{text}}</p>
</div>
<div style="background: #fefce8; border: 1px solid #fde68a; border-radius: 8px; padding: 16px; margin-bottom: 16px;">
<strong style="color: #a16207;">Hypothesis:</strong>
<p style="font-size: 16px; line-height: 1.7; margin: 8px 0 0 0;">{{hypothesis}}</p>
</div>
<div style="background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 12px;">
<strong style="color: #166534;">Clinical Domain:</strong> <span>{{clinical_domain}}</span>
</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": "bionli_001",
"text": "A randomized controlled trial of 500 patients with type 2 diabetes showed that metformin reduced HbA1c levels by 1.2% over 12 months compared to placebo.",
"hypothesis": "Metformin is effective at lowering blood sugar levels in diabetic patients.",
"clinical_domain": "Endocrinology"
},
{
"id": "bionli_002",
"text": "The study found no statistically significant difference in survival rates between patients receiving the experimental chemotherapy regimen and those on standard treatment (p=0.42).",
"hypothesis": "The experimental chemotherapy improved patient survival compared to standard care.",
"clinical_domain": "Oncology"
}
]
// ... and 8 more itemsGet This Design
Clone or download from the repository
Quick start:
git clone https://github.com/davidjurgens/potato-showcase.git cd potato-showcase/semeval/2024/task02-safe-biomedical-nli potato start config.yaml
Details
Annotation Types
Domain
Use Cases
Tags
Found an issue or want to improve this design?
Open an IssueRelated Designs
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.).
Patient Forum Question Answering
Question answering and response classification for patient health forum posts, categorizing responses by type (medical advice, experience sharing, information request, emotional support). Based on SemEval-2022 Task 6 (Akhtar et al.).
Argument Reasoning in Civil Procedure
Legal argument reasoning task requiring annotators to answer multiple-choice questions about civil procedure by selecting the best answer and providing legal reasoning. Based on SemEval-2024 Task 5.