StackSample
StackSample is a subset of Stack Overflow that contains 10% of its questions and answers. It is a textual corpus structured in three tables (questions, answers, tags) allowing you to work on tasks such as the automatic generation of tags, the prediction of votes or the semantic analysis of the text of technical questions.
Approximately 468,000 rows in CSV format spread over 3 tables (questions, answers, tags)
CC-BY-SA 3.0
Description
StackSample is a textual corpus extracted from Stack Overflow, including approximately 10% of the questions and answers. It includes the titles, contents, scores, scores, dates, and tags of the publications. Organized into three CSV tables (Questions, Answers, Tags), this dataset provides an excellent basis for NLP projects in connection with technical communities and natural language in a Q&A context.
What is this dataset for?
- Train models for the automatic generation or recommendation of tags
- Predict the success (votes, closings) of questions based on their text
- Analyze the evolution of technologies through Stack Overflow trends
Can it be enriched or improved?
Yes, StackSample can be combined with other Stack Overflow datasets (e.g. Python, R) for targeted analyses by language. We can also enrich the examples with embeddings, summaries, or classify by technological field. Further exploration of user behavior is also possible via ownerIDs.
🔎 In summary
🧠 Recommended for
- NLP projects
- Recommendation engines
- Technical community analysis
🔧 Compatible tools
- Pandas
- Hugging Face
- SpacY
- Scikit-learn
- TensorFlow
- PyTorch
💡 Tip
For robust models, combine the “Title” and “Body” fields and use the tags as multi-class targets.
Frequently Asked Questions
Does this dataset only contain Python questions?
No, StackSample covers a wide range of languages and technical topics from Stack Overflow.
Can this dataset be used to train a tag classification model?
Yes, the dataset is ideal for multi-category classification based on question text.
Does the dataset include accepted answers?
Yes, answers are included, along with scores, but there is no direct indicator for accepted answers.




