Update README.md
Browse files
README.md
CHANGED
|
@@ -1,217 +1,70 @@
|
|
| 1 |
---
|
| 2 |
tags:
|
| 3 |
-
- embeddings
|
| 4 |
-
- vector-database
|
| 5 |
-
- information-retrieval
|
| 6 |
- stackoverflow
|
|
|
|
|
|
|
|
|
|
| 7 |
- question-answering
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
license: cc-by-sa-4.0
|
| 11 |
---
|
| 12 |
|
| 13 |
-
# Dataset
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
```text
|
| 26 |
-
|
| 27 |
-
|
| 28 |
archive_manifest.json
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
...
|
| 33 |
```
|
| 34 |
|
| 35 |
-
Each
|
| 36 |
-
|
| 37 |
-
The `archive_manifest.json` file records:
|
| 38 |
-
|
| 39 |
-
- the archive batch size
|
| 40 |
-
- the number of archive files
|
| 41 |
-
- the exact export files included in each archive
|
| 42 |
-
- a source manifest used to detect whether staged archives still match the current vector export
|
| 43 |
-
|
| 44 |
-
# Export Layout
|
| 45 |
-
|
| 46 |
-
The underlying vector export is organized by category and programming language.
|
| 47 |
-
|
| 48 |
-
When parent-child indexing is enabled, the exported layout follows this pattern:
|
| 49 |
-
|
| 50 |
-
```text
|
| 51 |
-
question_metadata/<language>/part-*.parquet
|
| 52 |
-
chunk_records/<language>/part-*.parquet
|
| 53 |
-
dataset_manifest.json
|
| 54 |
-
```
|
| 55 |
-
|
| 56 |
-
When parent-child indexing is disabled, the export instead uses:
|
| 57 |
-
|
| 58 |
-
```text
|
| 59 |
-
question_records/<language>/part-*.parquet
|
| 60 |
-
dataset_manifest.json
|
| 61 |
-
```
|
| 62 |
-
|
| 63 |
-
# Record Types
|
| 64 |
-
|
| 65 |
-
## `question_metadata`
|
| 66 |
-
|
| 67 |
-
Question metadata shards contain one row per retained question and provide the canonical textual payload used to interpret dense and sparse vector rows.
|
| 68 |
-
|
| 69 |
-
Columns:
|
| 70 |
-
|
| 71 |
-
- `question_id`
|
| 72 |
-
- `language`
|
| 73 |
-
- `question_title`
|
| 74 |
-
- `question_full_text`
|
| 75 |
-
- `dense_text`
|
| 76 |
-
- `tags`
|
| 77 |
-
|
| 78 |
-
## `question_records`
|
| 79 |
-
|
| 80 |
-
Question record shards contain one row per retained question when parent-child indexing is disabled.
|
| 81 |
-
|
| 82 |
-
Columns:
|
| 83 |
-
|
| 84 |
-
- `question_id`
|
| 85 |
-
- `language`
|
| 86 |
-
- `question_title`
|
| 87 |
-
- `question_full_text`
|
| 88 |
-
- `dense_text`
|
| 89 |
-
- `tags`
|
| 90 |
-
- `dense_vector`
|
| 91 |
-
- `sparse_indices`
|
| 92 |
-
- `sparse_values`
|
| 93 |
-
- `export_source`
|
| 94 |
-
|
| 95 |
-
## `chunk_records`
|
| 96 |
-
|
| 97 |
-
Chunk record shards contain one row per child chunk when parent-child indexing is enabled.
|
| 98 |
-
|
| 99 |
-
Columns:
|
| 100 |
-
|
| 101 |
-
- `chunk_id`
|
| 102 |
-
- `question_id`
|
| 103 |
-
- `language`
|
| 104 |
-
- `chunk_index`
|
| 105 |
-
- `chunk_text`
|
| 106 |
-
- `sparse_text`
|
| 107 |
-
- `dense_vector`
|
| 108 |
-
- `sparse_indices`
|
| 109 |
-
- `sparse_values`
|
| 110 |
-
- `export_source`
|
| 111 |
-
|
| 112 |
-
# Embedding and Sparse Features
|
| 113 |
-
|
| 114 |
-
The current pipeline combines:
|
| 115 |
-
|
| 116 |
-
- dense embeddings from `nomic-ai/nomic-embed-code`
|
| 117 |
-
- sparse lexical features derived from `BAAI/bge-m3`
|
| 118 |
-
|
| 119 |
-
Dense vectors are stored in the `dense_vector` column when they are available in the export source.
|
| 120 |
-
|
| 121 |
-
Sparse vectors are stored in split form:
|
| 122 |
-
|
| 123 |
-
- `sparse_indices`
|
| 124 |
-
- `sparse_values`
|
| 125 |
-
|
| 126 |
-
This split representation is designed to be Parquet-friendly and easy to reconstruct into sparse retrieval structures in downstream systems.
|
| 127 |
-
|
| 128 |
-
# Export Provenance
|
| 129 |
-
|
| 130 |
-
The `export_source` column indicates where a given vector row came from:
|
| 131 |
-
|
| 132 |
-
- `embed`: written directly during the embedding run
|
| 133 |
-
- `qdrant`: exported from an existing Qdrant collection
|
| 134 |
-
- `cache`: exported from local preprocessing caches
|
| 135 |
-
|
| 136 |
-
Important note:
|
| 137 |
-
|
| 138 |
-
- exports from `embed` and `qdrant` include dense vectors
|
| 139 |
-
- exports from `cache` may omit dense vectors and therefore set `dense_vector` to `null`
|
| 140 |
-
|
| 141 |
-
# Parent-Child Indexing
|
| 142 |
-
|
| 143 |
-
The default vector pipeline uses parent-child indexing.
|
| 144 |
-
|
| 145 |
-
In this mode:
|
| 146 |
-
|
| 147 |
-
- each question remains available as `question_metadata`
|
| 148 |
-
- each question body is additionally split into overlapping child chunks
|
| 149 |
-
- chunk records are the main retrieval rows for vector search
|
| 150 |
-
- `question_id` links each chunk back to its parent question
|
| 151 |
-
|
| 152 |
-
The current default chunking parameters in the repository are:
|
| 153 |
-
|
| 154 |
-
- child chunk tokens: `384`
|
| 155 |
-
- child chunk stride: `256`
|
| 156 |
-
|
| 157 |
-
These values are configurable at export time through the repository pipeline.
|
| 158 |
-
|
| 159 |
-
# Supported Language Tags
|
| 160 |
-
|
| 161 |
-
The current pipeline retains questions when at least one tag matches this set:
|
| 162 |
-
|
| 163 |
-
- `java`, `c`, `c++`, `python`, `c#`, `javascript`, `assembly`, `php`, `perl`, `ruby`, `vb.net`, `swift`, `r`, `objective-c`, `go`, `sql`, `matlab`, `typescript`, `scala`, `kotlin`, `rust`, `lua`, `haskell`, `cobol`, `fortran`, `lisp`, `erlang`, `elixir`, `f#`, `dart`, `shell`, `bash`, `powershell`, `css`, `html`, `.net`, `julia`, `prolog`, `abap`
|
| 164 |
-
|
| 165 |
-
The `language` field in export rows is the normalized language bucket used by the repository pipeline.
|
| 166 |
-
|
| 167 |
-
# Construction Pipeline
|
| 168 |
|
| 169 |
-
|
|
|
|
| 170 |
|
| 171 |
-
|
| 172 |
-
2. Questions tagged with at least one supported programming-language tag are selected.
|
| 173 |
-
3. Question text is cleaned and normalized.
|
| 174 |
-
4. Sparse lexical features are generated.
|
| 175 |
-
5. Optional parent-child chunk records are generated.
|
| 176 |
-
6. Dense embeddings are computed and uploaded to Qdrant.
|
| 177 |
-
7. The final vector dataset is exported as Parquet shards and packaged into `.tar.gz` archive batches for Hugging Face upload.
|
| 178 |
|
| 179 |
-
The
|
| 180 |
|
| 181 |
-
|
| 182 |
-
- `vectorDatabase/preprocessing.py`
|
| 183 |
-
- `vectorDatabase/embed.py`
|
| 184 |
-
- `vectorDatabase/export_vector_dataset.py`
|
| 185 |
-
- `vectorDatabase/upload_hf_vector_dataset.py`
|
| 186 |
|
| 187 |
-
#
|
| 188 |
|
| 189 |
-
|
| 190 |
|
| 191 |
-
|
| 192 |
-
- semantic search over Stack Overflow questions
|
| 193 |
-
- hybrid dense+sparse retrieval
|
| 194 |
-
- chunk-level code and technical-text retrieval
|
| 195 |
-
- evaluation of retrieval pipelines over programming-language-specific Stack Overflow subsets
|
| 196 |
|
| 197 |
-
|
| 198 |
|
| 199 |
-
|
| 200 |
-
- A question may appear in multiple language buckets if it carries multiple supported language tags in earlier pipeline stages.
|
| 201 |
-
- Dense vectors may be missing when the dataset is exported from local caches rather than from embedding output or Qdrant.
|
| 202 |
-
- Chunk boundaries are heuristic and token-window-based, not semantic.
|
| 203 |
-
- Sparse features are lexical approximations and should not be treated as full inverted-index statistics.
|
| 204 |
-
- The export inherits the biases, moderation artifacts, language imbalance, and temporal drift of Stack Overflow content.
|
| 205 |
-
- Textual content is derived from Stack Overflow posts and may contain markup artifacts, noisy formatting, or incomplete context.
|
| 206 |
|
| 207 |
-
#
|
| 208 |
|
| 209 |
-
|
| 210 |
|
| 211 |
-
|
| 212 |
|
| 213 |
-
|
| 214 |
|
| 215 |
-
|
| 216 |
|
| 217 |
-
|
|
|
|
| 1 |
---
|
| 2 |
tags:
|
|
|
|
|
|
|
|
|
|
| 3 |
- stackoverflow
|
| 4 |
+
- qdrant
|
| 5 |
+
- embeddings
|
| 6 |
+
- retrieval
|
| 7 |
- question-answering
|
| 8 |
+
task_categories:
|
| 9 |
+
- feature-extraction
|
| 10 |
+
- question-answering
|
| 11 |
+
language:
|
| 12 |
+
- en
|
| 13 |
+
pretty_name: StackOverflow Vector Snapshot Dataset
|
| 14 |
license: cc-by-sa-4.0
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# Dataset Card for StackOverflow Vector Snapshot Dataset
|
| 18 |
|
| 19 |
+
## Summary
|
| 20 |
|
| 21 |
+
This dataset contains the vector-database component of Stack2Graph as restorable Qdrant snapshots.
|
| 22 |
|
| 23 |
+
The artifacts are intended for direct restore into Qdrant rather than row-wise reuse as a plain text or parquet dataset.
|
| 24 |
|
| 25 |
+
The repository covers the vector side of Stack2Graph only, not the accompanying knowledge graph artifact.
|
| 26 |
|
| 27 |
+
## Repository Layout
|
| 28 |
|
| 29 |
```text
|
| 30 |
+
qdrant_snapshots/
|
| 31 |
+
collections_manifest.json
|
| 32 |
archive_manifest.json
|
| 33 |
+
stackoverflow_python_vector.tar.xz
|
| 34 |
+
stackoverflow_java_vector.tar.xz
|
| 35 |
+
stackoverflow_javascript_vector.snapshot.xz.part_000
|
| 36 |
...
|
| 37 |
```
|
| 38 |
|
| 39 |
+
Each language is stored as exactly one restore unit:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
+
- a single `tar.xz` archive for regular-size snapshots
|
| 42 |
+
- split `xz` parts for oversized snapshots
|
| 43 |
|
| 44 |
+
## Content
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
+
The snapshots represent per-language Qdrant collections derived from Stack Overflow questions tagged with supported programming-language tags.
|
| 47 |
|
| 48 |
+
Each collection stores the vector index used by the Stack2Graph retrieval pipeline.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
+
The current pipeline covers major programming-language tags such as Python, Java, JavaScript, C, C++, C#, Go, Rust, TypeScript, SQL, Shell, and additional languages used throughout the project.
|
| 51 |
|
| 52 |
+
## Intended Use
|
| 53 |
|
| 54 |
+
This dataset is meant to be downloaded and restored into a running Qdrant instance.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
+
The repository manifest files describe which artifact files belong to which Qdrant collection.
|
| 57 |
|
| 58 |
+
It is primarily intended for retrieval experiments and system reconstruction, not for direct training from the packaged artifacts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
+
## Source
|
| 61 |
|
| 62 |
+
The snapshots are generated from Stack Overflow data after preprocessing, embedding, and Qdrant ingestion in the Stack2Graph pipeline.
|
| 63 |
|
| 64 |
+
## License
|
| 65 |
|
| 66 |
+
This dataset is distributed under `CC-BY-SA-4.0`.
|
| 67 |
|
| 68 |
+
## Citation
|
| 69 |
|
| 70 |
+
If you use this dataset, cite the Stack2Graph project and preserve the attribution requirements of `CC-BY-SA-4.0`.
|