Mostly Basic Python Problems (MBPP)
A dataset of simple Python problems for training and evaluating code generation models. Each problem contains a description, a solution in Python code, and automated tests. Useful for program synthesis and machine learning applied to code.
Approximately 1,000 Python problems, JSON format, including description, source code, and automated tests
CC-BY 4.0
Description
The dataset Mostly Basic Python Problems (MBPP) includes approximately 1,000 Python programming problems. Each problem contains a text description, a solution in Python code, and three automated test cases. This dataset is used primarily to train and evaluate code generation models, especially in the context of synthesizing programs with language models.
What is this dataset for?
- Train models for automatic Python code generation
- Evaluate the performance of models in the synthesis of basic programs
- Support for AI-assisted programming research
Can it be enriched or improved?
Yes, it is possible to add more complex problems, to annotate difficulties, or to enrich the dataset with multilingual examples. Integrating additional tests or diversifying use cases can also improve its relevance.
🔎 In summary
🧠 Recommended for
- AI researchers
- NLP developers
- Code synthesis projects
🔧 Compatible tools
- Hugging Face Transformers
- OpenAI Codex
- LangChain
💡 Tip
Use this dataset to start fine-tuning before moving on to larger and complex datasets.
Frequently Asked Questions
Is this dataset suitable for training multilingual generative models?
No, the dataset is only in English with Python code, it does not cover other languages.
Can this dataset be used to evaluate a model on complex problems?
This dataset mostly covers basic problems. For complex problems, other larger datasets are recommended.
Does the dataset contain code samples that are automatically tested?
Yes, each problem is accompanied by three automated tests to verify the validity of the code.




