File size: 5,626 Bytes
3822e4a
 
 
b53fbe6
 
 
 
 
 
3822e4a
b53fbe6
 
 
3822e4a
b53fbe6
3822e4a
 
 
 
 
 
936bca9
 
3822e4a
936bca9
3822e4a
 
 
 
936bca9
3822e4a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
936bca9
 
3822e4a
936bca9
3822e4a
 
 
 
b53fbe6
 
936bca9
3822e4a
936bca9
3822e4a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
936bca9
3822e4a
 
 
 
 
 
 
 
 
936bca9
3822e4a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
936bca9
3822e4a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
936bca9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
---
tags:
  - stackoverflow
  - qdrant
  - embeddings
  - retrieval
  - question-answering
task_categories:
  - feature-extraction
  - question-answering
language:
  - en
pretty_name: Javascript StackOverflow Vector Dataset
license: cc-by-sa-4.0
viewer: false
---

# Javascript StackOverflow Vector Dataset

## Summary

This Hugging Face dataset repository contains the Javascript shard of the Stack2Graph vector-database component as restorable Qdrant artifacts plus portable Parquet fallback files.
Hugging Face uses one dataset repository per programming language, so this repository is directly cloneable without an extra top-level archive wrapper.

The artifacts are intended for semantic and hybrid retrieval, graph entry-point finding, and retrieval-augmented generation experiments over Stack Overflow content.

Stack2Graph source:
[https://github.com/tha-atlas/Stack2Graph](https://github.com/tha-atlas/Stack2Graph)

## Hugging Face Repository Layout

```text
README.md
dataset_manifest.json
qdrant_snapshots/
  collections_manifest.json
  stackoverflow_javascript_vector.tar.zst
  stackoverflow_javascript_vector.snapshot.zst.part_000
  ...
question_metadata/
  r0_00000.parquet
chunk_records/
  r0_00000.parquet
```

- `README.md`: Hugging Face dataset card rendered from this template.
- `dataset_manifest.json`: language-scoped manifest listing the files in this repository.
- `qdrant_snapshots/collections_manifest.json`: language-scoped Qdrant snapshot manifest.
- `qdrant_snapshots/stackoverflow_javascript_vector.*`: Qdrant restore artifacts for `stackoverflow_javascript_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.

Parent-child exports contain `question_metadata/` and `chunk_records/`. Non-chunked exports contain `question_records/` instead. A repository does not need both `chunk_records/` and `question_records/`.

During Hugging Face upload, the local leading language directory is removed. A local file such as `javascript/chunk_records/r0_00000.parquet` appears in this repository as `chunk_records/r0_00000.parquet`.

## Content

Rows are derived from Stack Overflow questions tagged for Javascript.

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 Javascript 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, and vector database benchmarking.

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 an HF token.
2. Start local services:

```bash
docker compose up -d
```

3. Download and restore vector artifacts:

```bash
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:

```text
stackoverflow_javascript_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:

- 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.