Mo7art commited on
Commit
e6a5ff8
·
verified ·
1 Parent(s): 1461327

Add files using upload-large-folder tool

Browse files
README.md ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - vector-database
4
+ - embeddings
5
+ - parquet
6
+ - qdrant
7
+ - stackoverflow
8
+ - question-answering
9
+ pretty_name: StackOverflow Vector Dataset - Prolog
10
+ license: cc-by-sa-4.0
11
+ size_categories:
12
+ - 1M<n<10M
13
+ ---
14
+
15
+ # Prolog StackOverflow Vector Dataset
16
+
17
+ ## Summary
18
+
19
+ This repository contains the Prolog shard of the Stack2Graph vector retrieval dataset.
20
+ Each Hugging Face dataset repository contains one programming-language shard and is intended to restore or rebuild the Qdrant collection `stackoverflow_prolog_vector`.
21
+
22
+ 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.
23
+
24
+ Stack2Graph source:
25
+ [https://github.com/tha-atlas/Stack2Graph](https://github.com/tha-atlas/Stack2Graph)
26
+
27
+ ## Repository Layout
28
+
29
+ ```text
30
+ README.md
31
+ dataset_manifest.json
32
+ qdrant_snapshots/
33
+ collections_manifest.json
34
+ stackoverflow_prolog_vector.tar.zst
35
+ stackoverflow_prolog_vector.snapshot.zst.part_000
36
+ ...
37
+ question_metadata/
38
+ r0_00000.parquet
39
+ chunk_records/
40
+ r0_00000.parquet
41
+ question_records/
42
+ r0_00000.parquet
43
+ ```
44
+
45
+ - `dataset_manifest.json`: language-scoped manifest listing the files in this shard.
46
+ - `qdrant_snapshots/collections_manifest.json`: language-scoped Qdrant snapshot manifest.
47
+ - `qdrant_snapshots/stackoverflow_prolog_vector.*`: optional Qdrant restore artifact files for `stackoverflow_prolog_vector`.
48
+ - `question_metadata/*.parquet`: question-level metadata used by parent-child chunk retrieval.
49
+ - `chunk_records/*.parquet`: chunk-level vector rows when parent-child indexing is enabled.
50
+ - `question_records/*.parquet`: question-level vector rows when non-chunked export is used.
51
+
52
+ The Hugging Face upload is one repository per language. During upload, the local leading language directory is removed, so local files such as `prolog/chunk_records/r0_00000.parquet` appear in this repository as `chunk_records/r0_00000.parquet`.
53
+
54
+ ## Data Model
55
+
56
+ Rows are derived from Stack Overflow questions tagged for Prolog.
57
+
58
+ The current Stack2Graph vector pipeline uses:
59
+
60
+ - dense vectors from `Qwen/Qwen3-Embedding-8B`
61
+ - 4096-dimensional dense embeddings with last-token pooling
62
+ - instruction-aware query embedding for retrieval
63
+ - sparse lexical vectors from `BAAI/bge-m3`
64
+ - unified question text containing title, tags, cleaned problem text, and code
65
+ - optional parent-child indexing where chunk hits collapse back to parent question IDs
66
+
67
+ When Qdrant snapshots are included, they are the fastest restore path. The Parquet files remain the portable fallback for rebuilding the collection.
68
+
69
+ ## Coverage
70
+
71
+ This repository contains only the Prolog shard. A Stack Overflow question can appear in more than one language shard when it has multiple programming-language tags.
72
+
73
+ 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.
74
+
75
+ ## Recommended Use
76
+
77
+ Use this dataset for:
78
+
79
+ - semantic and hybrid retrieval
80
+ - Qdrant restore or ingestion tests
81
+ - Stack2Graph RAG experiments
82
+ - graph entry-point retrieval before QLever graph expansion
83
+ - vector database benchmarking and diagnostics
84
+
85
+ This dataset is not intended as a standalone supervised training dataset.
86
+
87
+ ## Restore With Stack2Graph
88
+
89
+ You do not need to regenerate embeddings to use this dataset.
90
+
91
+ Typical workflow:
92
+
93
+ 1. Clone Stack2Graph and configure `.env` with service paths and HF token.
94
+ 2. Start local services:
95
+
96
+ ```bash
97
+ docker compose up -d
98
+ ```
99
+
100
+ 3. Download and restore vector artifacts:
101
+
102
+ ```bash
103
+ python -m experiment.sources.hf --skip-kg
104
+ ```
105
+
106
+ The loader restores Qdrant snapshots when present and falls back to Parquet ingestion when snapshots are unavailable.
107
+
108
+ ## Manual Use
109
+
110
+ For manual use, inspect `dataset_manifest.json`, then either:
111
+
112
+ - restore the Qdrant snapshot artifacts under `qdrant_snapshots/`, or
113
+ - ingest the listed Parquet shards into a compatible vector database.
114
+
115
+ The target Qdrant collection name is:
116
+
117
+ ```text
118
+ stackoverflow_prolog_vector
119
+ ```
120
+
121
+ ## Quality Notes
122
+
123
+ - Embedding quality depends on the configured Stack2Graph export pipeline and model versions.
124
+ - Sparse text can be generated from the same unified text as dense embeddings or from a lexical variant, depending on export configuration.
125
+ - Community-generated Stack Overflow content may contain errors, outdated information, bias, or incomplete answers.
126
+ - Rebuilding from Parquet may produce operational differences if Qdrant collection settings differ from the original export.
127
+
128
+ ## License And Attribution
129
+
130
+ This dataset is derived from Stack Overflow content and is distributed under `CC-BY-SA-4.0`.
131
+ Preserve required attribution and license notices when redistributing derived artifacts.
132
+
133
+ ## Citation
134
+
135
+ If you use this dataset, cite the Stack2Graph project and preserve Stack Overflow attribution requirements:
136
+
137
+ - Stack2Graph: A Structured Knowledge Representation of Stack Overflow Data for Retrieval-based Question Answering
chunk_records/r0_00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1ced16b3836fad946785acbf97722c7d1b93b5b990de29c7bae39b2ae83dff5
3
+ size 12458095
chunk_records/r1_00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa6583677f37db580715406a915c2fb897c1821570efc6039a48b790291c76c5
3
+ size 12451282
chunk_records/r2_00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50c5c19d73c0c479c1b2844a6c2957b0c9215069a687892236006c3f399b0bd8
3
+ size 12433633
chunk_records/r3_00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:920af3bff117df49e0ea1727bb8673e1c15c8e4bcdda742c92266c16c983590a
3
+ size 12431729
chunk_records/r4_00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aad3955a1991e29a5091d2bac5808e37857eea3831914ab0abd70affb423bd46
3
+ size 12452225
chunk_records/r5_00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1809094c4138b3cdea5bb13c17bc3f5c78053f62d6ecd1155ac73868fa788c8a
3
+ size 12423013
chunk_records/r6_00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e557f3854ad74ca6ce1ec7be135d97a257cbdcf1276233441134549a48c34f6e
3
+ size 12443099
chunk_records/r7_00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac8cf461664e548871c9344019375523cdb027d8081bdf2dcbcdb40a56d151ab
3
+ size 12442825
dataset_manifest.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "file_count": 9,
3
+ "files": [
4
+ {
5
+ "category": "chunk_records",
6
+ "language": "prolog",
7
+ "relative_path": "chunk_records/r0_00000.parquet",
8
+ "rows": 1963
9
+ },
10
+ {
11
+ "category": "chunk_records",
12
+ "language": "prolog",
13
+ "relative_path": "chunk_records/r1_00000.parquet",
14
+ "rows": 1963
15
+ },
16
+ {
17
+ "category": "chunk_records",
18
+ "language": "prolog",
19
+ "relative_path": "chunk_records/r2_00000.parquet",
20
+ "rows": 1963
21
+ },
22
+ {
23
+ "category": "chunk_records",
24
+ "language": "prolog",
25
+ "relative_path": "chunk_records/r3_00000.parquet",
26
+ "rows": 1963
27
+ },
28
+ {
29
+ "category": "chunk_records",
30
+ "language": "prolog",
31
+ "relative_path": "chunk_records/r4_00000.parquet",
32
+ "rows": 1963
33
+ },
34
+ {
35
+ "category": "chunk_records",
36
+ "language": "prolog",
37
+ "relative_path": "chunk_records/r5_00000.parquet",
38
+ "rows": 1962
39
+ },
40
+ {
41
+ "category": "chunk_records",
42
+ "language": "prolog",
43
+ "relative_path": "chunk_records/r6_00000.parquet",
44
+ "rows": 1962
45
+ },
46
+ {
47
+ "category": "chunk_records",
48
+ "language": "prolog",
49
+ "relative_path": "chunk_records/r7_00000.parquet",
50
+ "rows": 1962
51
+ },
52
+ {
53
+ "category": "question_metadata",
54
+ "language": "prolog",
55
+ "relative_path": "question_metadata/r0_00000.parquet",
56
+ "rows": 13472
57
+ }
58
+ ],
59
+ "language": "prolog",
60
+ "qdrant_snapshot": {
61
+ "artifact_files": [
62
+ "part_003.tar.zst"
63
+ ],
64
+ "artifact_format": "tar.zst",
65
+ "collection_name": "stackoverflow_prolog_vector",
66
+ "manifest_path": "/var/stackoverflow_data/vector_dataset_archives/hf_upload_folder/prolog/qdrant_snapshots/collections_manifest.json",
67
+ "points_count": 15701,
68
+ "snapshot_file": "snapshots/stackoverflow_prolog_vector.snapshot"
69
+ },
70
+ "source": "vector_dataset_language_folder",
71
+ "total_rows": 29173
72
+ }
qdrant_snapshots/archives/part_003.tar.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f581a2300b9f6e85c443241a2aa220df3f7e6125b55ae54dc93d71fd3ff72ad0
3
+ size 927646677
qdrant_snapshots/collections_manifest.json ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "archive_dir": "archives",
3
+ "archive_format": "mixed",
4
+ "archive_parts": [
5
+ {
6
+ "archive_file": "archives/part_003.tar.zst",
7
+ "collection_names": [
8
+ "stackoverflow_julia_vector",
9
+ "stackoverflow_prolog_vector"
10
+ ],
11
+ "size_bytes": 927646677,
12
+ "snapshot_files": [
13
+ "snapshots/stackoverflow_julia_vector.snapshot",
14
+ "snapshots/stackoverflow_prolog_vector.snapshot"
15
+ ]
16
+ }
17
+ ],
18
+ "archive_size_limit_bytes": 1000000000,
19
+ "collection_glob": "stackoverflow_prolog_vector",
20
+ "collections": [
21
+ {
22
+ "archive_file": "archives/part_003.tar.zst",
23
+ "artifact_files": [
24
+ "archives/part_003.tar.zst"
25
+ ],
26
+ "artifact_format": "tar.zst",
27
+ "collection_name": "stackoverflow_prolog_vector",
28
+ "config": {
29
+ "config": {
30
+ "hnsw_config": {
31
+ "ef_construct": 100,
32
+ "full_scan_threshold": 10000,
33
+ "m": 16,
34
+ "max_indexing_threads": 16,
35
+ "on_disk": false
36
+ },
37
+ "optimizer_config": {
38
+ "default_segment_number": 0,
39
+ "deleted_threshold": 0.2,
40
+ "flush_interval_sec": 30,
41
+ "indexing_threshold": 20000,
42
+ "vacuum_min_vector_number": 1000
43
+ },
44
+ "params": {
45
+ "on_disk_payload": true,
46
+ "replication_factor": 1,
47
+ "shard_number": 8,
48
+ "sparse_vectors": {
49
+ "sparse": {
50
+ "index": {
51
+ "on_disk": true
52
+ }
53
+ }
54
+ },
55
+ "vectors": {
56
+ "dense": {
57
+ "distance": "Cosine",
58
+ "on_disk": false,
59
+ "size": 4096
60
+ }
61
+ },
62
+ "write_consistency_factor": 1
63
+ },
64
+ "quantization_config": {
65
+ "scalar": {
66
+ "always_ram": true,
67
+ "quantile": 0.99,
68
+ "type": "int8"
69
+ }
70
+ },
71
+ "wal_config": {
72
+ "wal_capacity_mb": 256,
73
+ "wal_retain_closed": 1,
74
+ "wal_segments_ahead": 0
75
+ }
76
+ },
77
+ "indexed_vectors_count": 15701,
78
+ "optimizer_status": "ok",
79
+ "payload_schema": {},
80
+ "points_count": 15701,
81
+ "segments_count": 64,
82
+ "status": "green",
83
+ "update_queue": {
84
+ "length": 0
85
+ }
86
+ },
87
+ "points_count": 15701,
88
+ "segments_count": 64,
89
+ "snapshot_file": "snapshots/stackoverflow_prolog_vector.snapshot",
90
+ "snapshot_name": "stackoverflow_prolog_vector-8271646633244964-2026-07-06-09-02-43.snapshot"
91
+ }
92
+ ],
93
+ "created_at": 1783366787,
94
+ "max_archive_parts": 1000,
95
+ "qdrant_url": "http://localhost:6333",
96
+ "snapshot_dir": "snapshots",
97
+ "snapshot_files": [
98
+ {
99
+ "checksum": "8690998c12da3ddef829e323eac026bb096e62da1e3aa33dc2472f5d49fff089",
100
+ "collection_name": "stackoverflow_prolog_vector",
101
+ "created_at": "2026-07-06T09:02:45",
102
+ "size_bytes": 476170240,
103
+ "snapshot_file": "snapshots/stackoverflow_prolog_vector.snapshot",
104
+ "snapshot_name": "stackoverflow_prolog_vector-8271646633244964-2026-07-06-09-02-43.snapshot"
105
+ }
106
+ ]
107
+ }
question_metadata/r0_00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:54cc2497aaccd3fa04f568b4ecf606c12171675d027068c9eaa60215d7aeb4b2
3
+ size 411169