Skip to content
beginnertext

MultiNLI - Multi-Genre Natural Language Inference

Natural language inference across multiple genres of text, based on the Multi-Genre NLI corpus (Williams et al., NAACL 2018). Annotators classify premise-hypothesis relationships with genre-diverse examples from fiction, government, travel, and more.

Submit

Configuration Fileconfig.yaml

This Potato config reproduces the annotation task. Save it as config.yaml and run potato start config.yaml to try it.

yaml
# MultiNLI - Multi-Genre Natural Language Inference
# Based on Williams et al., NAACL 2018
# Paper: https://aclanthology.org/N18-1101/
# Dataset: https://cims.nyu.edu/~sbowman/multinli/
#
# This task presents premise-hypothesis pairs drawn from multiple genres
# of text including fiction, government reports, travel guides, and more.
# Annotators classify the inferential relationship as entailment,
# contradiction, or neutral, and provide reasoning.
#
# Genres include: fiction, government, telephone, travel, slate,
# letters, oup, verbatim, nineeleven, facetoface
#
# Annotation Guidelines:
# 1. Note the genre of the text for context
# 2. Read the premise sentence carefully
# 3. Read the hypothesis sentence
# 4. Determine the relationship between them
# 5. Provide a brief reasoning for your choice

annotation_task_name: "MultiNLI - Multi-Genre Natural Language Inference"
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:
  # Step 1: Classify the relationship
  - annotation_type: radio
    name: nli_label
    description: "What is the inferential relationship between the premise and hypothesis?"
    labels:
      - "Entailment"
      - "Contradiction"
      - "Neutral"
    keyboard_shortcuts:
      "Entailment": "1"
      "Contradiction": "2"
      "Neutral": "3"
    tooltips:
      "Entailment": "The hypothesis is definitely true given the premise"
      "Contradiction": "The hypothesis is definitely false given the premise"
      "Neutral": "The hypothesis may or may not be true given the premise"

  # Step 2: Provide reasoning
  - annotation_type: text
    name: reasoning
    description: "Briefly explain your reasoning for the chosen label"

annotation_instructions: |
  You will be shown a premise and hypothesis from a specific text genre. Your task is to:
  1. Note the genre label for context about the writing style.
  2. Determine the relationship between the premise and the hypothesis.
  3. Select one of: Entailment, Contradiction, or Neutral.
  4. Provide a brief explanation for your choice.

  - Entailment: If the premise is true, the hypothesis must also be true.
  - Contradiction: If the premise is true, the hypothesis must be false.
  - Neutral: The premise does not give enough information to determine if the hypothesis is true or false.

html_layout: |
  <div style="padding: 15px; max-width: 800px; margin: auto;">
    <div style="background: #f3e8ff; border: 1px solid #d8b4fe; border-radius: 8px; padding: 10px 16px; margin-bottom: 12px; display: inline-block;">
      <strong style="color: #7c3aed; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px;">Genre:</strong>
      <span style="font-size: 14px; color: #6d28d9; font-weight: 500; margin-left: 4px;">{{genre}}</span>
    </div>
    <div style="background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 16px; margin-bottom: 16px;">
      <strong style="color: #0369a1; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px;">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; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px;">Hypothesis:</strong>
      <p style="font-size: 16px; line-height: 1.7; margin: 8px 0 0 0;">{{hypothesis}}</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

json
[
  {
    "id": "multinli_001",
    "text": "The old man turned the corner and disappeared into the fog, his coat flapping behind him like the wings of a wounded bird.",
    "hypothesis": "A man walked away.",
    "genre": "fiction"
  },
  {
    "id": "multinli_002",
    "text": "The Commission's final report recommended sweeping changes to the existing regulatory framework, including increased oversight of financial institutions.",
    "hypothesis": "The Commission suggested keeping everything the same.",
    "genre": "government"
  }
]

// ... 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/text/natural-language-inference/multinli-genre-nli
potato start config.yaml

Dataset & paper

Williams et al., NAACL 2018

Citation (BibTeX)

bibtex
@inproceedings{williams-etal-2018-broad,
    title = "A Broad-Coverage Challenge Corpus for Sentence Understanding through Inference",
    author = "Williams, Adina and Nangia, Nikita and Bowman, Samuel R.",
    booktitle = "Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers)",
    month = jun,
    year = "2018",
    address = "New Orleans, Louisiana",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/N18-1101",
    doi = "10.18653/v1/N18-1101",
    pages = "1112--1122"
}

Details

Annotation Types

radiotext

Domain

NLPNatural Language Inference

Use Cases

Textual EntailmentMulti-Genre NLISemantic Reasoning

Tags

multinlinlientailmentmulti-genresentence-pairsnaacl2018

Found an issue or want to improve this design?

Open an Issue