Datasets:
Update StackOverflow KG dataset card: bash
Browse files12 unmodified lines131415161617181819202120212223232425262725262730282930313233341 unmodified line36373839404141424343454445474849505152464748495051525354555657595859616263646061626364657 unmodified lines73747578767778798283848580818889828384858687889589909198929394101102959610410510697108109110111112113114115116117118119981219910012310110212512610310410512810610713010810913211012 unmodified lines - 100M<n<1B---
# Bash StackOverflow Knowledge Graph Datasheet# Bash StackOverflow Knowledge Graph
## 1. What This Dataset Is## Summary
This dataset is the Bash-specific RDF shard of the Stack2Graph StackOverflow Knowledge Graph.Each Hugging Face dataset repository contains exactly one language dataset.This Hugging Face dataset repository contains the Bash shard of the Stack2Graph StackOverflow Knowledge Graph.Hugging Face uses one dataset repository per programming language, so this repository is directly cloneable without an extra top-level archive wrapper.
It is optimized for graph-based retrieval and SPARQL analytics (not row-wise tabular training input).The artifact is optimized for graph-based retrieval, SPARQL analytics, and retrieval-augmented question answering over Stack Overflow content.
It is used in the Stack2Graph paper for evaluating retrieval-based question answering and knowledge graph research on programming topics.
See the Stack2Graph repository for more details:Stack2Graph source:[https://github.com/tha-atlas/Stack2Graph](https://github.com/tha-atlas/Stack2Graph)
## 2. Repository Layout## Hugging Face Repository Layout
```textREADME.mdschema.ntbash/ part0.nt1 unmodified line ...```
- `README.md`: Hugging Face dataset card rendered from this template.- `schema.nt`: shared ontology and schema triples.- `bash/part*.nt`: language-scoped instance triples serialized as N-Triples.- `bash/part*.nt`: Bash instance triples serialized as N-Triples.
## 3. Data Model And Coverage
The graph links Stack Overflow entities and relations, including:## Data Model And Coverage
- questions- answers- comments- tags- vote aggregates- question-to-question linksThe graph links Stack Overflow entities and relations, including questions, answers, comments, tags, vote aggregates, and question-to-question links.
Coverage scope:
- records are retained when they match the Stack2Graph supported language-tag set- this repository contains only the Bash shard- a question may appear in more than one language repository when it has multiple programming-language tags
## Recommended Use
Use this dataset for graph retrieval, SPARQL diagnostics, RAG experiments, and knowledge graph research for programming topics. It is not intended as row-wise tabular training input.
## 4. Recommended PreprocessingLoad `schema.nt` and the files under `bash/` into an RDF-capable store. Map language triples to named graph:
1. Load `schema.nt` and all triples from `bash/` into an RDF-capable store.2. Map language triples to named graph `http://stackoverflow.com/bash`.3. Keep schema triples available for graph-aware query planning.4. Preserve attribution and license metadata during downstream export.```texthttp://stackoverflow.com/bash```
Example language-scoped query:
7 unmodified linesLIMIT 100```
## 5. Automatic Download And KG Setup## Restore With Stack2Graph
You do not need to rebuild triples from XML to use this dataset.
In the Stack2Graph repository, you can use the automation script`experiment/load_hf_datasets_into_services.py` to download dataset artifactsand prepare the knowledge graph service state automatically.
Typical workflow:
1. Clone and configure Stack2Graph (`.env` with HF token and service paths).1. Start required local services:1. Clone Stack2Graph and configure `.env` with service paths and an HF token.2. Start local services:
```bashdocker compose up -d```
1. Run the loader script:3. Download and prepare the knowledge graph service state:
```bashpython -m experiment.load_hf_datasets_into_servicespython -m experiment.sources.hf```
For manual usage without automation, you can directly load `schema.nt` and alltriples from `bash/` into your RDF store.## Quality Notes
## 6. Quality Notes And Caveats
- A Stack Overflow question may belong to multiple language shards when tagged with multiple languages.- Vote information is represented as aggregates, not raw individual vote events.- As with community-generated data, content may include noise, bias, and temporal drift.
## 7. Intended Use
- retrieval and question-answering systems- RAG and hybrid retriever experiments- knowledge graph benchmarking and diagnostics- language-scoped developer tooling research
## 8. Limitations
- Not a complete mirror of all Stack Overflow content.- Not all moderation context or full revision history is represented.- Best used with graph infrastructure that supports named graphs and SPARQL.- Community-generated Stack Overflow content may contain errors, outdated information, bias, or temporal drift.
## 9. Licensing And Attribution## License And Attribution
This dataset inherits Stack Overflow source licensing and attribution requirements.Ensure compliant attribution and redistribution practices in all derived artifacts.This dataset is derived from Stack Overflow content and is distributed under `CC-BY-SA-4.0`.Preserve required attribution and license notices when redistributing derived artifacts.
## 10. Suggested Citation## Citation
If you use this dataset, cite the Stack2Graph work:If you use this dataset, cite the Stack2Graph project and preserve Stack Overflow attribution requirements:
- Stack2Graph: A Structured Knowledge Representation of Stack Overflow Data for Retrieval-based Question Answering- Kleybolte, L. A., Ventura, V., & Zarcone, A. (2026). Stack2Graph: A Structured Knowledge Representation of Stack Overflow Data for Retrieval-based Question Answering . In Proceedings of the Knowledge Graphs and Large Language Models Workshop (KG-LLM) @ LREC26 (pp. 120-133). European Language Resources Association (ELRA). https://doi.org/10.63317/583q4d3mwbdu.README.md+34-56