Datasets:
license: apache-2.0
task_categories:
- table-question-answering
- text2text-generation
language:
- en
size_categories:
- 10K<n<100K
Dataset Card for M2Q2+
M2Q2+ is a dataset designed for question answering and information retrieval tasks related to MongoDB, a popular NoSQL database. It contains pairs of natural language questions and corresponding MongoDB fetch queries, making it ideal for training models to translate natural language into database queries.
This dataset is intended to support research and development in natural language processing (NLP), question answering (QA), and database management systems (DBMS).
Dataset Details
Dataset Description
- Curated by: Aicha Aggoune, Zakaria Mihoubi
- Language(s) (NLP): English
- License: apache 2.0
Uses
Direct Use
This dataset is suitable for:
- Training models to translate natural language questions into MongoDB queries.
- Research in natural language processing (NLP) and database management systems (DBMS).
- Building question-answering systems for MongoDB.
Out-of-Scope Use
- This dataset is not intended for tasks unrelated to MongoDB or database querying.
- It should not be used for malicious purposes, such as generating harmful or unauthorized queries.
Dataset Structure
The dataset is provided in CSV format with the following columns:
question
: A natural language question about MongoDB.query
: The corresponding MongoDB fetch query that answers the question.
Example rows:
question | query |
---|---|
How many nominations did the movie The Life of Emile Zola receive? | db.movies.find({"title":"The Life of Emile Zola"}, {"awards.nominations":1}) |
Who stars in Broken Blossoms or The Yellow Man and the Girl? | db.movies.find({"title": "Broken Blossoms or The Yellow Man and the Girl"}, {"cast": 1}) |
Can you tell me which film genres Yasujiro Ozu has directed? | db.movies.distinct("genres", { "directors": "Yasujiro Ozu" }) |
Splits
- Train: ~60,000 question-query pairs.
- Validation: 10,000 question-query pairs.
- Test: 10,000 question-query pairs.
- Total Size: ~80,000 question-query pairs.
Dataset Creation
Curation Rationale
This dataset was created to address the absence of a NoSQL (MongoDB) version of WikiSQL. It aims to bridge the gap between natural language and database querying, making databases more accessible to non-technical users.
Source Data
Data Collection and Processing
- Questions: Collected from real-world scenarios and common MongoDB use cases.
- Queries: Manually crafted to ensure accuracy and relevance to the questions.
- Augmentation: A multi-step pipeline was used to augment the dataset.
- Execution: Queries were executed on a real MongoDB database (the
movies
collection from the Mflix database). - Formatting: Structured into CSV format for ease of use.
Who are the source data producers?
- Questions: Curated by Aicha Aggoune, Zakaria Mihoubi.
- Queries: Written by Aicha Aggoune, Zakaria Mihoubi with expertise in MongoDB.
- Mflix Database: The
movies
collection from the Mflix database was used as a resource. Credit to MongoDB Atlas for providing the sample data.
Annotations
- Annotation process: Questions and queries were manually paired and validated for accuracy.
- Annotation guidelines: Queries were written to match the intent of the questions precisely.
Bias, Risks, and Limitations
- Bias: The dataset may reflect biases in the types of questions and queries included.
- Risks: Misuse of the dataset could lead to the generation of harmful or unauthorized queries.
- Limitations: The dataset is limited to fetch operations in MongoDB and does not cover other database operations.
Future Improvements
- Improve Question Quality: Enhance the diversity and complexity of natural language questions.
- Diversify Query Types: Increase the number of queries utilizing other fetch operation types: countDocuments() and aggregate().