Skip to content
Showcase/R2VQ - Recipe Question Answering
intermediatetext

R2VQ - Recipe Question Answering

Question answering over recipe texts, where annotators answer questions about recipes and classify whether the answer is explicitly stated, inferable, or not answerable from the recipe. Based on SemEval-2022 Task 9 (Jia et al.).

Submit

Configuration Fileconfig.yaml

# R2VQ - Recipe Question Answering
# Based on Jia et al., SemEval 2022
# Paper: https://aclanthology.org/2022.semeval-1.156/
# Dataset: https://github.com/recipe-qa/SemEval2022-Task9
#
# This task asks annotators to answer questions about recipes and
# classify the answerability of each question relative to the recipe text.
#
# Answerability Labels:
# - Explicitly Stated: The answer is directly written in the recipe
# - Inferable: The answer can be inferred from the recipe context
# - Not Answerable: The recipe does not contain enough information to answer

annotation_task_name: "R2VQ - Recipe Question Answering"
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: text
    name: answer
    description: "Write the answer to the question based on the recipe"

  - annotation_type: radio
    name: answerability
    description: "How is the answer supported by the recipe text?"
    labels:
      - "Explicitly Stated"
      - "Inferable"
      - "Not Answerable"
    keyboard_shortcuts:
      "Explicitly Stated": "1"
      "Inferable": "2"
      "Not Answerable": "3"
    tooltips:
      "Explicitly Stated": "The answer is directly and clearly stated in the recipe text"
      "Inferable": "The answer can be reasonably inferred from the recipe context but is not explicitly stated"
      "Not Answerable": "The recipe does not contain enough information to answer this question"

annotation_instructions: |
  You will see a recipe and a question about it.
  1. Read the recipe text carefully.
  2. Answer the question based on the recipe.
  3. Classify whether the answer is explicitly stated in the recipe, can be inferred, or cannot be answered.

html_layout: |
  <div style="padding: 15px; max-width: 800px; margin: auto;">
    <div style="background: #fef3c7; border: 1px solid #fde68a; border-radius: 8px; padding: 12px; margin-bottom: 12px;">
      <strong style="color: #92400e;">Recipe:</strong>
      <span style="font-size: 15px; font-weight: bold; margin-left: 8px;">{{recipe_title}}</span>
    </div>
    <div style="background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 16px; margin-bottom: 16px;">
      <strong style="color: #0369a1;">Recipe Text:</strong>
      <p style="font-size: 15px; line-height: 1.6; margin: 8px 0 0 0; white-space: pre-line;">{{recipe_text}}</p>
    </div>
    <div style="background: #faf5ff; border: 1px solid #e9d5ff; border-radius: 8px; padding: 16px; margin-bottom: 16px;">
      <strong style="color: #7e22ce;">Question:</strong>
      <p style="font-size: 16px; line-height: 1.7; margin: 8px 0 0 0;">{{text}}</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": "recipe_qa_001",
    "text": "What temperature should the oven be preheated to?",
    "recipe_text": "Preheat oven to 375F. Mix flour, sugar, and baking powder in a large bowl. Cut in cold butter until mixture resembles coarse crumbs. Add milk and stir until just combined. Drop spoonfuls onto a baking sheet and bake for 12-15 minutes until golden brown.",
    "recipe_title": "Classic Buttermilk Biscuits"
  },
  {
    "id": "recipe_qa_002",
    "text": "Can this recipe be made gluten-free?",
    "recipe_text": "Cook spaghetti according to package directions until al dente. In a skillet, cook pancetta until crispy. Whisk together eggs, Parmesan cheese, and black pepper. Drain pasta, reserving 1 cup cooking water. Toss hot pasta with pancetta, then quickly stir in egg mixture. Add pasta water as needed for a creamy sauce.",
    "recipe_title": "Spaghetti Carbonara"
  }
]

// ... 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/2022/task09-r2vq-recipe-qa
potato start config.yaml

Details

Annotation Types

textradio

Domain

NLPQuestion AnsweringSemEval

Use Cases

Recipe QAReading ComprehensionProcedural Text

Tags

semevalsemeval-2022shared-taskrecipe-qaquestion-answeringprocedural-text

Found an issue or want to improve this design?

Open an Issue