Dataset Viewer
Auto-converted to Parquet Duplicate
chunk_id
stringlengths
7
12
question_id
stringlengths
4
8
language
stringclasses
1 value
chunk_index
int64
0
63
dense_vector
listlengths
4.1k
4.1k
sparse_indices
listlengths
2
270
sparse_values
listlengths
2
270
15835316_c0
15835316
shell
0
[ 0.00074005126953125, -0.037109375, -0.024658203125, -0.0013275146484375, 0.0244140625, -0.04541015625, 0.004119873046875, 0.0037841796875, -0.01953125, 0.0050048828125, -0.01708984375, 0.019287109375, 0.0167236328125, -0.015625, 0.0361328125, 0.0108642578125, 0.0042724609375, -0.05...
[ 48962, 145581, 20, 238, 101089, 12298, 87109, 128019, 9643, 1916, 17198, 50828, 15649, 12 ]
[ 0.073974609375, 0.278076171875, 0.10552978515625, 0.1905517578125, 0.265380859375, 0.10223388671875, 0.1796875, 0.209716796875, 0.1470947265625, 0.1295166015625, 0.08355712890625, 0.1673583984375, 0.2005615234375, 0.03240966796875 ]
25566441_c0
25566441
shell
0
[ 0.015380859375, -0.02197265625, -0.01611328125, -0.016845703125, 0.0004711151123046875, 0.002777099609375, 0.001220703125, -0.00701904296875, -0.0264892578125, -0.0033111572265625, -0.00885009765625, 0.03173828125, 0.033935546875, -0.0087890625, 0.038818359375, 0.0020904541015625, 0....
[ 48962, 76324, 92, 68807, 214, 1257, 101935, 12298, 128019, 51, 4084, 10, 434, 15649, 12 ]
[ 0.07861328125, 0.1849365234375, 0.218017578125, 0.236328125, 0.09063720703125, 0.1385498046875, 0.2073974609375, 0.10113525390625, 0.23486328125, 0.0948486328125, 0.11053466796875, 0.031341552734375, 0.151123046875, 0.19287109375, 0.0023136138916015625 ]
47057926_c0
47057926
shell
0
[0.02099609375,-0.0245361328125,-0.0277099609375,-0.00714111328125,0.017822265625,0.00640869140625,0(...TRUNCATED)
[ 48962, 108362, 42564, 6626, 11435, 12298, 10, 434, 92, 33284, 11508, 6077, 128019, 15649 ]
[0.052093505859375,0.2415771484375,0.280029296875,0.1563720703125,0.2239990234375,0.067626953125,0.0(...TRUNCATED)
42239442_c0
42239442
shell
0
[-0.022705078125,-0.022216796875,-0.00738525390625,-0.0174560546875,-0.005859375,-0.0000786781311035(...TRUNCATED)
[ 48962, 10, 434, 92, 137158, 14858, 297, 10941, 12298, 3514, 254, 128019, 15649, 12, 7 ]
[0.049652099609375,0.047607421875,0.170654296875,0.19921875,0.2115478515625,0.2310791015625,0.095336(...TRUNCATED)
57370328_c0
57370328
shell
0
[0.0015716552734375,-0.013671875,-0.0277099609375,-0.009521484375,-0.01171875,0.0031890869140625,0.0(...TRUNCATED)
[ 48962, 11249, 47, 366, 184, 70, 34475, 11435, 32, 12298, 128019, 87109, 15649, 12 ]
[0.061248779296875,0.0950927734375,0.10467529296875,0.19580078125,0.180419921875,0.049407958984375,0(...TRUNCATED)
19858808_c0
19858808
shell
0
[0.0255126953125,-0.026611328125,-0.018310546875,0.01708984375,0.028564453125,-0.024658203125,-0.019(...TRUNCATED)
[ 48962, 12096, 20928, 8, 93343, 297, 11435, 12298, 128019, 214, 17198, 50828, 15649 ]
[0.057220458984375,0.2388916015625,0.2169189453125,0.08447265625,0.1951904296875,0.0594482421875,0.1(...TRUNCATED)
48583339_c0
48583339
shell
0
[0.005889892578125,-0.0159912109375,-0.000598907470703125,-0.00909423828125,0.0084228515625,-0.01708(...TRUNCATED)
[ 48962, 12, 144334, 26499, 6, 17086, 711, 11249, 47, 30022, 32, 12298, 87109, 4, 128019, 15649 ]
[0.1240234375,0.08966064453125,0.276123046875,0.323974609375,0.0989990234375,0.313232421875,0.143676(...TRUNCATED)
49668790_c0
49668790
shell
0
[-0.0027008056640625,-0.0289306640625,-0.0269775390625,-0.01171875,0.0020599365234375,-0.01879882812(...TRUNCATED)
[ 48962, 43731, 123573, 7, 23, 26499, 12298, 87109, 51, 4084, 128019, 7225, 15649, 12 ]
[0.052886962890625,0.288330078125,0.275390625,0.07635498046875,0.0919189453125,0.246826171875,0.0796(...TRUNCATED)
42112171_c0
42112171
shell
0
[0.027099609375,-0.01361083984375,-0.005035400390625,-0.00830078125,0.028564453125,-0.01171875,-0.00(...TRUNCATED)
[ 48962, 11508, 6077, 12096, 959, 4488, 26785, 538, 12298, 128019, 15649 ]
[0.04132080078125,0.12103271484375,0.1375732421875,0.28076171875,0.11163330078125,0.1368408203125,0.(...TRUNCATED)
18192037_c0
18192037
shell
0
[0.00628662109375,-0.018798828125,-0.0169677734375,0.00439453125,0.0034942626953125,-0.00732421875,0(...TRUNCATED)
[ 48962, 104758, 3365, 316, 1779, 23, 87109, 12298, 11508, 6077, 128019, 10, 434, 92, 15649, 12 ]
[0.03753662109375,0.26904296875,0.19921875,0.2078857421875,0.11041259765625,0.0963134765625,0.21875,(...TRUNCATED)
End of preview. Expand in Data Studio

Shell StackOverflow Vector Dataset

Summary

This repository contains the Shell shard of the Stack2Graph vector retrieval dataset. Each Hugging Face dataset repository contains one programming-language shard and is intended to restore or rebuild the Qdrant collection stackoverflow_shell_vector.

The dataset is the vector counterpart to the Stack2Graph RDF knowledge graph. It is designed for hybrid retrieval, graph entry-point finding, and retrieval-augmented generation experiments over Stack Overflow content.

Stack2Graph source: https://github.com/tha-atlas/Stack2Graph

Repository Layout

README.md
dataset_manifest.json
qdrant_snapshots/
  collections_manifest.json
  stackoverflow_shell_vector.tar.zst
  stackoverflow_shell_vector.snapshot.zst.part_000
  ...
question_metadata/
  r0_00000.parquet
chunk_records/
  r0_00000.parquet
question_records/
  r0_00000.parquet
  • dataset_manifest.json: language-scoped manifest listing the files in this shard.
  • qdrant_snapshots/collections_manifest.json: language-scoped Qdrant snapshot manifest.
  • qdrant_snapshots/stackoverflow_shell_vector.*: optional Qdrant restore artifact files for stackoverflow_shell_vector.
  • question_metadata/*.parquet: question-level metadata used by parent-child chunk retrieval.
  • chunk_records/*.parquet: chunk-level vector rows when parent-child indexing is enabled.
  • question_records/*.parquet: question-level vector rows when non-chunked export is used.

The Hugging Face upload is one repository per language. During upload, the local leading language directory is removed, so local files such as shell/chunk_records/r0_00000.parquet appear in this repository as chunk_records/r0_00000.parquet.

Data Model

Rows are derived from Stack Overflow questions tagged for Shell.

The current Stack2Graph vector pipeline uses:

  • dense vectors from Qwen/Qwen3-Embedding-8B
  • 4096-dimensional dense embeddings with last-token pooling
  • instruction-aware query embedding for retrieval
  • sparse lexical vectors from BAAI/bge-m3
  • unified question text containing title, tags, cleaned problem text, and code
  • optional parent-child indexing where chunk hits collapse back to parent question IDs

When Qdrant snapshots are included, they are the fastest restore path. The Parquet files remain the portable fallback for rebuilding the collection.

Coverage

This repository contains only the Shell shard. A Stack Overflow question can appear in more than one language shard when it has multiple programming-language tags.

The dataset is not a complete Stack Overflow mirror. Full question and answer graph context lives in the corresponding Stack2Graph knowledge graph artifacts; the vector dataset stores retrieval rows, vectors, sparse weights, and routing metadata.

Recommended Use

Use this dataset for:

  • semantic and hybrid retrieval
  • Qdrant restore or ingestion tests
  • Stack2Graph RAG experiments
  • graph entry-point retrieval before QLever graph expansion
  • vector database benchmarking and diagnostics

This dataset is not intended as a standalone supervised training dataset.

Restore With Stack2Graph

You do not need to regenerate embeddings to use this dataset.

Typical workflow:

  1. Clone Stack2Graph and configure .env with service paths and HF token.
  2. Start local services:
docker compose up -d
  1. Download and restore vector artifacts:
python -m experiment.sources.hf --skip-kg

The loader restores Qdrant snapshots when present and falls back to Parquet ingestion when snapshots are unavailable.

Manual Use

For manual use, inspect dataset_manifest.json, then either:

  • restore the Qdrant snapshot artifacts under qdrant_snapshots/, or
  • ingest the listed Parquet shards into a compatible vector database.

The target Qdrant collection name is:

stackoverflow_shell_vector

Quality Notes

  • Embedding quality depends on the configured Stack2Graph export pipeline and model versions.
  • Sparse text can be generated from the same unified text as dense embeddings or from a lexical variant, depending on export configuration.
  • Community-generated Stack Overflow content may contain errors, outdated information, bias, or incomplete answers.
  • Rebuilding from Parquet may produce operational differences if Qdrant collection settings differ from the original export.

License And Attribution

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.

Citation

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
Downloads last month
87