File size: 6,522 Bytes
20a1721
 
 
 
33bafe0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4c37066
 
33bafe0
 
 
 
 
 
 
 
20a1721
98ed9c8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33bafe0
 
 
 
 
 
 
 
 
 
98ed9c8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d9b25dc
 
98ed9c8
 
d9b25dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98ed9c8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
---
configs:
- config_name: default
  data_files:
  - split: AskAcademia
    path: extracted/pairs/sub-AskAcademia.jsonl
  - split: AskBaking
    path: extracted/pairs/sub-AskBaking.jsonl
  - split: AskCulinary
    path: extracted/pairs/sub-AskCulinary.jsonl
  - split: AskDocs
    path: extracted/pairs/sub-AskDocs.jsonl
  - split: AskEngineers
    path: extracted/pairs/sub-AskEngineers.jsonl
  - split: AskHistorians
    path: extracted/pairs/sub-AskHistorians.jsonl
  - split: AskStatistics
    path: extracted/pairs/sub-AskStatistics.jsonl
  - split: Coffee
    path: extracted/pairs/sub-Coffee.jsonl
  - split: DIY
    path: extracted/pairs/sub-DIY.jsonl
  - split: German
    path: extracted/pairs/sub-German.jsonl
  - split: JapanTravel
    path: extracted/pairs/sub-JapanTravel.jsonl
  - split: LanguageTechnology
    path: extracted/pairs/sub-LanguageTechnology.jsonl
  - split: LearnJapanese
    path: extracted/pairs/sub-LearnJapanese.jsonl
  - split: Sewing
    path: extracted/pairs/sub-Sewing.jsonl
  - split: Shoestring
    path: extracted/pairs/sub-Shoestring.jsonl
  - split: askphilosophy
    path: extracted/pairs/sub-askphilosophy.jsonl
  - split: askscience
    path: extracted/pairs/sub-askscience.jsonl
  - split: bicycling
    path: extracted/pairs/sub-bicycling.jsonl
  - split: gardening
    path: extracted/pairs/sub-gardening.jsonl
  - split: golang
    path: extracted/pairs/sub-golang.jsonl
  - split: homeimprovement
    path: extracted/pairs/sub-homeimprovement.jsonl
  - split: houseplants
    path: extracted/pairs/sub-houseplants.jsonl
  - split: languagelearning
    path: extracted/pairs/sub-languagelearning.jsonl
  - split: learnjavascript
    path: extracted/pairs/sub-learnjavascript.jsonl
  - split: learnpython
    path: extracted/pairs/sub-learnpython.jsonl
  - split: rust
    path: extracted/pairs/sub-rust.jsonl
  - split: solotravel
    path: extracted/pairs/sub-solotravel.jsonl
  - split: tea
    path: extracted/pairs/sub-tea.jsonl
  - split: woodworking
    path: extracted/pairs/sub-woodworking.jsonl
---
# personalization-reddit

Per-subreddit `(query, preferred_answer)` pairs mined from Reddit using an
**OP-thanks-reply** heuristic: when the original poster (OP) replies to a
comment with thanks/gratitude, that parent comment is treated as their
preferred answer to their own question.

## Source

Raw post + comment dumps from the
[arctic_shift](https://github.com/ArthurHeitmann/arctic_shift) Pushshift
mirror, fetched per-subreddit (entire history through the fetch date) and
extracted with the pipeline in `may_15/reddit_pipeline/` of the
`personalization` repo.

Raw NDJSON dumps are kept locally and are not redistributed here.

## Splits

One split per subreddit; pick from the dropdown in the data viewer or load
programmatically:

```python
from datasets import load_dataset
ds = load_dataset("dipikakhullar/personalization-reddit", split="AskHistorians")
```

## Files

```
extracted/
  pairs/sub-<subreddit>.jsonl   # one (query, preferred_answer) per line
  stats/sub-<subreddit>.json    # funnel counts per subreddit
```

## Record schema (`pairs/sub-*.jsonl`)

| field | type | description |
|---|---|---|
| `user_id` | str | anonymized OP id (HMAC of Reddit username, see `anon.py`) |
| `timestamp` | str | post creation, ISO 8601 UTC |
| `subreddit` | str | source subreddit name |
| `query` | str | post title, with selftext appended if present |
| `preferred_answer` | str | body of the comment OP thanked (via parent of the thanks reply) |
| `top_comment` | str \| null | body of the highest-scoring non-OP comment (may equal preferred) |
| `op_metadata` | object | OP user fields captured at post time; see below |
| `answerer_metadata` | object | answerer user fields captured at comment time; see below |
| `metadata` | object | see below |

`op_metadata` sub-object (mirrors the multiturn dataset):

| field | type | description |
|---|---|---|
| `user_id` | str | same as top-level `user_id` |
| `author_flair_text` | str \| null | OP's flair text at post time |
| `author_flair_css_class` | str \| null | flair css class |
| `author_flair_type` | str \| null | e.g. "text", "richtext" |
| `author_flair_background_color` | str \| null | hex color |
| `author_flair_text_color` | str \| null | "light" / "dark" |

`answerer_metadata` sub-object:

| field | type | description |
|---|---|---|
| `user_id` | str | same as `metadata.answerer_anon_id` |
| `author_flair_text` | str \| null | answerer's flair text at comment time |
| `author_flair_css_class` | str \| null | flair css class |

`metadata` sub-object:

| field | type | description |
|---|---|---|
| `post_id` | str | Reddit submission id |
| `post_score` | int | submission score at fetch time |
| `answer_comment_id` | str | comment id of the preferred answer |
| `answer_score` | int | preferred-answer score at fetch time |
| `answerer_anon_id` | str | anonymized author id of the preferred answer |
| `top_comment_id` | str \| null | comment id of the top-scoring non-OP comment |
| `top_comment_score` | int \| null | top comment score |
| `top_comment_anon_id` | str \| null | anonymized top-comment author id |
| `top_equals_preferred` | bool | whether the preferred answer is also the top comment |
| `thanks_reply_id` | str | OP's thanks-reply comment id (the signal that triggered the pair) |
| `thanks_reply_score` | int | score of OP's thanks reply |
| `thanks_reply_text` | str | body of OP's thanks reply |
| `thanks_reply_timestamp` | str | thanks reply creation, ISO 8601 UTC |

## Heuristic — OP thanks-reply

For each post that passes a question filter:
1. Find comments whose author == OP and whose body matches a "thanks"
   pattern (see `signals.py::is_thanks_reply`).
2. The parent of each such reply is recorded as a candidate "preferred answer".
3. Materialize each candidate into a pair, joining post metadata + answer body
   + thanks-reply context.

Bots and deleted/removed authors are filtered out before pair emission
(`signals.py`, `subreddits.py::BOT_AUTHORS`).

## Anonymization

Reddit usernames are hashed via HMAC-SHA256 with a per-run secret salt
(`anon.py::anon_user_id`) before being written. Post/comment ids and text
bodies are kept verbatim — content from public Reddit threads can still be
re-identified by searching the post id or quoting the body.

## Subreddits included in this snapshot

See `extracted/stats/` for the list and per-sub funnel counts
(`rs_records_scanned`, `keep_posts`, `thanks_refs`, `pairs_emitted`, etc.).