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
24
dense_vector
listlengths
4.1k
4.1k
sparse_indices
listlengths
2
248
sparse_values
listlengths
2
248
7672932_c0
7672932
haskell
0
[ 0.0036163330078125, -0.004302978515625, -0.0220947265625, 0.01171875, 0.020263671875, -0.00677490234375, -0.0036468505859375, -0.0019073486328125, 0.0045166015625, 0.0172119140625, -0.016357421875, -0.00390625, 0.02783203125, -0.0087890625, 0.015869140625, 0.0272216796875, 0.00091171...
[ 48962, 12, 20625, 142508, 20, 69253, 53, 12298, 10298, 4778, 1556, 15649 ]
[ 0.1070556640625, 0.044647216796875, 0.181884765625, 0.26171875, 0.06451416015625, 0.189208984375, 0.1717529296875, 0.1397705078125, 0.1669921875, 0.17333984375, 0.1683349609375, 0.2110595703125 ]
38801907_c0
38801907
haskell
0
[ 0.00799560546875, -0.00872802734375, -0.038330078125, 0.00022411346435546875, 0.0155029296875, -0.023681640625, 0.01336669921875, 0.01123046875, 0.02490234375, 0.016357421875, -0.008544921875, 0.023193359375, 0.0107421875, 0.0035247802734375, -0.0096435546875, 0.0235595703125, -0.000...
[ 48962, 12, 28872, 214, 5303, 237, 171859, 12298, 1556, 142508, 15649, 10 ]
[ 0.1104736328125, 0.0268707275390625, 0.1661376953125, 0.06732177734375, 0.260498046875, 0.160400390625, 0.293212890625, 0.1103515625, 0.1798095703125, 0.2259521484375, 0.1966552734375, 0.002197265625 ]
58879008_c0
58879008
haskell
0
[-0.0011444091796875,-0.006591796875,-0.0128173828125,-0.0032501220703125,0.0242919921875,-0.0148315(...TRUNCATED)
[ 48962, 12, 20625, 142508, 167599, 54764, 3768, 1927, 109217, 12298, 1556, 15649, 25 ]
[0.12030029296875,0.07861328125,0.1771240234375,0.2298583984375,0.2410888671875,0.02606201171875,0.1(...TRUNCATED)
24817082_c0
24817082
haskell
0
[0.00160980224609375,0.00933837890625,-0.0277099609375,-0.026611328125,0.02294921875,-0.002426147460(...TRUNCATED)
[ 48962, 12, 212059, 98, 759, 20625, 142508, 18151, 12298, 366, 6953, 1556, 15649 ]
[0.10040283203125,0.03900146484375,0.244140625,0.175048828125,0.147216796875,0.17919921875,0.2376708(...TRUNCATED)
13046337_c0
13046337
haskell
0
[0.002838134765625,0.0208740234375,-0.002288818359375,-0.01251220703125,0.0091552734375,0.0065307617(...TRUNCATED)
[ 48962, 853, 48650, 5844, 110527, 80934, 12298, 1556, 142508, 15649, 12, 7 ]
[0.080810546875,0.108642578125,0.2401123046875,0.1878662109375,0.25341796875,0.193115234375,0.087036(...TRUNCATED)
30424870_c0
30424870
haskell
0
[-0.002593994140625,-0.01116943359375,-0.0247802734375,-0.006439208984375,0.025390625,-0.01141357421(...TRUNCATED)
[ 48962, 20625, 142508, 12, 60331, 71, 30646, 5303, 12298, 1556, 2667, 712, 7, 15649 ]
[0.08282470703125,0.1651611328125,0.26708984375,0.051849365234375,0.236572265625,0.193359375,0.23815(...TRUNCATED)
37201789_c0
37201789
haskell
0
[0.0184326171875,-0.01263427734375,-0.0145263671875,-0.01165771484375,0.00592041015625,-0.0190429687(...TRUNCATED)
[ 48962, 12, 24172, 47691, 23, 32635, 2199, 12298, 2422, 23722, 1556, 142508, 4000, 15649 ]
[0.0985107421875,0.060394287109375,0.2259521484375,0.1734619140625,0.125732421875,0.20263671875,0.27(...TRUNCATED)
58893633_c0
58893633
haskell
0
[0.0034332275390625,-0.01092529296875,-0.0211181640625,-0.0133056640625,0.0252685546875,-0.000429153(...TRUNCATED)
[ 48962, 20625, 142508, 360, 555, 22062, 31089, 12298, 1556, 18597, 15649, 12 ]
[0.07049560546875,0.18212890625,0.2607421875,0.122802734375,0.1883544921875,0.166748046875,0.1651611(...TRUNCATED)
14292136_c0
14292136
haskell
0
[-0.005279541015625,-0.00360107421875,-0.01416015625,0.003173828125,0.0223388671875,-0.013671875,-0.(...TRUNCATED)
[ 48962, 39754, 36335, 111, 6626, 101935, 20625, 142508, 12298, 1556, 15649, 12 ]
[0.09869384765625,0.2249755859375,0.24755859375,0.14208984375,0.15869140625,0.1884765625,0.143920898(...TRUNCATED)
32769751_c0
32769751
haskell
0
[0.01434326171875,-0.0111083984375,-0.0162353515625,-0.00750732421875,0.033935546875,-0.005859375,0.(...TRUNCATED)
[ 48962, 12, 16750, 5303, 111, 22288, 83, 1632, 51713, 12298, 1556, 142508, 15649 ]
[0.062469482421875,0.030853271484375,0.2294921875,0.222900390625,0.0966796875,0.193359375,0.11096191(...TRUNCATED)
End of preview. Expand in Data Studio

Haskell StackOverflow Vector Dataset

Summary

This repository contains the Haskell 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_haskell_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_haskell_vector.tar.zst
  stackoverflow_haskell_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_haskell_vector.*: optional Qdrant restore artifact files for stackoverflow_haskell_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 haskell/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 Haskell.

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 Haskell 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_haskell_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
86