jmarceno commited on
Commit
107d71b
·
verified ·
1 Parent(s): 5a9e075

Publish elixir-preference dataset snapshot

Browse files
.gitattributes CHANGED
@@ -1,60 +1,3 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.avro filter=lfs diff=lfs merge=lfs -text
4
- *.bin filter=lfs diff=lfs merge=lfs -text
5
- *.bz2 filter=lfs diff=lfs merge=lfs -text
6
- *.ckpt filter=lfs diff=lfs merge=lfs -text
7
- *.ftz filter=lfs diff=lfs merge=lfs -text
8
- *.gz filter=lfs diff=lfs merge=lfs -text
9
- *.h5 filter=lfs diff=lfs merge=lfs -text
10
- *.joblib filter=lfs diff=lfs merge=lfs -text
11
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
12
- *.lz4 filter=lfs diff=lfs merge=lfs -text
13
- *.mds filter=lfs diff=lfs merge=lfs -text
14
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
15
- *.model filter=lfs diff=lfs merge=lfs -text
16
- *.msgpack filter=lfs diff=lfs merge=lfs -text
17
- *.npy filter=lfs diff=lfs merge=lfs -text
18
- *.npz filter=lfs diff=lfs merge=lfs -text
19
- *.onnx filter=lfs diff=lfs merge=lfs -text
20
- *.ot filter=lfs diff=lfs merge=lfs -text
21
- *.parquet filter=lfs diff=lfs merge=lfs -text
22
- *.pb filter=lfs diff=lfs merge=lfs -text
23
- *.pickle filter=lfs diff=lfs merge=lfs -text
24
- *.pkl filter=lfs diff=lfs merge=lfs -text
25
- *.pt filter=lfs diff=lfs merge=lfs -text
26
- *.pth filter=lfs diff=lfs merge=lfs -text
27
- *.rar filter=lfs diff=lfs merge=lfs -text
28
- *.safetensors filter=lfs diff=lfs merge=lfs -text
29
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
30
- *.tar.* filter=lfs diff=lfs merge=lfs -text
31
- *.tar filter=lfs diff=lfs merge=lfs -text
32
- *.tflite filter=lfs diff=lfs merge=lfs -text
33
- *.tgz filter=lfs diff=lfs merge=lfs -text
34
- *.wasm filter=lfs diff=lfs merge=lfs -text
35
- *.xz filter=lfs diff=lfs merge=lfs -text
36
- *.zip filter=lfs diff=lfs merge=lfs -text
37
- *.zst filter=lfs diff=lfs merge=lfs -text
38
- *tfevents* filter=lfs diff=lfs merge=lfs -text
39
- # Audio files - uncompressed
40
- *.pcm filter=lfs diff=lfs merge=lfs -text
41
- *.sam filter=lfs diff=lfs merge=lfs -text
42
- *.raw filter=lfs diff=lfs merge=lfs -text
43
- # Audio files - compressed
44
- *.aac filter=lfs diff=lfs merge=lfs -text
45
- *.flac filter=lfs diff=lfs merge=lfs -text
46
- *.mp3 filter=lfs diff=lfs merge=lfs -text
47
- *.ogg filter=lfs diff=lfs merge=lfs -text
48
- *.wav filter=lfs diff=lfs merge=lfs -text
49
- # Image files - uncompressed
50
- *.bmp filter=lfs diff=lfs merge=lfs -text
51
- *.gif filter=lfs diff=lfs merge=lfs -text
52
- *.png filter=lfs diff=lfs merge=lfs -text
53
- *.tiff filter=lfs diff=lfs merge=lfs -text
54
- # Image files - compressed
55
- *.jpg filter=lfs diff=lfs merge=lfs -text
56
- *.jpeg filter=lfs diff=lfs merge=lfs -text
57
- *.webp filter=lfs diff=lfs merge=lfs -text
58
- # Video files - compressed
59
- *.mp4 filter=lfs diff=lfs merge=lfs -text
60
- *.webm filter=lfs diff=lfs merge=lfs -text
 
1
+ # Keep bytes exactly as built so metadata/sha256sums.txt stays valid.
2
+ *.jsonl -text
3
+ *.json -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
LICENSE ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
README.md ADDED
@@ -0,0 +1,250 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: Elixir preference optimization — DPO and KTO sets
3
+ license: apache-2.0
4
+ language:
5
+ - en
6
+ tags:
7
+ - elixir
8
+ - code
9
+ - code-generation
10
+ - preference-optimization
11
+ - dpo
12
+ - kto
13
+ - rlhf
14
+ - otp
15
+ task_categories:
16
+ - text-generation
17
+ size_categories:
18
+ - n<1K
19
+ configs:
20
+ - config_name: dpo-failv0
21
+ data_files: data/dpo/dpo_failv0.jsonl
22
+ default: true
23
+ - config_name: kto-v0
24
+ data_files: data/kto/kto_v0.jsonl
25
+ - config_name: onpolicy-micro-dpo-v1
26
+ data_files: data/onpolicy/qwen25c3b_micro_dpo_v1.jsonl
27
+ - config_name: onpolicy-round02-dpo
28
+ data_files: data/onpolicy/qwen25c3b_micro_round2_dpo.jsonl
29
+ - config_name: onpolicy-round04-dpo
30
+ data_files: data/onpolicy/qwen25c3b_micro_round4_dpo.jsonl
31
+ - config_name: onpolicy-round13-dpo
32
+ data_files: data/onpolicy/qwen25c3b_micro_round13_dpo.jsonl
33
+ - config_name: onpolicy-round03-kto
34
+ data_files: data/onpolicy/qwen25c3b_micro_round3_kto.jsonl
35
+ - config_name: onpolicy-round06-kto
36
+ data_files: data/onpolicy/qwen25c3b_micro_round6_kto.jsonl
37
+ - config_name: onpolicy-round11-kto
38
+ data_files: data/onpolicy/qwen25c3b_micro_round11_kto.jsonl
39
+ ---
40
+
41
+ # Elixir preference optimization — DPO and KTO sets
42
+
43
+ **909 preference rows in 9 configs** for Elixir code models: 654 DPO pairs, 76 balanced
44
+ KTO examples, and 179 rows from the on-policy Qwen2.5-Coder-3B refinement rounds. Every
45
+ chosen completion was executed and passed the project's isolated Elixir scorer (compile +
46
+ ExUnit + static contract checks); every rejected completion was confirmed to fail the
47
+ intended gate. The frozen evaluation packs are held out: measured prompt-level and
48
+ module-level collisions are **zero** for every config.
49
+
50
+ > **Do not execute the rejected completions.** They are deliberately broken, and some
51
+ > contain intentional defects (swallowed errors, wrong endianness, unsafe state handling).
52
+ > Treat every `rejected` field as hostile input.
53
+
54
+ ## What "preference" means here
55
+
56
+ These pairs are not style opinions. They encode **executable correctness and static
57
+ contracts** for Elixir:
58
+
59
+ - `preference_kind: correctness` — the chosen module compiles and passes its tests; the
60
+ rejected one fails to compile, fails a test, or drops a required contract.
61
+ - `preference_kind: functional-style` — both sides may behave correctly, but the rejected
62
+ side uses process state, side effects or a non-idiomatic construct where the task
63
+ explicitly asked for pure functional code. The rejection is a violated static gate, not
64
+ a matter of taste.
65
+
66
+ The failure modes were mined from real model output, then re-targeted onto original tasks
67
+ with new module names and specifications, so no benchmark task is copied into the data.
68
+
69
+ ## Configs
70
+
71
+ | config | rows | format | what it is |
72
+ | --- | ---: | --- | --- |
73
+ | `dpo-failv0` | 654 | DPO pairs | Mined from evaluation failures of `gemma12b-elixir-cpt-q4` (40/128) and `qwen35-9b-elixir-cpt-sft-q5` (46/128). 534 correctness pairs + 120 functional-style pairs. |
74
+ | `kto-v0` | 76 | KTO | Balanced 38 accepted / 38 rejected. Each original task contributes exactly one accepted and one rejected completion; 40 functional-style + 36 correctness rows. |
75
+ | `onpolicy-micro-dpo-v1` | 36 | DPO pairs | First on-policy DPO round for the Qwen2.5-Coder-3B depth-expanded checkpoint. |
76
+ | `onpolicy-round02-dpo` | 25 | DPO pairs | Round 2: up to three fresh, scorer-gated prompts per construction weakness; format-only pairs excluded. |
77
+ | `onpolicy-round04-dpo` | 11 | DPO pairs | Round 4. |
78
+ | `onpolicy-round13-dpo` | 17 | DPO pairs | Round 13. |
79
+ | `onpolicy-round03-kto` | 34 | KTO | Round 3 KTO: OTP and bit-syntax focus. |
80
+ | `onpolicy-round06-kto` | 22 | KTO | Round 6 KTO: functional-style focus (12 functional rows). |
81
+ | `onpolicy-round11-kto` | 34 | KTO | Round 11 KTO: four rows per family. |
82
+
83
+ DPO family coverage (`dpo-failv0`): otp 134, functional 120, binaries 119, beam 66,
84
+ stdlib 49, errors 47, abstractions 41, core 41, collections 37. The weakness taxonomy is
85
+ distilled from the failing completions — the largest buckets are `format-hygiene` (114),
86
+ `enum-state` (99), `err-swallow` (42), `edge-empty` (42), `functional-style-process-state`
87
+ (40), `functional-style-agent-state` (40), `bin-size-guard` (33) and `bin-endian` (24);
88
+ the complete per-weakness counts are in `metadata/dataset_stats.json`.
89
+
90
+ KTO family coverage: functional 40, otp 12, binaries 10, protocol 4, stdlib 4, errors 2,
91
+ core 2, format 2.
92
+
93
+ The `onpolicy-*` configs are **checkpoint-specific** artifacts of one model's targeted
94
+ rounds; each round's build manifest (base checkpoint, selection rules, counts, validation)
95
+ is in `metadata/manifests/`. If you want a single general preference set, use
96
+ `dpo-failv0` (or `kto-v0` for the balanced KTO formulation).
97
+
98
+ ## Row schemas
99
+
100
+ DPO (`dpo-failv0` and the on-policy DPO configs) — ShareGPT prompt plus two string
101
+ completions:
102
+
103
+ ```json
104
+ {
105
+ "id": "dpo.binaries.s16be.bin-endian",
106
+ "family": "binaries",
107
+ "source": "elixir_dpo_failv0",
108
+ "weakness": "bin-endian",
109
+ "origin": "designed",
110
+ "preference_kind": "correctness",
111
+ "models": ["gemma12b-elixir-cpt-q4", "qwen35-9b-elixir-cpt-sft-q5"],
112
+ "conversations": [
113
+ {"from": "system", "value": "You are a friendly coding assistant ..."},
114
+ {"from": "human", "value": "Write a module `S16BE` with: ..."}
115
+ ],
116
+ "chosen": "```elixir\ndefmodule S16BE do ... end\n```",
117
+ "rejected": "```elixir\ndefmodule S16BE do ... end\n```"
118
+ }
119
+ ```
120
+
121
+ KTO (`kto-v0` and the on-policy KTO configs) — TRL conversational schema with a boolean
122
+ label:
123
+
124
+ ```json
125
+ {
126
+ "id": "kto.functional.map-pipeline.chosen",
127
+ "family": "functional",
128
+ "label": true,
129
+ "preference_kind": "functional-style",
130
+ "weakness": "functional-pipeline",
131
+ "prompt": [
132
+ {"role": "system", "content": "You are a friendly coding assistant ..."},
133
+ {"role": "user", "content": "Write a module `KtoFnMapPipeline` with: ..."}
134
+ ],
135
+ "completion": [{"role": "assistant", "content": "```elixir ... ```"}]
136
+ }
137
+ ```
138
+
139
+ In DPO files, `models` records which checkpoints' failures motivated the pair and
140
+ `origin` distinguishes `designed`, `handmade` and `functional-style` rows. The on-policy
141
+ files carry the same fields plus the round-specific annotations.
142
+
143
+ ## Loading
144
+
145
+ ```python
146
+ from datasets import load_dataset
147
+
148
+ dpo = load_dataset("jmarceno/elixir-preference", "dpo-failv0", split="train")
149
+ kto = load_dataset("jmarceno/elixir-preference", "kto-v0", split="train")
150
+ print(dpo[0]["chosen"][:200])
151
+ print(kto[0]["label"], kto[0]["prompt"])
152
+ ```
153
+
154
+ Raw JSONL:
155
+
156
+ ```python
157
+ from huggingface_hub import hf_hub_download
158
+
159
+ path = hf_hub_download(
160
+ "jmarceno/elixir-preference", "data/dpo/dpo_failv0.jsonl", repo_type="dataset"
161
+ )
162
+ ```
163
+
164
+ Shaping the DPO file for TRL `DPOTrainer`:
165
+
166
+ ```python
167
+ from datasets import load_dataset
168
+
169
+ ROLE = {"system": "system", "human": "user", "gpt": "assistant"}
170
+
171
+ def to_dpo(row):
172
+ return {
173
+ "prompt": [
174
+ {"role": ROLE[turn["from"]], "content": turn["value"]}
175
+ for turn in row["conversations"]
176
+ ],
177
+ "chosen": [{"role": "assistant", "content": row["chosen"]}],
178
+ "rejected": [{"role": "assistant", "content": row["rejected"]}],
179
+ }
180
+
181
+ ds = load_dataset("jmarceno/elixir-preference", "dpo-failv0", split="train")
182
+ ds = ds.map(to_dpo, remove_columns=ds.column_names)
183
+ ```
184
+
185
+ The KTO configs already match the TRL `KTOTrainer` columns (`prompt`, `completion`,
186
+ `label`) and need no conversion.
187
+
188
+ ## Quality gates
189
+
190
+ - Every `chosen` completion was executed through the real scorer: compile, generated ExUnit
191
+ tests, and static contract checks. A row only ships when the chosen side has zero test
192
+ failures and a clean static result; compile warnings are counted and reported.
193
+ - Every `rejected` completion fails the declared gate for a reason recorded in `weakness`.
194
+ For functional-style pairs, the rejected side is behaviourally correct and fails only the
195
+ declared style gate — that is the teaching signal.
196
+ - Ids are unique per file, and prompts are unique per file.
197
+ - Zero exact prompt collisions and zero module-name collisions against both frozen
198
+ evaluation packs.
199
+ - `metadata/sha256sums.txt` lets you confirm the bytes you downloaded are the bytes that
200
+ passed those gates.
201
+
202
+ ## Intended use and limitations
203
+
204
+ - **Intended:** DPO or KTO preference tuning of Elixir code models that already produce
205
+ working code, especially for OTP timeouts, error handling, edge cases, bit syntax and
206
+ functional style.
207
+ - **Not intended:** as a standalone fine-tuning dataset (use an SFT set first), for
208
+ instruction-following evaluation, for multi-turn agent data, or for any non-Elixir
209
+ language.
210
+ - 909 rows is small by design. These sets target specific failure families observed in this
211
+ project's models; they are not a general Elixir preference corpus and will not teach
212
+ unrelated skills.
213
+ - Rejected completions are broken on purpose; never execute them in an unsandboxed process.
214
+ - Do not treat the size of a configuration as its importance: the on-policy rounds exist to
215
+ document a training loop, not to be pooled blindly into a new run.
216
+
217
+ ## Provenance and licensing
218
+
219
+ Rows were authored for this project and mined from this project's own model evaluations on
220
+ original tasks. No benchmark task and no upstream repository code is redistributed here.
221
+ The CPT corpora (which do contain upstream Elixir/Erlang sources) are published separately.
222
+
223
+ Released under **Apache-2.0**. "Elixir" and "Erlang" are trademarks of their respective
224
+ owners; this dataset is not affiliated with or endorsed by the Elixir or Erlang teams.
225
+
226
+ ## Repository layout
227
+
228
+ ```
229
+ data/dpo/dpo_failv0.jsonl dpo-failv0
230
+ data/kto/kto_v0.jsonl kto-v0
231
+ data/onpolicy/qwen25c3b_micro_*_dpo.jsonl onpolicy-*-dpo configs
232
+ data/onpolicy/qwen25c3b_micro_*_kto.jsonl onpolicy-*-kto configs
233
+ metadata/dataset_stats.json per-file rows, hashes, families, pack overlap
234
+ metadata/sha256sums.txt data-file checksums
235
+ metadata/provenance.json source commit, exclusions, build note
236
+ metadata/manifests/*.json per-round build manifests
237
+ ```
238
+
239
+ ## Citation
240
+
241
+ ```bibtex
242
+ @dataset{jmarceno_elixir_preference_2026,
243
+ author = {jmarceno},
244
+ title = {Elixir preference optimization — DPO and KTO sets},
245
+ year = {2026},
246
+ publisher = {Hugging Face},
247
+ url = {https://huggingface.co/datasets/jmarceno/elixir-preference},
248
+ note = {Apache-2.0}
249
+ }
250
+ ```
data/dpo/dpo_failv0.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
data/kto/kto_v0.jsonl ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"id": "kto.functional.map-pipeline.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-pipeline", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnMapPipeline` with:\n\nDefine `normalize/1` for a list of names. Trim whitespace, discard\nempty names, and lowercase the remaining names. Prefer a pipeline\nof pure `Enum` transformations and immutable values; do not use\nprocess state or a side-effecting iteration function.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnMapPipeline do\n @spec normalize([String.t()]) :: [String.t()]\n def normalize(names) when is_list(names) do\n names\n |> Enum.map(&String.trim/1)\n |> Enum.reject(&(&1 == \"\"))\n |> Enum.map(&String.downcase/1)\n end\nend\n```"}]}
2
+ {"id": "kto.functional.map-pipeline.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-pipeline", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnMapPipeline` with:\n\nDefine `normalize/1` for a list of names. Trim whitespace, discard\nempty names, and lowercase the remaining names. Prefer a pipeline\nof pure `Enum` transformations and immutable values; do not use\nprocess state or a side-effecting iteration function.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnMapPipeline do\n @spec normalize([String.t()]) :: [String.t()]\n def normalize(names) when is_list(names) do\n key = {__MODULE__, make_ref()}\n Process.put(key, [])\n\n Enum.each(names, fn name ->\n trimmed = String.trim(name)\n\n if trimmed != \"\" do\n Process.put(key, [String.downcase(trimmed) | Process.get(key, [])])\n end\n end)\n\n result = key |> Process.get([]) |> Enum.reverse()\n Process.delete(key)\n result\n end\nend\n```"}]}
3
+ {"id": "kto.functional.frequency-reduce.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-reduce", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnFrequency` with:\n\nDefine `count/1` to return a map of item frequencies. Thread the\naccumulator explicitly through `Enum.reduce/3`; keep the function\npure and do not use the process dictionary, an Agent, or ETS.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnFrequency do\n @spec count([term()]) :: %{optional(term()) => non_neg_integer()}\n def count(items) when is_list(items) do\n Enum.reduce(items, %{}, fn item, counts ->\n Map.update(counts, item, 1, &(&1 + 1))\n end)\n end\nend\n```"}]}
4
+ {"id": "kto.functional.frequency-reduce.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-reduce", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnFrequency` with:\n\nDefine `count/1` to return a map of item frequencies. Thread the\naccumulator explicitly through `Enum.reduce/3`; keep the function\npure and do not use the process dictionary, an Agent, or ETS.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnFrequency do\n @spec count([term()]) :: map()\n def count(items) when is_list(items) do\n key = {__MODULE__, make_ref()}\n Process.put(key, %{})\n\n Enum.each(items, fn item ->\n Process.put(key, Map.update(Process.get(key), item, 1, &(&1 + 1)))\n end)\n\n result = Process.get(key)\n Process.delete(key)\n result\n end\nend\n```"}]}
5
+ {"id": "kto.functional.map-reduce.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-state-threading", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnMapReduce` with:\n\nDefine `scale/2` to return `{scaled_values, total}`. Use\n`Enum.map_reduce/3` so the transformed collection and accumulated\nstate are returned together, without an externally mutated total.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnMapReduce do\n @spec scale([number()], number()) :: {[number()], number()}\n def scale(values, factor) when is_list(values) do\n Enum.map_reduce(values, 0, fn value, total ->\n scaled = value * factor\n {scaled, total + scaled}\n end)\n end\nend\n```"}]}
6
+ {"id": "kto.functional.map-reduce.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-state-threading", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnMapReduce` with:\n\nDefine `scale/2` to return `{scaled_values, total}`. Use\n`Enum.map_reduce/3` so the transformed collection and accumulated\nstate are returned together, without an externally mutated total.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnMapReduce do\n @spec scale([number()], number()) :: {[number()], number()}\n def scale(values, factor) when is_list(values) do\n scaled = Enum.map(values, &(&1 * factor))\n {scaled, Enum.sum(scaled)}\n end\nend\n```"}]}
7
+ {"id": "kto.functional.reduce-while.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-early-halt", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnFirstError` with:\n\nDefine `first_invalid/1`. Return `:ok` when all integers are\nnon-negative, otherwise return `{:error, value}` for the first\nnegative value. Use `Enum.reduce_while/3` to halt as soon as the\nfirst invalid value is found.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnFirstError do\n @spec first_invalid([integer()]) :: :ok | {:error, integer()}\n def first_invalid(values) when is_list(values) do\n Enum.reduce_while(values, :ok, fn value, :ok ->\n if value >= 0 do\n {:cont, :ok}\n else\n {:halt, {:error, value}}\n end\n end)\n end\nend\n```"}]}
8
+ {"id": "kto.functional.reduce-while.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-early-halt", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnFirstError` with:\n\nDefine `first_invalid/1`. Return `:ok` when all integers are\nnon-negative, otherwise return `{:error, value}` for the first\nnegative value. Use `Enum.reduce_while/3` to halt as soon as the\nfirst invalid value is found.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnFirstError do\n @spec first_invalid([integer()]) :: :ok | {:error, integer()}\n def first_invalid(values) when is_list(values) do\n Enum.reduce(values, :ok, fn value, result ->\n case result do\n :ok -> if value >= 0, do: :ok, else: {:error, value}\n {:error, _value} = error -> error\n end\n end)\n end\nend\n```"}]}
9
+ {"id": "kto.functional.stable-unique.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-immutable-accumulator", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnStableUnique` with:\n\nDefine `run/1` to remove duplicates while preserving the first\noccurrence order. Use an immutable `{seen, output}` accumulator and\nreturn the reversed output at the end.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnStableUnique do\n @spec run([term()]) :: [term()]\n def run(items) when is_list(items) do\n {_seen, output} =\n Enum.reduce(items, {MapSet.new(), []}, fn item, {seen, output} ->\n if MapSet.member?(seen, item) do\n {seen, output}\n else\n {MapSet.put(seen, item), [item | output]}\n end\n end)\n\n Enum.reverse(output)\n end\nend\n```"}]}
10
+ {"id": "kto.functional.stable-unique.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-immutable-accumulator", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnStableUnique` with:\n\nDefine `run/1` to remove duplicates while preserving the first\noccurrence order. Use an immutable `{seen, output}` accumulator and\nreturn the reversed output at the end.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnStableUnique do\n @spec run([term()]) :: [term()]\n def run(items) when is_list(items) do\n {_seen, output} =\n Enum.reduce(items, {MapSet.new(), []}, fn item, {seen, output} ->\n if MapSet.member?(seen, item) do\n {seen, output}\n else\n {MapSet.put(seen, item), output ++ [item]}\n end\n end)\n\n output\n end\nend\n```"}]}
11
+ {"id": "kto.functional.with-parse.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "err-with-else", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnParsePair` with:\n\nDefine `sum/2` for two decimal strings. Return `{:ok, sum}` only\nwhen both strings contain an integer with no trailing characters;\notherwise return `{:error, :invalid}`. Use `with` with an explicit\nfallback instead of rescuing all exceptions into success.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnParsePair do\n @spec sum(String.t(), String.t()) :: {:ok, integer()} | {:error, :invalid}\n def sum(left, right) when is_binary(left) and is_binary(right) do\n with {left_number, \"\"} <- Integer.parse(left),\n {right_number, \"\"} <- Integer.parse(right) do\n {:ok, left_number + right_number}\n else\n _ -> {:error, :invalid}\n end\n end\nend\n```"}]}
12
+ {"id": "kto.functional.with-parse.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "err-with-else", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnParsePair` with:\n\nDefine `sum/2` for two decimal strings. Return `{:ok, sum}` only\nwhen both strings contain an integer with no trailing characters;\notherwise return `{:error, :invalid}`. Use `with` with an explicit\nfallback instead of rescuing all exceptions into success.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnParsePair do\n @spec sum(String.t(), String.t()) :: {:ok, integer()} | {:error, :invalid}\n def sum(left, right) when is_binary(left) and is_binary(right) do\n try do\n {:ok, String.to_integer(left) + String.to_integer(right)}\n rescue\n ArgumentError -> {:error, :invalid}\n end\n end\nend\n```"}]}
13
+ {"id": "kto.functional.keyword-fetch.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "edge-absent-key", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnKeywordMode` with:\n\nDefine `mode/1` for keyword options. Return `{:ok, value}` when\n`:mode` is present, and `{:error, :missing}` when it is absent.\nPreserve the distinction between a missing key and a key whose\nvalue is `nil` by using `Keyword.fetch/2`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnKeywordMode do\n @spec mode(keyword()) :: {:ok, term()} | {:error, :missing}\n def mode(options) when is_list(options) do\n case Keyword.fetch(options, :mode) do\n {:ok, value} -> {:ok, value}\n :error -> {:error, :missing}\n end\n end\nend\n```"}]}
14
+ {"id": "kto.functional.keyword-fetch.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "edge-absent-key", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnKeywordMode` with:\n\nDefine `mode/1` for keyword options. Return `{:ok, value}` when\n`:mode` is present, and `{:error, :missing}` when it is absent.\nPreserve the distinction between a missing key and a key whose\nvalue is `nil` by using `Keyword.fetch/2`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnKeywordMode do\n @spec mode(keyword()) :: {:ok, term()} | {:error, :missing}\n def mode(options) when is_list(options) do\n if Keyword.has_key?(options, :mode) do\n {:ok, Keyword.get(options, :mode)}\n else\n {:error, :missing}\n end\n end\nend\n```"}]}
15
+ {"id": "kto.functional.nested-update.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-nested-update", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnNestedUpdate` with:\n\nDefine `add_score/2` for a profile containing\n`%{stats: %{score: integer}}`. Add the delta to the nested score,\npreserving every other key through an immutable nested update.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnNestedUpdate do\n @spec add_score(map(), integer()) :: map()\n def add_score(profile, delta) when is_map(profile) and is_integer(delta) do\n update_in(profile, [:stats, :score], &(&1 + delta))\n end\nend\n```"}]}
16
+ {"id": "kto.functional.nested-update.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-nested-update", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnNestedUpdate` with:\n\nDefine `add_score/2` for a profile containing\n`%{stats: %{score: integer}}`. Add the delta to the nested score,\npreserving every other key through an immutable nested update.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnNestedUpdate do\n @spec add_score(map(), integer()) :: map()\n def add_score(profile, delta) when is_map(profile) and is_integer(delta) do\n stats = Map.fetch!(profile, :stats)\n score = Map.fetch!(stats, :score)\n Map.put(profile, :stats, Map.put(stats, :score, score + delta))\n end\nend\n```"}]}
17
+ {"id": "kto.functional.pattern-clauses.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-pattern-clauses", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnPatternClauses` with:\n\nDefine `kind/1` so `{:ok, value}` returns `{:value, value}`,\n`{:error, reason}` returns `{:failure, reason}`, and every other\nterm returns `:unknown`. Express the shapes as function clauses.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnPatternClauses do\n @spec kind(term()) :: {:value, term()} | {:failure, term()} | :unknown\n def kind({:ok, value}), do: {:value, value}\n def kind({:error, reason}), do: {:failure, reason}\n def kind(_other), do: :unknown\nend\n```"}]}
18
+ {"id": "kto.functional.pattern-clauses.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-pattern-clauses", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnPatternClauses` with:\n\nDefine `kind/1` so `{:ok, value}` returns `{:value, value}`,\n`{:error, reason}` returns `{:failure, reason}`, and every other\nterm returns `:unknown`. Express the shapes as function clauses.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnPatternClauses do\n @spec kind(term()) :: {:value, term()} | {:failure, term()} | :unknown\n def kind(value) do\n case value do\n {:ok, inner} -> {:value, inner}\n {:error, reason} -> {:failure, reason}\n _other -> :unknown\n end\n end\nend\n```"}]}
19
+ {"id": "kto.functional.pure-transition.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-pure-transition", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnPureTransition` with:\n\nDefine `step/2` for `%{count: integer}`. `:increment` returns a\nstate with count increased by one and `:reset` returns count zero.\nKeep it as a pure transition with event-pattern clauses.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnPureTransition do\n @spec step(map(), :increment | :reset) :: map()\n def step(state, :increment), do: %{state | count: state.count + 1}\n def step(state, :reset), do: %{state | count: 0}\nend\n```"}]}
20
+ {"id": "kto.functional.pure-transition.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-pure-transition", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnPureTransition` with:\n\nDefine `step/2` for `%{count: integer}`. `:increment` returns a\nstate with count increased by one and `:reset` returns count zero.\nKeep it as a pure transition with event-pattern clauses.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnPureTransition do\n @spec step(map(), :increment | :reset) :: map()\n def step(state, event) do\n {:ok, holder} = Agent.start_link(fn -> state end)\n\n Agent.update(holder, fn current ->\n case event do\n :increment -> %{current | count: current.count + 1}\n :reset -> %{current | count: 0}\n end\n end)\n\n result = Agent.get(holder, & &1)\n Agent.stop(holder)\n result\n end\nend\n```"}]}
21
+ {"id": "kto.functional.linear-recursion.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-linear-recursion", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnLinearRecursion` with:\n\nDefine `double/1` recursively for a list of integers. Build the\nresult by prepending to an accumulator and reverse once; avoid\nrepeated list concatenation.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnLinearRecursion do\n @spec double([integer()]) :: [integer()]\n def double(values) when is_list(values), do: loop(values, [])\n\n defp loop([], reversed), do: Enum.reverse(reversed)\n defp loop([head | tail], reversed), do: loop(tail, [head * 2 | reversed])\nend\n```"}]}
22
+ {"id": "kto.functional.linear-recursion.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-linear-recursion", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnLinearRecursion` with:\n\nDefine `double/1` recursively for a list of integers. Build the\nresult by prepending to an accumulator and reverse once; avoid\nrepeated list concatenation.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnLinearRecursion do\n @spec double([integer()]) :: [integer()]\n def double([]), do: []\n def double([head | tail]), do: [head * 2] ++ double(tail)\nend\n```"}]}
23
+ {"id": "kto.functional.comprehension.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-comprehension", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnComprehension` with:\n\nDefine `pairs/2` to return `{left, right}` for every combination\nwhose integer sum is even. Preserve input iteration order and use\na comprehension with a filter.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnComprehension do\n @spec pairs([integer()], [integer()]) :: [{integer(), integer()}]\n def pairs(left, right) when is_list(left) and is_list(right) do\n for l <- left, r <- right, rem(l + r, 2) == 0, do: {l, r}\n end\nend\n```"}]}
24
+ {"id": "kto.functional.comprehension.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-comprehension", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnComprehension` with:\n\nDefine `pairs/2` to return `{left, right}` for every combination\nwhose integer sum is even. Preserve input iteration order and use\na comprehension with a filter.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnComprehension do\n @spec pairs([integer()], [integer()]) :: [{integer(), integer()}]\n def pairs(left, right) when is_list(left) and is_list(right) do\n Enum.reduce(left, [], fn l, output ->\n Enum.reduce(right, output, fn r, inner ->\n if rem(l + r, 2) == 0, do: inner ++ [{l, r}], else: inner\n end)\n end)\n end\nend\n```"}]}
25
+ {"id": "kto.functional.lazy-stream.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-lazy-stream", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnLazyStream` with:\n\nDefine `first_even/2` to lazily filter an enumerable for even\nintegers and return at most the requested number of values.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnLazyStream do\n @spec first_even([integer()] | Range.t(), non_neg_integer()) :: [integer()]\n def first_even(values, count) do\n values\n |> Stream.filter(&(rem(&1, 2) == 0))\n |> Enum.take(count)\n end\nend\n```"}]}
26
+ {"id": "kto.functional.lazy-stream.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-lazy-stream", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnLazyStream` with:\n\nDefine `first_even/2` to lazily filter an enumerable for even\nintegers and return at most the requested number of values.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnLazyStream do\n @spec first_even([integer()] | Range.t(), non_neg_integer()) :: [integer()]\n def first_even(values, count) do\n values\n |> Enum.filter(&(rem(&1, 2) == 0))\n |> Enum.take(count)\n end\nend\n```"}]}
27
+ {"id": "kto.functional.partition-one-pass.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-single-pass", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnPartition` with:\n\nDefine `split/1` to return `{non_negative, negative}` lists while\npreserving order. Thread both outputs through one reduction and\nreverse each accumulator once.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnPartition do\n @spec split([integer()]) :: {[integer()], [integer()]}\n def split(values) when is_list(values) do\n {positive, negative} =\n Enum.reduce(values, {[], []}, fn value, {positive, negative} ->\n if value >= 0,\n do: {[value | positive], negative},\n else: {positive, [value | negative]}\n end)\n\n {Enum.reverse(positive), Enum.reverse(negative)}\n end\nend\n```"}]}
28
+ {"id": "kto.functional.partition-one-pass.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-single-pass", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnPartition` with:\n\nDefine `split/1` to return `{non_negative, negative}` lists while\npreserving order. Thread both outputs through one reduction and\nreverse each accumulator once.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnPartition do\n @spec split([integer()]) :: {[integer()], [integer()]}\n def split(values) when is_list(values) do\n {Enum.filter(values, &(&1 >= 0)), Enum.filter(values, &(&1 < 0))}\n end\nend\n```"}]}
29
+ {"id": "kto.functional.tagged-fetch.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-tagged-flow", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnTaggedFetch` with:\n\nDefine `full_name/1` for a map. Return `{:ok, name}` when both\n`:first` and `:last` exist and `{:error, :missing}` otherwise.\nCompose the tagged fetch results with `with`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnTaggedFetch do\n @spec full_name(map()) :: {:ok, String.t()} | {:error, :missing}\n def full_name(person) when is_map(person) do\n with {:ok, first} <- Map.fetch(person, :first),\n {:ok, last} <- Map.fetch(person, :last) do\n {:ok, first <> \" \" <> last}\n else\n :error -> {:error, :missing}\n end\n end\nend\n```"}]}
30
+ {"id": "kto.functional.tagged-fetch.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-tagged-flow", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnTaggedFetch` with:\n\nDefine `full_name/1` for a map. Return `{:ok, name}` when both\n`:first` and `:last` exist and `{:error, :missing}` otherwise.\nCompose the tagged fetch results with `with`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnTaggedFetch do\n @spec full_name(map()) :: {:ok, String.t()} | {:error, :missing}\n def full_name(person) when is_map(person) do\n if Map.has_key?(person, :first) and Map.has_key?(person, :last) do\n {:ok, Map.get(person, :first) <> \" \" <> Map.get(person, :last)}\n else\n {:error, :missing}\n end\n end\nend\n```"}]}
31
+ {"id": "kto.functional.set-difference.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-set-operation", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnSetDifference` with:\n\nDefine `run/2` to return the unique values present in the first\nlist but absent from the second. Express the operation with\nimmutable `MapSet` values.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnSetDifference do\n @spec run([term()], [term()]) :: [term()]\n def run(left, right) when is_list(left) and is_list(right) do\n left\n |> MapSet.new()\n |> MapSet.difference(MapSet.new(right))\n |> MapSet.to_list()\n end\nend\n```"}]}
32
+ {"id": "kto.functional.set-difference.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-set-operation", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnSetDifference` with:\n\nDefine `run/2` to return the unique values present in the first\nlist but absent from the second. Express the operation with\nimmutable `MapSet` values.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnSetDifference do\n @spec run([term()], [term()]) :: [term()]\n def run(left, right) when is_list(left) and is_list(right) do\n left\n |> Enum.reject(&Enum.member?(right, &1))\n |> Enum.uniq()\n end\nend\n```"}]}
33
+ {"id": "kto.functional.iodata.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-iodata", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnIodata` with:\n\nDefine `join/1` for a list of strings, placing a comma between\nentries. Build iodata and convert it once rather than repeatedly\nconcatenating a growing binary.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnIodata do\n @spec join([String.t()]) :: String.t()\n def join(parts) when is_list(parts) do\n parts\n |> Enum.intersperse(\",\")\n |> IO.iodata_to_binary()\n end\nend\n```"}]}
34
+ {"id": "kto.functional.iodata.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-iodata", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnIodata` with:\n\nDefine `join/1` for a list of strings, placing a comma between\nentries. Build iodata and convert it once rather than repeatedly\nconcatenating a growing binary.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnIodata do\n @spec join([String.t()]) :: String.t()\n def join(parts) when is_list(parts), do: Enum.join(parts, \",\")\nend\n```"}]}
35
+ {"id": "kto.functional.unfold.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-unfold", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnUnfold` with:\n\nDefine `countdown/1` for a non-negative integer, returning values\nfrom the integer down to one. Represent the state progression with\n`Stream.unfold/2` and then realize the result.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnUnfold do\n @spec countdown(non_neg_integer()) :: [pos_integer()]\n def countdown(value) when is_integer(value) and value >= 0 do\n value\n |> Stream.unfold(fn\n 0 -> nil\n current -> {current, current - 1}\n end)\n |> Enum.to_list()\n end\nend\n```"}]}
36
+ {"id": "kto.functional.unfold.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-unfold", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnUnfold` with:\n\nDefine `countdown/1` for a non-negative integer, returning values\nfrom the integer down to one. Represent the state progression with\n`Stream.unfold/2` and then realize the result.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnUnfold do\n @spec countdown(non_neg_integer()) :: [pos_integer()]\n def countdown(value) when is_integer(value) and value >= 0 do\n if value == 0, do: [], else: Enum.to_list(value..1//-1)\n end\nend\n```"}]}
37
+ {"id": "kto.functional.zip-with.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-zip-with", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnZipWith` with:\n\nDefine `add/2` to add corresponding integers until the shorter\nlist ends. Use `Enum.zip_with/3` so pairing and transformation are\none collection operation.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnZipWith do\n @spec add([integer()], [integer()]) :: [integer()]\n def add(left, right), do: Enum.zip_with(left, right, &+/2)\nend\n```"}]}
38
+ {"id": "kto.functional.zip-with.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-zip-with", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnZipWith` with:\n\nDefine `add/2` to add corresponding integers until the shorter\nlist ends. Use `Enum.zip_with/3` so pairing and transformation are\none collection operation.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnZipWith do\n @spec add([integer()], [integer()]) :: [integer()]\n def add(left, right) do\n left\n |> Enum.zip(right)\n |> Enum.map(fn {l, r} -> l + r end)\n end\nend\n```"}]}
39
+ {"id": "kto.functional.get-and-update.chosen", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-get-and-update", "preference_kind": "functional-style", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnGetAndUpdate` with:\n\nDefine `take_token/1` for `%{session: %{token: value}}`. Return\n`{old_token, updated_state}` where the nested token becomes `nil`,\npreserving every other key. Use one `get_and_update_in/3` call.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnGetAndUpdate do\n @spec take_token(map()) :: {term(), map()}\n def take_token(state) when is_map(state) do\n get_and_update_in(state, [:session, :token], &{&1, nil})\n end\nend\n```"}]}
40
+ {"id": "kto.functional.get-and-update.rejected", "family": "functional", "source": "elixir_kto_v0", "weakness": "functional-get-and-update", "preference_kind": "functional-style", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFnGetAndUpdate` with:\n\nDefine `take_token/1` for `%{session: %{token: value}}`. Return\n`{old_token, updated_state}` where the nested token becomes `nil`,\npreserving every other key. Use one `get_and_update_in/3` call.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFnGetAndUpdate do\n @spec take_token(map()) :: {term(), map()}\n def take_token(state) when is_map(state) do\n token = get_in(state, [:session, :token])\n {token, put_in(state, [:session, :token], nil)}\n end\nend\n```"}]}
41
+ {"id": "kto.otp.call-explicit-timeout.chosen", "family": "otp", "source": "elixir_kto_v0", "weakness": "otp-timeout", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpCounter` with:\n\nDefine a GenServer with `start_link/1` and `value/1`. Store the\ninitial value and read it through a synchronous `GenServer.call/3`\nwith an explicit module timeout. The callback must preserve state.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpCounter do\n use GenServer\n\n @timeout 1_000\n\n @spec start_link(term()) :: GenServer.on_start()\n def start_link(initial), do: GenServer.start_link(__MODULE__, initial)\n\n @spec value(pid()) :: term()\n def value(pid), do: GenServer.call(pid, :value, @timeout)\n\n @impl true\n def init(initial), do: {:ok, initial}\n\n @impl true\n def handle_call(:value, _from, state), do: {:reply, state, state}\nend\n```"}]}
42
+ {"id": "kto.otp.call-explicit-timeout.rejected", "family": "otp", "source": "elixir_kto_v0", "weakness": "otp-timeout", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpCounter` with:\n\nDefine a GenServer with `start_link/1` and `value/1`. Store the\ninitial value and read it through a synchronous `GenServer.call/3`\nwith an explicit module timeout. The callback must preserve state.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpCounter do\n use GenServer\n\n @spec start_link(term()) :: GenServer.on_start()\n def start_link(initial), do: GenServer.start_link(__MODULE__, initial)\n\n @spec value(pid()) :: term()\n def value(pid), do: GenServer.call(pid, :value)\n\n @impl true\n def init(initial), do: {:ok, initial}\n\n @impl true\n def handle_call(:value, _from, state), do: {:reply, state, state}\nend\n```"}]}
43
+ {"id": "kto.otp.cast-callback.chosen", "family": "otp", "source": "elixir_kto_v0", "weakness": "otp-cast-call", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpCastState` with:\n\nDefine a GenServer cast callback that handles `{:set, value}` as an\nasynchronous state update and returns `{:noreply, new_state}`.\nKeep the callback contract separate from the synchronous reply\ncontract of `handle_call/3`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpCastState do\n use GenServer\n\n @impl true\n def init(state), do: {:ok, state}\n\n @impl true\n def handle_cast({:set, value}, _state), do: {:noreply, value}\nend\n```"}]}
44
+ {"id": "kto.otp.cast-callback.rejected", "family": "otp", "source": "elixir_kto_v0", "weakness": "otp-cast-call", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpCastState` with:\n\nDefine a GenServer cast callback that handles `{:set, value}` as an\nasynchronous state update and returns `{:noreply, new_state}`.\nKeep the callback contract separate from the synchronous reply\ncontract of `handle_call/3`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpCastState do\n use GenServer\n\n @impl true\n def handle_call({:set, value}, _from, _state), do: {:reply, :ok, value}\nend\n```"}]}
45
+ {"id": "kto.otp.handle-info.chosen", "family": "otp", "source": "elixir_kto_v0", "weakness": "otp-handle-info", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpInfo` with:\n\nDefine a GenServer `handle_info/2` clause for `:refresh`. It should\nset `:refreshed` to `true` in a map state and return\n`{:noreply, new_state}`. Do not route an out-of-band message through\nthe cast or call callback.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpInfo do\n use GenServer\n\n @impl true\n def init(state), do: {:ok, state}\n\n @impl true\n def handle_info(:refresh, state) when is_map(state) do\n {:noreply, Map.put(state, :refreshed, true)}\n end\nend\n```"}]}
46
+ {"id": "kto.otp.handle-info.rejected", "family": "otp", "source": "elixir_kto_v0", "weakness": "otp-handle-info", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpInfo` with:\n\nDefine a GenServer `handle_info/2` clause for `:refresh`. It should\nset `:refreshed` to `true` in a map state and return\n`{:noreply, new_state}`. Do not route an out-of-band message through\nthe cast or call callback.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpInfo do\n use GenServer\n\n @impl true\n def handle_cast(:refresh, state) when is_map(state) do\n {:noreply, Map.put(state, :refreshed, true)}\n end\nend\n```"}]}
47
+ {"id": "kto.otp.task-supervised-await.chosen", "family": "otp", "source": "elixir_kto_v0", "weakness": "otp-task-await", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpTaskRun` with:\n\nDefine `run/2` that accepts a `Task.Supervisor` pid and a zero-arity\nfunction. Start the work with `Task.Supervisor.async_nolink/2` and\nawait it with an explicit timeout of 1_000 milliseconds.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpTaskRun do\n @timeout 1_000\n\n @spec run(pid(), (() -> term())) :: term()\n def run(supervisor, fun) when is_pid(supervisor) and is_function(fun, 0) do\n task = Task.Supervisor.async_nolink(supervisor, fun)\n Task.await(task, @timeout)\n end\nend\n```"}]}
48
+ {"id": "kto.otp.task-supervised-await.rejected", "family": "otp", "source": "elixir_kto_v0", "weakness": "otp-task-await", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpTaskRun` with:\n\nDefine `run/2` that accepts a `Task.Supervisor` pid and a zero-arity\nfunction. Start the work with `Task.Supervisor.async_nolink/2` and\nawait it with an explicit timeout of 1_000 milliseconds.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpTaskRun do\n @spec run(pid(), (() -> term())) :: term()\n def run(supervisor, fun) when is_pid(supervisor) and is_function(fun, 0) do\n task = Task.Supervisor.async_nolink(supervisor, fun)\n Task.await(task)\n end\nend\n```"}]}
49
+ {"id": "kto.otp.child-spec.chosen", "family": "otp", "source": "elixir_kto_v0", "weakness": "otp-supervision", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpWorker` with:\n\nDefine `start_link/1` and an explicit `child_spec/1`. The child\nspecification must use this module's start function, id from the\noptions, `restart: :transient`, `shutdown: 1_000`, and `type: :worker`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpWorker do\n use GenServer\n\n @spec start_link(keyword()) :: GenServer.on_start()\n def start_link(options), do: GenServer.start_link(__MODULE__, options)\n\n @spec child_spec(keyword()) :: Supervisor.child_spec()\n def child_spec(options) do\n %{\n id: Keyword.fetch!(options, :id),\n start: {__MODULE__, :start_link, [options]},\n restart: :transient,\n shutdown: 1_000,\n type: :worker\n }\n end\n\n @impl true\n def init(options), do: {:ok, options}\nend\n```"}]}
50
+ {"id": "kto.otp.child-spec.rejected", "family": "otp", "source": "elixir_kto_v0", "weakness": "otp-supervision", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpWorker` with:\n\nDefine `start_link/1` and an explicit `child_spec/1`. The child\nspecification must use this module's start function, id from the\noptions, `restart: :transient`, `shutdown: 1_000`, and `type: :worker`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpWorker do\n use GenServer\n\n @spec start_link(keyword()) :: GenServer.on_start()\n def start_link(options), do: GenServer.start_link(__MODULE__, options)\n\n @spec child_spec(keyword()) :: Supervisor.child_spec()\n def child_spec(options) do\n %{\n id: Keyword.fetch!(options, :id),\n start: {__MODULE__, :start_link, [options]},\n restart: :permanent,\n shutdown: 5_000,\n type: :worker\n }\n end\n\n @impl true\n def init(options), do: {:ok, options}\nend\n```"}]}
51
+ {"id": "kto.otp.immutable-state-update.chosen", "family": "otp", "source": "elixir_kto_v0", "weakness": "enum-state", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpTotals` with:\n\nDefine a GenServer callback for `{:add, key, amount}`. Update the\nmap state immutably with `Map.update/4`, reply with the new value,\nand keep the updated map as the next state.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpTotals do\n use GenServer\n\n @impl true\n def init(state), do: {:ok, state}\n\n @impl true\n def handle_call({:add, key, amount}, _from, state) when is_map(state) do\n new_state = Map.update(state, key, amount, &(&1 + amount))\n {:reply, Map.fetch!(new_state, key), new_state}\n end\nend\n```"}]}
52
+ {"id": "kto.otp.immutable-state-update.rejected", "family": "otp", "source": "elixir_kto_v0", "weakness": "enum-state", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpTotals` with:\n\nDefine a GenServer callback for `{:add, key, amount}`. Update the\nmap state immutably with `Map.update/4`, reply with the new value,\nand keep the updated map as the next state.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpTotals do\n use GenServer\n\n @impl true\n def handle_call({:add, key, amount}, _from, state) when is_map(state) do\n current = Map.get(state, key, 0)\n {:reply, current + amount, state}\n end\nend\n```"}]}
53
+ {"id": "kto.binary.exact-frame.chosen", "family": "binaries", "source": "elixir_kto_v0", "weakness": "bin-size-guard", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinFrame` with:\n\nDefine `encode/1` and `decode/1` for an unsigned-big 16-bit\nlength-prefixed binary. Decode must return `{:ok, payload}` only\nwhen the remaining byte count exactly equals the prefix; short and\ntrailing packets return `:error`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinFrame do\n @spec encode(binary()) :: binary()\n def encode(payload) when is_binary(payload) and byte_size(payload) <= 65_535 do\n <<byte_size(payload)::unsigned-big-integer-size(16), payload::binary>>\n end\n\n @spec decode(binary()) :: {:ok, binary()} | :error\n def decode(<<length::unsigned-big-integer-size(16), rest::binary>>) do\n if byte_size(rest) == length, do: {:ok, rest}, else: :error\n end\n\n def decode(_other), do: :error\nend\n```"}]}
54
+ {"id": "kto.binary.exact-frame.rejected", "family": "binaries", "source": "elixir_kto_v0", "weakness": "bin-size-guard", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinFrame` with:\n\nDefine `encode/1` and `decode/1` for an unsigned-big 16-bit\nlength-prefixed binary. Decode must return `{:ok, payload}` only\nwhen the remaining byte count exactly equals the prefix; short and\ntrailing packets return `:error`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinFrame do\n @spec encode(binary()) :: binary()\n def encode(payload) when is_binary(payload) and byte_size(payload) <= 65_535 do\n <<byte_size(payload)::unsigned-big-integer-size(16), payload::binary>>\n end\n\n @spec decode(binary()) :: {:ok, binary()} | :error\n def decode(<<length::unsigned-big-integer-size(16), rest::binary>>) do\n if byte_size(rest) >= length, do: {:ok, binary_part(rest, 0, length)}, else: :error\n end\n\n def decode(_other), do: :error\nend\n```"}]}
55
+ {"id": "kto.binary.safe-term.chosen", "family": "binaries", "source": "elixir_kto_v0", "weakness": "stdlib-safe-deserialization", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinTerm` with:\n\nDefine `decode/1` for a binary term. Use the safe Erlang decoding\noption so the function does not create atoms or other resources\nfrom untrusted input. Valid encoded terms should be returned.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinTerm do\n @spec decode(binary()) :: term()\n def decode(binary) when is_binary(binary) do\n :erlang.binary_to_term(binary, [:safe])\n end\nend\n```"}]}
56
+ {"id": "kto.binary.safe-term.rejected", "family": "binaries", "source": "elixir_kto_v0", "weakness": "stdlib-safe-deserialization", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinTerm` with:\n\nDefine `decode/1` for a binary term. Use the safe Erlang decoding\noption so the function does not create atoms or other resources\nfrom untrusted input. Valid encoded terms should be returned.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinTerm do\n @spec decode(binary()) :: term()\n def decode(binary) when is_binary(binary) do\n :erlang.binary_to_term(binary)\n end\nend\n```"}]}
57
+ {"id": "kto.binary.signed-integer.chosen", "family": "binaries", "source": "elixir_kto_v0", "weakness": "bin-signed", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinSigned16` with:\n\nDefine `decode/1` for exactly two bytes containing a signed\nbig-endian 16-bit integer. Return `{:ok, integer}` for the exact\nbinary and `:error` for all other sizes.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinSigned16 do\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(<<value::signed-big-integer-size(16)>>), do: {:ok, value}\n def decode(_other), do: :error\nend\n```"}]}
58
+ {"id": "kto.binary.signed-integer.rejected", "family": "binaries", "source": "elixir_kto_v0", "weakness": "bin-signed", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinSigned16` with:\n\nDefine `decode/1` for exactly two bytes containing a signed\nbig-endian 16-bit integer. Return `{:ok, integer}` for the exact\nbinary and `:error` for all other sizes.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinSigned16 do\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(<<value::unsigned-big-integer-size(16)>>), do: {:ok, value}\n def decode(_other), do: :error\nend\n```"}]}
59
+ {"id": "kto.binary.explicit-bitwise.chosen", "family": "binaries", "source": "elixir_kto_v0", "weakness": "bin-bitwise", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinFlags` with:\n\nDefine `toggle/2` that returns the bitwise XOR of two integers.\nCall the explicit `Bitwise.bxor/2` function rather than relying on\ndeprecated operators or arithmetic that happens to work for a\nnarrow sample.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinFlags do\n @spec toggle(non_neg_integer(), non_neg_integer()) :: non_neg_integer()\n def toggle(left, right) when is_integer(left) and is_integer(right) do\n Bitwise.bxor(left, right)\n end\nend\n```"}]}
60
+ {"id": "kto.binary.explicit-bitwise.rejected", "family": "binaries", "source": "elixir_kto_v0", "weakness": "bin-bitwise", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinFlags` with:\n\nDefine `toggle/2` that returns the bitwise XOR of two integers.\nCall the explicit `Bitwise.bxor/2` function rather than relying on\ndeprecated operators or arithmetic that happens to work for a\nnarrow sample.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinFlags do\n @spec toggle(non_neg_integer(), non_neg_integer()) :: non_neg_integer()\n def toggle(left, right) when is_integer(left) and is_integer(right) do\n Bitwise.band(left, right)\n end\nend\n```"}]}
61
+ {"id": "kto.binary.varint-empty-guard.chosen", "family": "binaries", "source": "elixir_kto_v0", "weakness": "edge-empty", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinVarint` with:\n\nDefine `decode/1` for an unsigned little-endian base-128 varint.\nReturn `{:ok, {value, rest}}`, return `:error` for empty or\ntruncated input, and reject more than five bytes. Use recursive\npattern matching with an explicit empty-binary clause.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinVarint do\n @spec decode(binary()) :: {:ok, {non_neg_integer(), binary()}} | :error\n def decode(binary) when is_binary(binary), do: decode_bytes(binary, 0, 0)\n\n defp decode_bytes(_rest, _value, 5), do: :error\n defp decode_bytes(<<>>, _value, _count), do: :error\n\n defp decode_bytes(<<byte, rest::binary>>, value, count) do\n low_bits = Bitwise.band(byte, 0x7F)\n next_value = value + Bitwise.bsl(low_bits, 7 * count)\n\n if Bitwise.band(byte, 0x80) == 0 do\n {:ok, {next_value, rest}}\n else\n decode_bytes(rest, next_value, count + 1)\n end\n end\nend\n```"}]}
62
+ {"id": "kto.binary.varint-empty-guard.rejected", "family": "binaries", "source": "elixir_kto_v0", "weakness": "edge-empty", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinVarint` with:\n\nDefine `decode/1` for an unsigned little-endian base-128 varint.\nReturn `{:ok, {value, rest}}`, return `:error` for empty or\ntruncated input, and reject more than five bytes. Use recursive\npattern matching with an explicit empty-binary clause.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinVarint do\n @spec decode(binary()) :: {:ok, {non_neg_integer(), binary()}} | :error\n def decode(binary) when is_binary(binary), do: decode_bytes(binary, 0, 0)\n\n defp decode_bytes(_rest, _value, 5), do: :error\n\n defp decode_bytes(<<byte, rest::binary>>, value, count) do\n low_bits = Bitwise.band(byte, 0x7F)\n next_value = value + Bitwise.bsl(low_bits, 7 * count)\n\n if Bitwise.band(byte, 0x80) == 0 do\n {:ok, {next_value, rest}}\n else\n decode_bytes(rest, next_value, count + 1)\n end\n end\nend\n```"}]}
63
+ {"id": "kto.stdlib.string-length.chosen", "family": "stdlib", "source": "elixir_kto_v0", "weakness": "stdlib-byte-vs-grapheme", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoStdlibText` with:\n\nDefine `characters/1` to count user-visible Unicode graphemes in a\nstring. Use the String API rather than counting UTF-8 bytes.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoStdlibText do\n @spec characters(String.t()) :: non_neg_integer()\n def characters(text) when is_binary(text), do: String.length(text)\nend\n```"}]}
64
+ {"id": "kto.stdlib.string-length.rejected", "family": "stdlib", "source": "elixir_kto_v0", "weakness": "stdlib-byte-vs-grapheme", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoStdlibText` with:\n\nDefine `characters/1` to count user-visible Unicode graphemes in a\nstring. Use the String API rather than counting UTF-8 bytes.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoStdlibText do\n @spec characters(String.t()) :: non_neg_integer()\n def characters(text) when is_binary(text), do: byte_size(text)\nend\n```"}]}
65
+ {"id": "kto.stdlib.regex-nil.chosen", "family": "stdlib", "source": "elixir_kto_v0", "weakness": "edge-nil-result", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoStdlibDigits` with:\n\nDefine `extract/1` to return `{:ok, digits}` for the first run of\ndecimal digits in a string, or `:error` when there is no match.\nHandle the `nil` result from `Regex.run/3` explicitly.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoStdlibDigits do\n @spec extract(String.t()) :: {:ok, String.t()} | :error\n def extract(text) when is_binary(text) do\n case Regex.run(~r/(\\d+)/, text, capture: :all_but_first) do\n [digits] -> {:ok, digits}\n nil -> :error\n end\n end\nend\n```"}]}
66
+ {"id": "kto.stdlib.regex-nil.rejected", "family": "stdlib", "source": "elixir_kto_v0", "weakness": "edge-nil-result", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoStdlibDigits` with:\n\nDefine `extract/1` to return `{:ok, digits}` for the first run of\ndecimal digits in a string, or `:error` when there is no match.\nHandle the `nil` result from `Regex.run/3` explicitly.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoStdlibDigits do\n @spec extract(String.t()) :: {:ok, String.t()} | :error\n def extract(text) when is_binary(text) do\n [digits] = Regex.run(~r/(\\d+)/, text, capture: :all_but_first)\n {:ok, digits}\n end\nend\n```"}]}
67
+ {"id": "kto.errors.tagged-with.chosen", "family": "errors", "source": "elixir_kto_v0", "weakness": "err-with-else", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoErrorsSum` with:\n\nDefine `sum/2` for two strings containing integers. Return\n`{:ok, sum}` on success and `{:error, :invalid}` for malformed\ninput. Use tagged `with` branches and do not turn a parse failure\ninto a successful default.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoErrorsSum do\n @spec sum(String.t(), String.t()) :: {:ok, integer()} | {:error, :invalid}\n def sum(left, right) when is_binary(left) and is_binary(right) do\n with {left_number, \"\"} <- Integer.parse(left),\n {right_number, \"\"} <- Integer.parse(right) do\n {:ok, left_number + right_number}\n else\n _ -> {:error, :invalid}\n end\n end\nend\n```"}]}
68
+ {"id": "kto.errors.tagged-with.rejected", "family": "errors", "source": "elixir_kto_v0", "weakness": "err-with-else", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoErrorsSum` with:\n\nDefine `sum/2` for two strings containing integers. Return\n`{:ok, sum}` on success and `{:error, :invalid}` for malformed\ninput. Use tagged `with` branches and do not turn a parse failure\ninto a successful default.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoErrorsSum do\n @spec sum(String.t(), String.t()) :: {:ok, integer()} | {:error, :invalid}\n def sum(left, right) when is_binary(left) and is_binary(right) do\n case Integer.parse(left) do\n {left_number, _rest} -> {:ok, left_number + String.to_integer(right)}\n :error -> {:ok, 0}\n end\n end\nend\n```"}]}
69
+ {"id": "kto.protocol.explicit-implementation.chosen", "family": "protocol", "source": "elixir_kto_v0", "weakness": "protocol-behaviour", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoRender` with:\n\nDefine a `KtoRenderable` protocol with `render/1`, implement it\nfor integers, and expose `KtoRender.render/1` as the delegating\npublic function. Use the protocol/implementation boundary instead\nof a type-checking conditional in the public module.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefprotocol KtoRenderable do\n @spec render(term()) :: String.t()\n def render(value)\nend\n\ndefimpl KtoRenderable, for: Integer do\n def render(value), do: Integer.to_string(value)\nend\n\ndefmodule KtoRender do\n @spec render(term()) :: String.t()\n def render(value), do: KtoRenderable.render(value)\nend\n```"}]}
70
+ {"id": "kto.protocol.explicit-implementation.rejected", "family": "protocol", "source": "elixir_kto_v0", "weakness": "protocol-behaviour", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoRender` with:\n\nDefine a `KtoRenderable` protocol with `render/1`, implement it\nfor integers, and expose `KtoRender.render/1` as the delegating\npublic function. Use the protocol/implementation boundary instead\nof a type-checking conditional in the public module.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoRender do\n @spec render(term()) :: String.t()\n def render(value) when is_integer(value), do: Integer.to_string(value)\nend\n```"}]}
71
+ {"id": "kto.protocol.behaviour-contract.chosen", "family": "protocol", "source": "elixir_kto_v0", "weakness": "protocol-behaviour", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoUpperFormatter` with:\n\nDefine a `KtoFormatter` behaviour with a `format/1` callback and an\nimplementation module `KtoUpperFormatter` that declares the\nbehaviour and uses `@impl true`. Formatting should uppercase text.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFormatter do\n @callback format(String.t()) :: String.t()\nend\n\ndefmodule KtoUpperFormatter do\n @behaviour KtoFormatter\n\n @impl true\n def format(text) when is_binary(text), do: String.upcase(text)\nend\n```"}]}
72
+ {"id": "kto.protocol.behaviour-contract.rejected", "family": "protocol", "source": "elixir_kto_v0", "weakness": "protocol-behaviour", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoUpperFormatter` with:\n\nDefine a `KtoFormatter` behaviour with a `format/1` callback and an\nimplementation module `KtoUpperFormatter` that declares the\nbehaviour and uses `@impl true`. Formatting should uppercase text.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFormatter do\n @callback format(String.t()) :: String.t()\nend\n\ndefmodule KtoUpperFormatter do\n def format(text) when is_binary(text), do: String.upcase(text)\nend\n```"}]}
73
+ {"id": "kto.core.function-clause-guard.chosen", "family": "core", "source": "elixir_kto_v0", "weakness": "fn-guard", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoCoreClassify` with:\n\nDefine `classify/1` with function clauses and guards: non-negative\nintegers return `:non_negative`, negative integers return\n`:negative`, and all other terms return `:other`. Keep type and\nrange checks in function heads rather than simulating a procedural\ndecision tree inside an anonymous function.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoCoreClassify do\n @spec classify(term()) :: :non_negative | :negative | :other\n def classify(value) when is_integer(value) and value >= 0, do: :non_negative\n def classify(value) when is_integer(value), do: :negative\n def classify(_value), do: :other\nend\n```"}]}
74
+ {"id": "kto.core.function-clause-guard.rejected", "family": "core", "source": "elixir_kto_v0", "weakness": "fn-guard", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoCoreClassify` with:\n\nDefine `classify/1` with function clauses and guards: non-negative\nintegers return `:non_negative`, negative integers return\n`:negative`, and all other terms return `:other`. Keep type and\nrange checks in function heads rather than simulating a procedural\ndecision tree inside an anonymous function.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoCoreClassify do\n @spec classify(term()) :: :non_negative | :negative | :other\n def classify(value) do\n if is_integer(value) do\n if value >= 0, do: :non_negative, else: :negative\n else\n :other\n end\n end\nend\n```"}]}
75
+ {"id": "kto.format.single-fence.chosen", "family": "format", "source": "elixir_kto_v0", "weakness": "format-hygiene", "preference_kind": "correctness", "label": true, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFormatAnswer` with:\n\nDefine `answer/0` returning `:ok`. The response must contain only\none Elixir fence and no explanation before or after it.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFormatAnswer do\n def answer, do: :ok\nend\n```"}]}
76
+ {"id": "kto.format.single-fence.rejected", "family": "format", "source": "elixir_kto_v0", "weakness": "format-hygiene", "preference_kind": "correctness", "label": false, "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoFormatAnswer` with:\n\nDefine `answer/0` returning `:ok`. The response must contain only\none Elixir fence and no explanation before or after it.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "Here is the requested module:\n\n```elixir\ndefmodule KtoFormatAnswer do\n def answer, do: :ok\nend\n```\n\nThis keeps the answer concise."}]}
data/onpolicy/qwen25c3b_micro_dpo_v1.jsonl ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"id": "micro.qwen25c3b.dpo.otp.asynclongest.v3.otp-supervision", "family": "otp", "source": "qwen25c3b_micro_dpo_v1", "weakness": "otp-supervision", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `AsyncLongest03` with:\n\n@spec run(list()) :: term()\n def run(list)\n\nCompute the longest string in the list inside `Task.async`. Await with timeout `5_000` and return the\nresult. Do not use `spawn`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule AsyncLongest03 do\n @spec run(list()) :: term()\n def run(list) when is_list(list) do\n task = Task.async(fn -> Enum.max_by(list, &String.length/1) end)\n Task.await(task, 5_000)\n end\nend\n```", "rejected": "defmodule AsyncLongest03 do\n @spec run(list()) :: term()\n def run(list) when is_list(list) do\n spawn(fn -> Enum.max_by(list, &String.length/1) end)\n :ok\n end\nend"}
2
+ {"id": "micro.qwen25c3b.dpo.collections.deltarun.v2.edge-empty", "family": "collections", "source": "qwen25c3b_micro_dpo_v1", "weakness": "edge-empty", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `DeltaRun02` with:\n\n@spec deltas([number()]) :: [number()]\n def deltas(list)\n\nConsecutive differences: `[a, b, c]` gives `[b - a, c - b]`. Empty and\nsingle-element lists give `[]`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule DeltaRun02 do\n @spec deltas([number()]) :: [number()]\n def deltas([]), do: []\n def deltas([_only]), do: []\n def deltas(list), do: Enum.zip_with(list, tl(list), fn a, b -> b - a end)\nend\n```", "rejected": "defmodule DeltaRun02 do\n @spec deltas([number()]) :: [number()]\n def deltas([]), do: []\n def deltas([only]), do: [only - only]\n def deltas(list), do: Enum.zip_with(list, tl(list), fn a, b -> b - a end)\nend"}
3
+ {"id": "micro.qwen25c3b.dpo.collections.groupruns.v2.format-hygiene.h", "family": "collections", "source": "qwen25c3b_micro_dpo_v1", "weakness": "format-hygiene", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `GroupRuns02` with:\n\n@spec runs([term()]) :: [[term()]]\n def runs(list)\n\nGroup CONSECUTIVE equal values into sublists, preserving order. Only adjacent\nequals merge.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule GroupRuns02 do\n @spec runs([term()]) :: [[term()]]\n def runs([]), do: []\n\n def runs([head | rest]) do\n {run, leftover} = split_run(rest, head, [head])\n [run | runs(leftover)]\n end\n\n defp split_run([head | rest], head, acc), do: split_run(rest, head, [head | acc])\n defp split_run(leftover, _value, acc), do: {Enum.reverse(acc), leftover}\nend\n```", "rejected": "Sure! Here is the module you asked for:\n\n```elixir\ndefmodule GroupRuns02 do\n @spec runs([term()]) :: [[term()]]\n def runs([]), do: []\n\n def runs([head | rest]) do\n {run, leftover} = split_run(rest, head, [head])\n [run | runs(leftover)]\n end\n\n defp split_run([head | rest], head, acc), do: split_run(rest, head, [head | acc])\n defp split_run(leftover, _value, acc), do: {Enum.reverse(acc), leftover}\nend\n```\n\nLet me know if you need changes."}
4
+ {"id": "micro.qwen25c3b.dpo.stdlib.wordscan.err-swallow", "family": "stdlib", "source": "qwen25c3b_micro_dpo_v1", "weakness": "err-swallow", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `WordScan` with:\n\n@spec pairs(String.t()) :: [{String.t(), String.t()}]\n def pairs(text)\n\nFind all `key=value` words (`\\w+` on both sides) and return `{key, value}`\ntuples in order.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule WordScan do\n @spec pairs(String.t()) :: [{String.t(), String.t()}]\n def pairs(text) when is_binary(text) do\n Regex.scan(~r/(?<key>\\w+)=(?<value>\\w+)/, text, capture: :all_names)\n |> Enum.map(fn [key, value] -> {key, value} end)\n end\nend\n```", "rejected": "defmodule WordScan do\n @spec pairs(String.t()) :: [{String.t(), String.t()}]\n def pairs(text) when is_binary(text) do\n Regex.scan(~r/\\w+=(?<value>\\w+)/, text, capture: :all_names)\n |> Enum.map(fn [key, value] -> {key, value} end)\n end\nend"}
5
+ {"id": "micro.qwen25c3b.dpo.collections.groupruns.v2.enum-state", "family": "collections", "source": "qwen25c3b_micro_dpo_v1", "weakness": "enum-state", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `GroupRuns02` with:\n\n@spec runs([term()]) :: [[term()]]\n def runs(list)\n\nGroup CONSECUTIVE equal values into sublists, preserving order. Only adjacent\nequals merge.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule GroupRuns02 do\n @spec runs([term()]) :: [[term()]]\n def runs([]), do: []\n\n def runs([head | rest]) do\n {run, leftover} = split_run(rest, head, [head])\n [run | runs(leftover)]\n end\n\n defp split_run([head | rest], head, acc), do: split_run(rest, head, [head | acc])\n defp split_run(leftover, _value, acc), do: {Enum.reverse(acc), leftover}\nend\n```", "rejected": "defmodule GroupRuns02 do\n @spec runs([term()]) :: [[term()]]\n def runs(list) when is_list(list) do\n list\n |> Enum.group_by(& &1)\n |> Map.values()\n |> Enum.sort()\n end\nend"}
6
+ {"id": "micro.qwen25c3b.dpo.beam.termblob.err-swallow.0", "family": "beam", "source": "qwen25c3b_micro_dpo_v1", "weakness": "err-swallow", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `TermBlob` with:\n\n@spec wrap(term()) :: binary()\n def wrap(term)\n\n @spec unwrap(binary()) :: {:ok, term()} | :error\n def unwrap(bin)\n\nSerialize with `:erlang.term_to_binary/1`. `unwrap/1` inverts it and returns\n`:error` for malformed input instead of crashing.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule TermBlob do\n @spec wrap(term()) :: binary()\n def wrap(term), do: :erlang.term_to_binary(term)\n\n @spec unwrap(binary()) :: {:ok, term()} | :error\n def unwrap(bin) when is_binary(bin) do\n {:ok, :erlang.binary_to_term(bin, [:safe])}\n rescue\n ArgumentError -> :error\n end\nend\n```", "rejected": "defmodule TermBlob do\n @spec wrap(term()) :: binary()\n def wrap(term), do: :erlang.term_to_binary(term)\n\n @spec unwrap(binary()) :: {:ok, term()} | :error\n def unwrap(bin) when is_binary(bin), do: {:ok, :erlang.binary_to_term(bin)}\nend"}
7
+ {"id": "micro.qwen25c3b.dpo.stdlib.padcode.v3.enum-state", "family": "stdlib", "source": "qwen25c3b_micro_dpo_v1", "weakness": "enum-state", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `PadCode03` with:\n\n@spec left(String.t(), non_neg_integer(), String.t()) :: String.t()\n def left(text, width, pad)\n\n @spec clip(String.t(), non_neg_integer()) :: String.t()\n def clip(text, width)\n\n`left/3` pads on the leading side to EXACTLY `width` graphemes but never\ntruncates longer inputs. `clip/2` keeps at most the first `width`\ngraphemes.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule PadCode03 do\n @spec left(String.t(), non_neg_integer(), String.t()) :: String.t()\n def left(text, width, pad) when is_binary(text) and width >= 0 do\n String.pad_leading(text, width, pad)\n end\n\n @spec clip(String.t(), non_neg_integer()) :: String.t()\n def clip(text, width) when is_binary(text) and width >= 0 do\n String.slice(text, 0, width)\n end\nend\n```", "rejected": "defmodule PadCode03 do\n @spec left(String.t(), non_neg_integer(), String.t()) :: String.t()\n def left(text, width, pad) when is_binary(text) and width >= 0 do\n String.pad_leading(text, width, pad)\n end\n\n @spec clip(String.t(), non_neg_integer()) :: String.t()\n def clip(text, width) when is_binary(text) and width >= 0 do\n String.slice(text, -width, width)\n end\nend"}
8
+ {"id": "micro.qwen25c3b.dpo.binaries.s24le.format-hygiene.h", "family": "binaries", "source": "qwen25c3b_micro_dpo_v1", "weakness": "format-hygiene", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `S24LE` with:\n\n@spec encode(-8388608..8388607) :: <<_::24>>\n def encode(n)\n\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(bin)\n\nUse bit syntax (`::signed-little-integer-size(24)`). `decode/1` returns\n`:error` unless the binary is exactly 3 byte(s).\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule S24LE do\n @spec encode(-8388608..8388607) :: <<_::24>>\n def encode(n) when is_integer(n) and n >= -8388608 and n <= 8388607 do\n <<n::signed-little-integer-size(24)>>\n end\n\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(<<n::signed-little-integer-size(24)>>), do: {:ok, n}\n def decode(_other), do: :error\nend\n```", "rejected": "Here is a draft:\n\n```elixir\ndefmodule S24LE do\n @spec encode(-8388608..8388607) :: <<_::24>>\n def encode(n) when is_integer(n) and n >= -8388608 and n <= 8388607 do\n <<n::signed-little-integer-size(24)>>\n end\n```\n\nFinal version:\n\n```elixir\ndefmodule S24LE do\n @spec encode(-8388608..8388607) :: <<_::24>>\n def encode(n) when is_integer(n) and n >= -8388608 and n <= 8388607 do\n <<n::signed-little-integer-size(24)>>\n end\n\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(<<n::signed-little-integer-size(24)>>), do: {:ok, n}\n def decode(_other), do: :error\nend\n```"}
9
+ {"id": "micro.qwen25c3b.dpo.beam.localcache.v3.persistent-term", "family": "beam", "source": "qwen25c3b_micro_dpo_v1", "weakness": "persistent-term", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `LocalCache03` with:\n\n@spec new() :: :ets.table()\n def new()\n\n @spec put(:ets.table(), term(), term()) :: true\n def put(table, key, value)\n\n @spec get(:ets.table(), term(), term()) :: term()\n def get(table, key, default)\n\nA public `:set` ETS table. `get/3` returns `default` for missing keys.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule LocalCache03 do\n @spec new() :: :ets.table()\n def new, do: :ets.new(__MODULE__, [:set, :public])\n\n @spec put(:ets.table(), term(), term()) :: true\n def put(table, key, value), do: :ets.insert(table, {key, value})\n\n @spec get(:ets.table(), term(), term()) :: term()\n def get(table, key, default) do\n case :ets.lookup(table, key) do\n [{^key, value}] -> value\n [] -> default\n end\n end\nend\n```", "rejected": "defmodule LocalCache03 do\n @spec new() :: :ets.table()\n def new, do: :ets.new(__MODULE__, [:set, :public])\n\n @spec put(:ets.table(), term(), term()) :: true\n def put(table, key, value), do: :ets.insert(table, {key, value})\n\n @spec get(:ets.table(), term(), term()) :: term()\n def get(table, key, default) do\n case :ets.lookup(table, key) do\n {:ok, value} -> value\n :error -> default\n end\n end\nend"}
10
+ {"id": "micro.qwen25c3b.dpo.beam.atomicticks.v3.otp-supervision", "family": "beam", "source": "qwen25c3b_micro_dpo_v1", "weakness": "otp-supervision", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `AtomicTicks03` with:\n\n@spec new() :: :atomics.ref()\n def new()\n\n @spec tick(:atomics.ref()) :: non_neg_integer()\n def tick(ref)\n\n @spec read(:atomics.ref()) :: non_neg_integer()\n def read(ref)\n\nAn unsigned `:atomics` counter. `tick/1` increments and returns the NEW count;\n`read/1` reads without changing it.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule AtomicTicks03 do\n @spec new() :: :atomics.ref()\n def new, do: :atomics.new(1, signed: false)\n\n @spec tick(:atomics.ref()) :: non_neg_integer()\n def tick(ref), do: :atomics.add_get(ref, 1, 1)\n\n @spec read(:atomics.ref()) :: non_neg_integer()\n def read(ref), do: :atomics.get(ref, 1)\nend\n```", "rejected": "defmodule AtomicTicks03 do\n @spec new() :: :atomics.ref()\n def new, do: {:ok, pid} = Agent.start_link(fn -> 0 end); pid\n\n @spec tick(:atomics.ref()) :: non_neg_integer()\n def tick(ref), do: Agent.get_and_update(ref, fn n -> {n + 1, n + 1} end)\n\n @spec read(:atomics.ref()) :: non_neg_integer()\n def read(ref), do: Agent.get(ref, & &1)\nend"}
11
+ {"id": "micro.qwen25c3b.dpo.core.structmigrate.v3.edge-empty", "family": "core", "source": "qwen25c3b_micro_dpo_v1", "weakness": "edge-empty", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `Profile03` with:\n\nStruct `%Profile03{name, email, plan: :free}`. `from_v1/1` builds it from an\nold plain map with keys `:name`, `:email`, and OPTIONAL `:plan` (defaults to\n`:free` only when absent).\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule Profile03 do\n defstruct [:name, :email, plan: :free]\n\n @type t :: %__MODULE__{name: term(), email: term(), plan: atom()}\n\n @spec from_v1(map()) :: %__MODULE__{}\n def from_v1(old) when is_map(old) do\n %__MODULE__{\n name: Map.get(old, :name),\n email: Map.get(old, :email),\n plan: Map.get(old, :plan, :free)\n }\n end\nend\n```", "rejected": "defmodule Profile03 do\n defstruct [:name, :email, plan: :free]\n\n @spec from_v1(map()) :: %__MODULE__{}\n def from_v1(old) when is_map(old) do\n %__MODULE__{\n name: Map.fetch!(old, :name),\n email: Map.fetch!(old, :email),\n plan: Map.fetch!(old, :plan)\n }\n end\nend"}
12
+ {"id": "micro.qwen25c3b.dpo.abstractions.attrinject.v3.protocol-behaviour", "family": "abstractions", "source": "qwen25c3b_micro_dpo_v1", "weakness": "protocol-behaviour", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `Tagged03` with:\n\n`Tagged03` provides `__using__(tag: tag)` that injects a module attribute\n`@tag` set to the given value plus a zero-arity `tag/0` returning it.\n`Tagger` does `use Tagged03, tag: :alpha`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule Tagged03 do\n defmacro __using__(opts) do\n tag = Keyword.fetch!(opts, :tag)\n\n quote do\n @tag unquote(tag)\n\n def tag, do: @tag\n end\n end\nend\n\ndefmodule Tagger do\n use Tagged03, tag: :alpha\nend\n```", "rejected": "defmodule Tagged03 do\n defmacro __using__(opts) do\n quote do\n @tag tag\n\n def tag, do: @tag\n end\n end\nend\n\ndefmodule Tagger do\n use Tagged03, tag: :alpha\nend"}
13
+ {"id": "micro.qwen25c3b.dpo.abstractions.codecbehaviour.v2.protocol-behaviour.0", "family": "abstractions", "source": "qwen25c3b_micro_dpo_v1", "weakness": "protocol-behaviour", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `CodecBehaviour02` with:\n\nBehaviour `CodecBehaviour02` with callbacks `encode/1` (`term() -> binary()`)\nand `decode/1` (`binary() -> {:ok, term()} | :error`); `decode/1` is optional.\nAlso define `run/2` calling encode then decode on a module, plus a\n`TextCodec` implementation where encode is `to_string/1` and decode wraps in\n`{:ok, _}`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule CodecBehaviour02 do\n @callback encode(term()) :: binary()\n @callback decode(binary()) :: {:ok, term()} | :error\n\n @optional_callbacks decode: 1\n\n def run(module, value) do\n value |> module.encode() |> module.decode()\n end\nend\n\ndefmodule TextCodec do\n @behaviour CodecBehaviour02\n\n @impl true\n def encode(value), do: to_string(value)\n\n @impl true\n def decode(bin), do: {:ok, bin}\nend\n```", "rejected": "defmodule CodecBehaviour02 do\n @callback encode(term()) :: binary()\n @callback decode(binary()) :: {:ok, term()} | :error\n\n @optional_callbacks decode: 1\n\n def run(module, value) do\n value |> module.encode() |> module.decode()\n end\nend\n\ndefmodule TextCodec do\n @behaviour CodecBehaviour02\n\n @impl true\n def encode(value, _opts), do: to_string(value)\n\n @impl true\n def decode(bin), do: {:ok, bin}\nend"}
14
+ {"id": "micro.qwen25c3b.dpo.beam.localcache.v3.ets-api", "family": "beam", "source": "qwen25c3b_micro_dpo_v1", "weakness": "ets-api", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `LocalCache03` with:\n\n@spec new() :: :ets.table()\n def new()\n\n @spec put(:ets.table(), term(), term()) :: true\n def put(table, key, value)\n\n @spec get(:ets.table(), term(), term()) :: term()\n def get(table, key, default)\n\nA public `:set` ETS table. `get/3` returns `default` for missing keys.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule LocalCache03 do\n @spec new() :: :ets.table()\n def new, do: :ets.new(__MODULE__, [:set, :public])\n\n @spec put(:ets.table(), term(), term()) :: true\n def put(table, key, value), do: :ets.insert(table, {key, value})\n\n @spec get(:ets.table(), term(), term()) :: term()\n def get(table, key, default) do\n case :ets.lookup(table, key) do\n [{^key, value}] -> value\n [] -> default\n end\n end\nend\n```", "rejected": "defmodule LocalCache03 do\n @spec new() :: :ets.table()\n def new, do: :ets.new(__MODULE__, [:set, :public])\n\n @spec put(:ets.table(), term(), term()) :: true\n def put(table, key, value), do: :ets.insert(table, {key, value})\n\n @spec get(:ets.table(), term(), term()) :: term()\n def get(table, key, default) do\n:ets.lookup_element(table, key, 2)\n end\nend"}
15
+ {"id": "micro.qwen25c3b.dpo.otp.asyncsumsq.v2.fn-guard", "family": "otp", "source": "qwen25c3b_micro_dpo_v1", "weakness": "fn-guard", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `AsyncSumSq02` with:\n\n@spec run(list()) :: term()\n def run(list)\n\nCompute the sum of squares of the integers inside `Task.async`. Await with timeout `5_000` and return the\nresult. Do not use `spawn`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule AsyncSumSq02 do\n @spec run(list()) :: term()\n def run(list) when is_list(list) do\n task = Task.async(fn -> list |> Enum.map(&(&1 * &1)) |> Enum.sum() end)\n Task.await(task, 5_000)\n end\nend\n```", "rejected": "defmodule AsyncSumSq02 do\n @spec run(list()) :: term()\n def run(list) when is_list(list) do\n task = Task.async(fn list when is_list(list) -> list |> Enum.map(&(&1 * &1)) |> Enum.sum() end)\n Task.await(task, 5_000)\n end\nend"}
16
+ {"id": "micro.qwen25c3b.dpo.binaries.s16be.bin-size-guard", "family": "binaries", "source": "qwen25c3b_micro_dpo_v1", "weakness": "bin-size-guard", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `S16BE` with:\n\n@spec encode(-32768..32767) :: <<_::16>>\n def encode(n)\n\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(bin)\n\nUse bit syntax (`::signed-big-integer-size(16)`). `decode/1` returns\n`:error` unless the binary is exactly 2 byte(s).\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule S16BE do\n @spec encode(-32768..32767) :: <<_::16>>\n def encode(n) when is_integer(n) and n >= -32768 and n <= 32767 do\n <<n::signed-big-integer-size(16)>>\n end\n\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(<<n::signed-big-integer-size(16)>>), do: {:ok, n}\n def decode(_other), do: :error\nend\n```", "rejected": "defmodule S16BE do\n @spec encode(-32768..32767) :: <<_::16>>\n def encode(n) when is_integer(n) and n >= -32768 and n <= 32767 do\n <<n::signed-big-integer-size(16)>>\n end\n\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(<<n::signed-big-integer-size(16), _rest::binary>>), do: {:ok, n}\n def decode(_other), do: :error\nend"}
17
+ {"id": "micro.qwen25c3b.dpo.stdlib.graphemecut.stdlib-misuse.0", "family": "stdlib", "source": "qwen25c3b_micro_dpo_v1", "weakness": "stdlib-misuse", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `GraphemeCut` with:\n\n@spec head(String.t(), non_neg_integer()) :: String.t()\n def head(text, n)\n\n @spec size_bytes(String.t()) :: non_neg_integer()\n def size_bytes(text)\n\n`head/2` keeps the first `n` GRAPHEMES. `size_bytes/1` counts BYTES, not\ncharacters.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule GraphemeCut do\n @spec head(String.t(), non_neg_integer()) :: String.t()\n def head(text, n) when is_binary(text) and n >= 0 do\n text |> String.graphemes() |> Enum.take(n) |> Enum.join()\n end\n\n @spec size_bytes(String.t()) :: non_neg_integer()\n def size_bytes(text) when is_binary(text), do: byte_size(text)\nend\n```", "rejected": "defmodule GraphemeCut do\n @spec head(String.t(), non_neg_integer()) :: String.t()\n def head(text, n) when is_binary(text) and n >= 0 do\n text |> String.graphemes() |> Enum.take(n) |> Enum.join()\n end\n\n @spec size_bytes(String.t()) :: non_neg_integer()\n def size_bytes(text) when is_binary(text), do: String.length(text)\nend"}
18
+ {"id": "micro.qwen25c3b.dpo.beam.refbadge.stdlib-misuse", "family": "beam", "source": "qwen25c3b_micro_dpo_v1", "weakness": "stdlib-misuse", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `RefBadge` with:\n\n@spec fresh() :: reference()\n def fresh()\n\nReturn a brand-new unique reference on every call (`make_ref/0`).\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule RefBadge do\n @spec fresh() :: reference()\n def fresh, do: make_ref()\nend\n```", "rejected": "defmodule RefBadge do\n @spec fresh() :: reference()\n def fresh, do: :erlang.unique_integer()\nend"}
19
+ {"id": "micro.qwen25c3b.dpo.binaries.zigzag16.v3.bin-signed", "family": "binaries", "source": "qwen25c3b_micro_dpo_v1", "weakness": "bin-signed", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `Zigzag1603` with:\n\n@spec encode(-2_147_483_648..2_147_483_647) :: non_neg_integer()\n def encode(n)\n\n @spec decode(non_neg_integer()) :: integer()\n def decode(z)\n\nZigzag mapping used by protobuf varints: `0, -1, 1, -2, 2 ...` map to\n`0, 1, 2, 3, 4 ...`. Use Bitwise shifts.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule Zigzag1603 do\n @spec encode(-2_147_483_648..2_147_483_647) :: non_neg_integer()\n def encode(n) when is_integer(n) and n >= -2_147_483_648 and n <= 2_147_483_647 do\n import Bitwise\n bxor(n <<< 1, n >>> 31)\n end\n\n @spec decode(non_neg_integer()) :: integer()\n def decode(z) when is_integer(z) and z >= 0 do\n import Bitwise\n bxor(z >>> 1, -(z &&& 1))\n end\nend\n```", "rejected": "defmodule Zigzag1603 do\n @spec encode(-2_147_483_648..2_147_483_647) :: non_neg_integer()\n def encode(n) when is_integer(n) and n >= -2_147_483_648 and n <= 2_147_483_647 do\n import Bitwise\n abs(n) * 2\n end\n\n @spec decode(non_neg_integer()) :: integer()\n def decode(z) when is_integer(z) and z >= 0 do\n import Bitwise\n bxor(z >>> 1, -(z &&& 1))\n end\nend"}
20
+ {"id": "micro.qwen25c3b.dpo.binaries.s24le.v3.bin-signed", "family": "binaries", "source": "qwen25c3b_micro_dpo_v1", "weakness": "bin-signed", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `S24LE03` with:\n\n@spec encode(-8388608..8388607) :: <<_::24>>\n def encode(n)\n\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(bin)\n\nUse bit syntax (`::signed-little-integer-size(24)`). `decode/1` returns\n`:error` unless the binary is exactly 3 byte(s).\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule S24LE03 do\n @spec encode(-8388608..8388607) :: <<_::24>>\n def encode(n) when is_integer(n) and n >= -8388608 and n <= 8388607 do\n <<n::signed-little-integer-size(24)>>\n end\n\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(<<n::signed-little-integer-size(24)>>), do: {:ok, n}\n def decode(_other), do: :error\nend\n```", "rejected": "defmodule S24LE03 do\n @spec encode(-8388608..8388607) :: <<_::24>>\n def encode(n) when is_integer(n) and n >= -8388608 and n <= 8388607 do\n <<n::signed-little-integer-size(24)>>\n end\n\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(<<n::unsigned-little-integer-size(24)>>), do: {:ok, n}\n def decode(_other), do: :error\nend"}
21
+ {"id": "micro.qwen25c3b.dpo.otp.asyncmedian.v2.otp-task-await", "family": "otp", "source": "qwen25c3b_micro_dpo_v1", "weakness": "otp-task-await", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `AsyncMedian02` with:\n\n@spec run(list()) :: term()\n def run(list)\n\nCompute the median of the list (middle of the sorted list) inside `Task.async`. Await with timeout `5_000` and return the\nresult. Do not use `spawn`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule AsyncMedian02 do\n @spec run(list()) :: term()\n def run(list) when is_list(list) do\n task = Task.async(fn -> Enum.sort(list) |> then(&Enum.at(&1, div(length(&1), 2))) end)\n Task.await(task, 5_000)\n end\nend\n```", "rejected": "defmodule AsyncMedian02 do\n @spec run(list()) :: term()\n def run(list) when is_list(list) do\n Task.async(fn -> Enum.sort(list) |> then(&Enum.at(&1, div(length(&1), 2))) end)\n end\nend"}
22
+ {"id": "micro.qwen25c3b.dpo.beam.pdflag.v3.persistent-term", "family": "beam", "source": "qwen25c3b_micro_dpo_v1", "weakness": "persistent-term", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `ProcFlag03` with:\n\n@spec put(term()) :: :ok\n def put(value)\n\n @spec get() :: {:ok, term()} | :error\n def get()\n\n @spec clear() :: :ok\n def clear()\n\nPer-process flag stored in the PROCESS DICTIONARY under a module-specific\nkey (`Process.put/2`). Absent means `:error`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule ProcFlag03 do\n @key :pdflag_value\n\n @spec put(term()) :: :ok\n def put(value) do\n Process.put(@key, value)\n :ok\n end\n\n @spec get() :: {:ok, term()} | :error\n def get do\n case Process.get(@key) do\n nil -> :error\n value -> {:ok, value}\n end\n end\n\n @spec clear() :: :ok\n def clear do\n Process.delete(@key)\n :ok\n end\nend\n```", "rejected": "defmodule ProcFlag03 do\n @key {__MODULE__, :pdflag_value}\n\n @spec put(term()) :: :ok\n def put(value) do\n :persistent_term.put(@key, value)\n :ok\n end\n\n @spec get() :: {:ok, term()} | :error\n def get do\n case :persistent_term.get(@key, :absent) do\n :absent -> :error\n value -> {:ok, value}\n end\n end\n\n @spec clear() :: :ok\n def clear do\n :persistent_term.erase(@key)\n :ok\n end\nend"}
23
+ {"id": "micro.qwen25c3b.dpo.core.guardband.v2.fn-guard", "family": "core", "source": "qwen25c3b_micro_dpo_v1", "weakness": "fn-guard", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `GuardBand02` with:\n\n@spec band(integer()) :: :low | :mid | :high | :out\n def band(n)\n\nDefine `defguard is_band/1` (integer 0..100). Values below 34 are `:low`,\nbelow 67 `:mid`, within range otherwise `:high`, everything else `:out`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule GuardBand02 do\n defguard is_band(n) when is_integer(n) and n >= 0 and n <= 100\n\n @spec band(integer()) :: :low | :mid | :high | :out\n def band(n) when is_band(n) and n < 34, do: :low\n def band(n) when is_band(n) and n < 67, do: :mid\n def band(n) when is_band(n), do: :high\n def band(_n), do: :out\nend\n```", "rejected": "defmodule GuardBand02 do\n @spec band(integer()) :: :low | :mid | :high | :out\n def band(n) do\n classifier = fn\n x when is_integer(x), acc when x in 0..100 -> classify(x)\n _x, _acc -> :out\n end\n\n classifier.(n, :unused)\n end\n\n defp classify(n) when n < 34, do: :low\n defp classify(n) when n < 67, do: :mid\n defp classify(_n), do: :high\nend"}
24
+ {"id": "micro.qwen25c3b.dpo.otp.notice.v2.otp-cast-call", "family": "otp", "source": "qwen25c3b_micro_dpo_v1", "weakness": "otp-cast-call", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `Notice02` with:\n\n@spec start_link() :: {:ok, pid()}\n def start_link()\n\n @spec join(pid(), term()) :: :ok\n def join(pid, who)\n\n @spec broadcast(pid(), term()) :: :ok\n def broadcast(pid, msg)\n\nPub-sub GenServer. `join/2` registers any term (usually a pid). `broadcast/2`\nsends `{:notice, msg}` to every subscriber with `send/2`. Calls use timeout\n`5_000`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule Notice02 do\n use GenServer\n\n @timeout 5_000\n\n @spec start_link() :: {:ok, pid()}\n def start_link, do: GenServer.start_link(__MODULE__, %{})\n\n @spec join(pid(), term()) :: :ok\n def join(pid, who), do: GenServer.call(pid, {:join, who}, @timeout)\n\n @spec broadcast(pid(), term()) :: :ok\n def broadcast(pid, msg), do: GenServer.call(pid, {:broadcast, msg}, @timeout)\n\n @impl true\n def init(subscribers), do: {:ok, subscribers}\n\n @impl true\n def handle_call({:join, who}, _from, subscribers),\n do: {:reply, :ok, Map.put(subscribers, who, true)}\n\n def handle_call({:broadcast, msg}, _from, subscribers) do\n Enum.each(Map.keys(subscribers), fn who -> send(who, {:notice, msg}) end)\n {:reply, :ok, subscribers}\n end\nend\n```", "rejected": "defmodule Notice02 do\n use GenServer\n\n @timeout 5_000\n\n @spec start_link() :: {:ok, pid()}\n def start_link, do: GenServer.start_link(__MODULE__, %{})\n\n @spec join(pid(), term()) :: :ok\n def join(pid, who), do: GenServer.call(pid, {:join, who}, @timeout)\n\n @spec broadcast(pid(), term()) :: :ok\n def broadcast(pid, msg), do: GenServer.cast(pid, {:broadcast, msg})\n\n @impl true\n def init(subscribers), do: {:ok, subscribers}\n\n @impl true\n def handle_call({:join, who}, _from, subscribers),\n do: {:reply, :ok, Map.put(subscribers, who, true)}\n\n def handle_cast({:broadcast, msg}, subscribers) do\n Enum.each(Map.keys(subscribers), fn who -> send(who, {:notice, msg}) end)\n {:noreply, subscribers}\n end\nend"}
25
+ {"id": "micro.qwen25c3b.dpo.binaries.u64be.v3.bin-endian", "family": "binaries", "source": "qwen25c3b_micro_dpo_v1", "weakness": "bin-endian", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `U64BE03` with:\n\n@spec encode(0..18446744073709551615) :: <<_::64>>\n def encode(n)\n\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(bin)\n\nUse bit syntax (`::unsigned-big-integer-size(64)`). `decode/1` returns\n`:error` unless the binary is exactly 8 byte(s).\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule U64BE03 do\n @spec encode(0..18446744073709551615) :: <<_::64>>\n def encode(n) when is_integer(n) and n >= 0 and n <= 18446744073709551615 do\n <<n::unsigned-big-integer-size(64)>>\n end\n\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(<<n::unsigned-big-integer-size(64)>>), do: {:ok, n}\n def decode(_other), do: :error\nend\n```", "rejected": "defmodule U64BE03 do\n @spec encode(0..18446744073709551615) :: <<_::64>>\n def encode(n) when is_integer(n) and n >= 0 and n <= 18446744073709551615 do\n <<n::unsigned-big-integer-size(64)>>\n end\n\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(<<n::unsigned-little-integer-size(64)>>), do: {:ok, n}\n def decode(_other), do: :error\nend"}
26
+ {"id": "micro.qwen25c3b.dpo.binaries.s16be.v3.bin-endian", "family": "binaries", "source": "qwen25c3b_micro_dpo_v1", "weakness": "bin-endian", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `S16BE03` with:\n\n@spec encode(-32768..32767) :: <<_::16>>\n def encode(n)\n\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(bin)\n\nUse bit syntax (`::signed-big-integer-size(16)`). `decode/1` returns\n`:error` unless the binary is exactly 2 byte(s).\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule S16BE03 do\n @spec encode(-32768..32767) :: <<_::16>>\n def encode(n) when is_integer(n) and n >= -32768 and n <= 32767 do\n <<n::signed-big-integer-size(16)>>\n end\n\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(<<n::signed-big-integer-size(16)>>), do: {:ok, n}\n def decode(_other), do: :error\nend\n```", "rejected": "defmodule S16BE03 do\n @spec encode(-32768..32767) :: <<_::16>>\n def encode(n) when is_integer(n) and n >= -32768 and n <= 32767 do\n <<n::signed-big-integer-size(16)>>\n end\n\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(<<n::signed-little-integer-size(16)>>), do: {:ok, n}\n def decode(_other), do: :error\nend"}
27
+ {"id": "micro.qwen25c3b.dpo.otp.rollcall.otp-cast-call", "family": "otp", "source": "qwen25c3b_micro_dpo_v1", "weakness": "otp-cast-call", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `RollCall` with:\n\n@spec start_link() :: {:ok, pid()}\n def start_link()\n\n @spec arrive(pid(), term()) :: :ok\n def arrive(pid, who)\n\n @spec present?(pid(), term()) :: boolean()\n def present?(pid, who)\n\n @spec count(pid()) :: non_neg_integer()\n def count(pid)\n\nAgent-backed set of arrivals.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule RollCall do\n @spec start_link() :: {:ok, pid()}\n def start_link, do: Agent.start_link(fn -> MapSet.new() end)\n\n @spec arrive(pid(), term()) :: :ok\n def arrive(pid, who), do: Agent.update(pid, &MapSet.put(&1, who))\n\n @spec present?(pid(), term()) :: boolean()\n def present?(pid, who), do: Agent.get(pid, &MapSet.member?(&1, who))\n\n @spec count(pid()) :: non_neg_integer()\n def count(pid), do: Agent.get(pid, &MapSet.size(&1))\nend\n```", "rejected": "defmodule RollCall do\n @spec start_link() :: {:ok, pid()}\n def start_link, do: Agent.start_link(fn -> MapSet.new() end)\n\n @spec arrive(pid(), term()) :: :ok\n def arrive(pid, who), do: Agent.update(pid, &MapSet.put(&1, who))\n\n @spec present?(pid(), term()) :: boolean()\n def present?(pid, who), do: Agent.get(pid, &Map.get(&1, who, false))\n\n @spec count(pid()) :: non_neg_integer()\n def count(pid), do: Agent.get(pid, &MapSet.size(&1))\nend"}
28
+ {"id": "micro.qwen25c3b.dpo.errors.parsepair.v3.err-with-else", "family": "errors", "source": "qwen25c3b_micro_dpo_v1", "weakness": "err-with-else", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `ParsePairStrict03` with:\n\n@spec run(String.t()) :: {:ok, {integer(), integer()}} | {:error, :bad_pair}\n def run(text)\n\n`\"a>b\"` with whole integers on both sides (trim whitespace). Use `with`.\nAnything else is `{:error, :bad_pair}`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule ParsePairStrict03 do\n @spec run(String.t()) :: {:ok, {integer(), integer()}} | {:error, :bad_pair}\n def run(text) when is_binary(text) do\n with [left, right] <- String.split(text, \">\", parts: 2),\n {a, \"\"} <- Integer.parse(String.trim(left)),\n {b, \"\"} <- Integer.parse(String.trim(right)) do\n {:ok, {a, b}}\n else\n _other -> {:error, :bad_pair}\n end\n end\nend\n```", "rejected": "defmodule ParsePairStrict03 do\n @spec run(String.t()) :: {:ok, {integer(), integer()}} | {:error, :bad_pair}\n def run(text) when is_binary(text) do\n with [left, right] <- String.split(text, \">\", parts: 2),\n {a, \"\"} <- Integer.parse(String.trim(left)),\n {b, \"\"} <- Integer.parse(String.trim(right)) do\n {:ok, {a, b}}\nend\n end\nend"}
29
+ {"id": "micro.qwen25c3b.dpo.otp.selectrecv.v2.err-with-else", "family": "otp", "source": "qwen25c3b_micro_dpo_v1", "weakness": "err-with-else", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `SelectRecv02` with:\n\n@spec wait_for_done(non_neg_integer()) :: integer() | :timeout\n def wait_for_done(ticks)\n\nFirst send `{:tick, n}` for n in 1..ticks to SELF, then `{:done, ticks * 10}`.\nThen selectively receive ONLY the `{:done, total}` message (skipping stale\nticks) and return `total`. Guard with `after 1_000`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule SelectRecv02 do\n @spec wait_for_done(non_neg_integer()) :: integer() | :timeout\n def wait_for_done(ticks) when is_integer(ticks) and ticks >= 0 do\n for n <- 1..ticks, do: send(self(), {:tick, n})\n send(self(), {:done, ticks * 10})\n\n receive do\n {:done, total} -> total\n after\n 1_000 -> :timeout\n end\n end\nend\n```", "rejected": "defmodule SelectRecv02 do\n @spec wait_for_done(non_neg_integer()) :: integer() | :timeout\n def wait_for_done(ticks) when is_integer(ticks) and ticks >= 0 do\n for n <- 1..ticks, do: send(self(), {:tick, n})\n send(self(), {:done, ticks * 10})\n\n receive do\n {:done, total} -> total\n {:tick, n} -> n\n after\n 1_000 -> :timeout\n end\n end\nend"}
30
+ {"id": "micro.qwen25c3b.dpo.beam.multibag.v2.ets-api", "family": "beam", "source": "qwen25c3b_micro_dpo_v1", "weakness": "ets-api", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `MultiBag02` with:\n\n@spec new() :: :ets.table()\n def new()\n\n @spec add(:ets.table(), term(), term()) :: true\n def add(table, key, value)\n\n @spec members(:ets.table(), term()) :: [term()]\n def members(table, key)\n\nA `:bag` ETS table: repeated `add/3` calls with the same key accumulate.\n`members/1` returns the stored values sorted.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule MultiBag02 do\n @spec new() :: :ets.table()\n def new, do: :ets.new(__MODULE__, [:bag, :public])\n\n @spec add(:ets.table(), term(), term()) :: true\n def add(table, key, value), do: :ets.insert(table, {key, value})\n\n @spec members(:ets.table(), term()) :: [term()]\n def members(table, key) do\n table |> :ets.lookup(key) |> Enum.map(&elem(&1, 1)) |> Enum.sort()\n end\nend\n```", "rejected": "defmodule MultiBag02 do\n @spec new() :: :ets.table()\n def new, do: :ets.new(__MODULE__, [:set, :public])\n\n @spec add(:ets.table(), term(), term()) :: true\n def add(table, key, value), do: :ets.insert(table, {key, value})\n\n @spec members(:ets.table(), term()) :: [term()]\n def members(table, key) do\n table |> :ets.lookup(key) |> Enum.map(&elem(&1, 1)) |> Enum.sort()\n end\nend"}
31
+ {"id": "micro.qwen25c3b.dpo.binaries.leb128.v3.bin-size-guard", "family": "binaries", "source": "qwen25c3b_micro_dpo_v1", "weakness": "bin-size-guard", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `Leb12803` with:\n\n@spec decode(binary()) :: {:ok, {non_neg_integer(), binary()}} | :error\n def decode(bin)\n\nDecode an unsigned little-endian base-128 varint. Each byte contributes its\nlow 7 bits; bit 7 set means another byte follows. Return the value and the\nremaining bytes. More than 5 continuation bytes is `:error`, as is input that\nends mid-varint.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule Leb12803 do\n @spec decode(binary()) :: {:ok, {non_neg_integer(), binary()}} | :error\n def decode(bin) when is_binary(bin), do: dec(bin, 0, 0)\n\n defp dec(_rest, _acc, 5), do: :error\n\n defp dec(<<>>, _acc, _count), do: :error\n\n defp dec(<<byte, rest::binary>>, acc, count) do\n import Bitwise\n next = acc + ((byte &&& 0x7F) <<< (7 * count))\n\n if (byte &&& 0x80) == 0 do\n {:ok, {next, rest}}\n else\n dec(rest, next, count + 1)\n end\n end\nend\n```", "rejected": "defmodule Leb12803 do\n @spec decode(binary()) :: {:ok, {non_neg_integer(), binary()}} | :error\n def decode(bin) when is_binary(bin), do: dec(bin, 0, 0)\n\n defp dec(<<>>, _acc, _count), do: :error\n\n defp dec(<<byte, rest::binary>>, acc, count) do\n import Bitwise\n next = acc + ((byte &&& 0x7F) <<< (7 * count))\n\n if (byte &&& 0x80) == 0 do\n {:ok, {next, rest}}\n else\n dec(rest, next, count + 1)\n end\n end\nend"}
32
+ {"id": "micro.qwen25c3b.dpo.otp.asyncsumsq.v3.otp-task-await", "family": "otp", "source": "qwen25c3b_micro_dpo_v1", "weakness": "otp-task-await", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `AsyncSumSq03` with:\n\n@spec run(list()) :: term()\n def run(list)\n\nCompute the sum of squares of the integers inside `Task.async`. Await with timeout `5_000` and return the\nresult. Do not use `spawn`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule AsyncSumSq03 do\n @spec run(list()) :: term()\n def run(list) when is_list(list) do\n task = Task.async(fn -> list |> Enum.map(&(&1 * &1)) |> Enum.sum() end)\n Task.await(task, 5_000)\n end\nend\n```", "rejected": "defmodule AsyncSumSq03 do\n @spec run(list()) :: term()\n def run(list) when is_list(list) do\n Task.async(fn -> list |> Enum.map(&(&1 * &1)) |> Enum.sum() end)\n end\nend"}
33
+ {"id": "micro.qwen25c3b.dpo.otp.notice.otp-timeout", "family": "otp", "source": "qwen25c3b_micro_dpo_v1", "weakness": "otp-timeout", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `Notice` with:\n\n@spec start_link() :: {:ok, pid()}\n def start_link()\n\n @spec join(pid(), term()) :: :ok\n def join(pid, who)\n\n @spec broadcast(pid(), term()) :: :ok\n def broadcast(pid, msg)\n\nPub-sub GenServer. `join/2` registers any term (usually a pid). `broadcast/2`\nsends `{:notice, msg}` to every subscriber with `send/2`. Calls use timeout\n`5_000`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule Notice do\n use GenServer\n\n @timeout 5_000\n\n @spec start_link() :: {:ok, pid()}\n def start_link, do: GenServer.start_link(__MODULE__, %{})\n\n @spec join(pid(), term()) :: :ok\n def join(pid, who), do: GenServer.call(pid, {:join, who}, @timeout)\n\n @spec broadcast(pid(), term()) :: :ok\n def broadcast(pid, msg), do: GenServer.call(pid, {:broadcast, msg}, @timeout)\n\n @impl true\n def init(subscribers), do: {:ok, subscribers}\n\n @impl true\n def handle_call({:join, who}, _from, subscribers),\n do: {:reply, :ok, Map.put(subscribers, who, true)}\n\n def handle_call({:broadcast, msg}, _from, subscribers) do\n Enum.each(Map.keys(subscribers), fn who -> send(who, {:notice, msg}) end)\n {:reply, :ok, subscribers}\n end\nend\n```", "rejected": "defmodule Notice do\n use GenServer\n\n @spec start_link() :: {:ok, pid()}\n def start_link, do: GenServer.start_link(__MODULE__, %{})\n\n @spec join(pid(), term()) :: :ok\n def join(pid, who), do: GenServer.call(pid, {:join, who})\n\n @spec broadcast(pid(), term()) :: :ok\n def broadcast(pid, msg), do: GenServer.call(pid, {:broadcast, msg})\n\n @impl true\n def init(subscribers), do: {:ok, subscribers}\n\n @impl true\n def handle_call({:join, who}, _from, subscribers),\n do: {:reply, :ok, Map.put(subscribers, who, true)}\n\n def handle_call({:broadcast, msg}, _from, subscribers) do\n Enum.each(Map.keys(subscribers), fn who -> send(who, {:notice, msg}) end)\n {:reply, :ok, subscribers}\n end\nend"}
34
+ {"id": "micro.qwen25c3b.dpo.binaries.zigzag16.v2.bin-bitwise", "family": "binaries", "source": "qwen25c3b_micro_dpo_v1", "weakness": "bin-bitwise", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `Zigzag1602` with:\n\n@spec encode(-2_147_483_648..2_147_483_647) :: non_neg_integer()\n def encode(n)\n\n @spec decode(non_neg_integer()) :: integer()\n def decode(z)\n\nZigzag mapping used by protobuf varints: `0, -1, 1, -2, 2 ...` map to\n`0, 1, 2, 3, 4 ...`. Use Bitwise shifts.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule Zigzag1602 do\n @spec encode(-2_147_483_648..2_147_483_647) :: non_neg_integer()\n def encode(n) when is_integer(n) and n >= -2_147_483_648 and n <= 2_147_483_647 do\n import Bitwise\n bxor(n <<< 1, n >>> 31)\n end\n\n @spec decode(non_neg_integer()) :: integer()\n def decode(z) when is_integer(z) and z >= 0 do\n import Bitwise\n bxor(z >>> 1, -(z &&& 1))\n end\nend\n```", "rejected": "defmodule Zigzag1602 do\n @spec encode(-2_147_483_648..2_147_483_647) :: non_neg_integer()\n def encode(n) when is_integer(n) and n >= -2_147_483_648 and n <= 2_147_483_647 do\n import Bitwise\n bxor(n <<< 1, n >>> 31)\n end\n\n @spec decode(non_neg_integer()) :: integer()\n def decode(z) when is_integer(z) and z >= 0 do\n import Bitwise\n div(z, 2) * (if rem(z, 2) == 0, do: 1, else: -1)\n end\nend"}
35
+ {"id": "micro.qwen25c3b.dpo.otp.drainqueue.v3.otp-timeout", "family": "otp", "source": "qwen25c3b_micro_dpo_v1", "weakness": "otp-timeout", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `DrainQueue03` with:\n\n@spec start_link() :: {:ok, pid()}\n def start_link()\n\n @spec push(pid(), term()) :: :ok\n def push(pid, item)\n\n @spec pull(pid()) :: {:ok, term()} | :empty\n def pull(pid)\n\n @spec size(pid()) :: non_neg_integer()\n def size(pid)\n\nFIFO GenServer queue. Calls use timeout `5_000`; empty pulls are `:empty`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule DrainQueue03 do\n use GenServer\n\n @timeout 5_000\n\n @spec start_link() :: {:ok, pid()}\n def start_link, do: GenServer.start_link(__MODULE__, :queue.new())\n\n @spec push(pid(), term()) :: :ok\n def push(pid, item), do: GenServer.call(pid, {:push, item}, @timeout)\n\n @spec pull(pid()) :: {:ok, term()} | :empty\n def pull(pid), do: GenServer.call(pid, :pull, @timeout)\n\n @spec size(pid()) :: non_neg_integer()\n def size(pid), do: GenServer.call(pid, :size, @timeout)\n\n @impl true\n def init(q), do: {:ok, q}\n\n @impl true\n def handle_call({:push, item}, _from, q), do: {:reply, :ok, :queue.in(item, q)}\n\n def handle_call(:pull, _from, q) do\n case :queue.out(q) do\n {{:value, item}, rest} -> {:reply, {:ok, item}, rest}\n {:empty, rest} -> {:reply, :empty, rest}\n end\n end\n\n def handle_call(:size, _from, q), do: {:reply, :queue.len(q), q}\nend\n```", "rejected": "defmodule DrainQueue03 do\n use GenServer\n\n @timeout 5_000\n\n @spec start_link() :: {:ok, pid()}\n def start_link, do: GenServer.start_link(__MODULE__, :queue.new())\n\n @spec push(pid(), term()) :: :ok\n def push(pid, item), do: GenServer.call(pid, {:push, item})\n\n @spec pull(pid()) :: {:ok, term()} | :empty\n def pull(pid), do: GenServer.call(pid, :pull)\n\n @spec size(pid()) :: non_neg_integer()\n def size(pid), do: GenServer.call(pid, :size)\n\n @impl true\n def init(q), do: {:ok, q}\n\n @impl true\n def handle_call({:push, item}, _from, q), do: {:reply, :ok, :queue.in(item, q)}\n\n def handle_call(:pull, _from, q) do\n case :queue.out(q) do\n {{:value, item}, rest} -> {:reply, {:ok, item}, rest}\n {:empty, rest} -> {:reply, :empty, rest}\n end\n end\n\n def handle_call(:size, _from, q), do: {:reply, :queue.len(q), q}\nend"}
36
+ {"id": "micro.qwen25c3b.dpo.binaries.leb128.bin-bitwise", "family": "binaries", "source": "qwen25c3b_micro_dpo_v1", "weakness": "bin-bitwise", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-sft2"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `Leb128` with:\n\n@spec decode(binary()) :: {:ok, {non_neg_integer(), binary()}} | :error\n def decode(bin)\n\nDecode an unsigned little-endian base-128 varint. Each byte contributes its\nlow 7 bits; bit 7 set means another byte follows. Return the value and the\nremaining bytes. More than 5 continuation bytes is `:error`, as is input that\nends mid-varint.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule Leb128 do\n @spec decode(binary()) :: {:ok, {non_neg_integer(), binary()}} | :error\n def decode(bin) when is_binary(bin), do: dec(bin, 0, 0)\n\n defp dec(_rest, _acc, 5), do: :error\n\n defp dec(<<>>, _acc, _count), do: :error\n\n defp dec(<<byte, rest::binary>>, acc, count) do\n import Bitwise\n next = acc + ((byte &&& 0x7F) <<< (7 * count))\n\n if (byte &&& 0x80) == 0 do\n {:ok, {next, rest}}\n else\n dec(rest, next, count + 1)\n end\n end\nend\n```", "rejected": "defmodule Leb128 do\n @spec decode(binary()) :: {:ok, {non_neg_integer(), binary()}} | :error\n def decode(bin) when is_binary(bin), do: dec(bin, 0, 0)\n\n defp dec(_rest, _acc, 5), do: :error\n\n defp dec(<<>>, _acc, _count), do: :error\n\n defp dec(<<byte, rest::binary>>, acc, count) do\n import Bitwise\n next = acc + ((byte &&& 0xFF) <<< (7 * count))\n\n if (byte &&& 0x80) == 0 do\n {:ok, {next, rest}}\n else\n dec(rest, next, count + 1)\n end\n end\nend"}
data/onpolicy/qwen25c3b_micro_round11_kto.jsonl ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"id": "round11.qwen25c3b.core.head_or_fallback.chosen", "family": "core", "source": "qwen25c3b_micro_round11_kto", "weakness": "pattern-match-empty-case", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `HeadFallback.first/2`.\n\nReturn the first element of a non-empty list, or the supplied fallback for an\nempty list. Use function clauses and keep the fallback term unchanged.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule HeadFallback do\n @spec first([term()], term()) :: term()\n def first([head | _tail], _fallback), do: head\n def first([], fallback), do: fallback\nend\n```"}], "label": true}
2
+ {"id": "round11.qwen25c3b.core.head_or_fallback.rejected", "family": "core", "source": "qwen25c3b_micro_round11_kto", "weakness": "pattern-match-empty-case", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `HeadFallback.first/2`.\n\nReturn the first element of a non-empty list, or the supplied fallback for an\nempty list. Use function clauses and keep the fallback term unchanged.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule HeadFallback do\n @spec first([term()], term()) :: term()\n def first(values, _fallback), do: Enum.at(values, 0, nil)\nend\n```"}], "label": false}
3
+ {"id": "round11.qwen25c3b.core.guard_window.chosen", "family": "core", "source": "qwen25c3b_micro_round11_kto", "weakness": "inclusive-guard-boundary", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `GuardWindow.inside?/3`.\n\nReturn `true` when an integer value is between the integer lower and upper\nbounds, inclusive. Return `false` for a value outside the interval. Express\nthe contract with a guard and handle an invalid interval as `false`.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule GuardWindow do\n @spec inside?(integer(), integer(), integer()) :: boolean()\n def inside?(value, lower, upper)\n when is_integer(value) and is_integer(lower) and is_integer(upper) and lower <= upper,\n do: value >= lower and value <= upper\n\n def inside?(_value, _lower, _upper), do: false\nend\n```"}], "label": true}
4
+ {"id": "round11.qwen25c3b.core.guard_window.rejected", "family": "core", "source": "qwen25c3b_micro_round11_kto", "weakness": "inclusive-guard-boundary", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `GuardWindow.inside?/3`.\n\nReturn `true` when an integer value is between the integer lower and upper\nbounds, inclusive. Return `false` for a value outside the interval. Express\nthe contract with a guard and handle an invalid interval as `false`.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule GuardWindow do\n @spec inside?(integer(), integer(), integer()) :: boolean()\n def inside?(value, lower, upper) when is_integer(value) and is_integer(lower) and is_integer(upper),\n do: value > lower and value < upper\n\n def inside?(_value, _lower, _upper), do: false\nend\n```"}], "label": false}
5
+ {"id": "round11.qwen25c3b.collections.reduce_summary.chosen", "family": "collections", "source": "qwen25c3b_micro_round11_kto", "weakness": "reduce-nil-maximum", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `ReduceSummary.run/1`.\n\nFor a list of integers, return `{sum, maximum}` using one `Enum.reduce/3`.\nThe maximum is `nil` for an empty list, and negative values must remain\nnegative rather than being compared with a zero sentinel.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule ReduceSummary do\n @spec run([integer()]) :: {integer(), integer() | nil}\n def run(values) when is_list(values) do\n Enum.reduce(values, {0, nil}, fn value, {sum, maximum} ->\n next_maximum =\n if is_nil(maximum) or value > maximum do\n value\n else\n maximum\n end\n\n {sum + value, next_maximum}\n end)\n end\nend\n```"}], "label": true}
6
+ {"id": "round11.qwen25c3b.collections.reduce_summary.rejected", "family": "collections", "source": "qwen25c3b_micro_round11_kto", "weakness": "reduce-nil-maximum", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `ReduceSummary.run/1`.\n\nFor a list of integers, return `{sum, maximum}` using one `Enum.reduce/3`.\nThe maximum is `nil` for an empty list, and negative values must remain\nnegative rather than being compared with a zero sentinel.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule ReduceSummary do\n @spec run([integer()]) :: {integer(), integer() | nil}\n def run(values) when is_list(values) do\n Enum.reduce(values, {0, 0}, fn value, {sum, maximum} ->\n {sum + value, max(maximum, value)}\n end)\n end\nend\n```"}], "label": false}
7
+ {"id": "round11.qwen25c3b.collections.partition_order.chosen", "family": "collections", "source": "qwen25c3b_micro_round11_kto", "weakness": "reduce-order-preservation", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `PartitionOrder.split/2`.\n\nPartition a list into `%{keep: list, skip: list}` according to a one-argument\npredicate. Preserve the original order in both lists and use an immutable\nreduce accumulator.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule PartitionOrder do\n @spec split([term()], (term() -> boolean())) :: %{keep: [term()], skip: [term()]}\n def split(values, predicate) when is_list(values) and is_function(predicate, 1) do\n {keep, skip} =\n Enum.reduce(values, {[], []}, fn value, {keep, skip} ->\n if predicate.(value) do\n {[value | keep], skip}\n else\n {keep, [value | skip]}\n end\n end)\n\n %{keep: Enum.reverse(keep), skip: Enum.reverse(skip)}\n end\nend\n```"}], "label": true}
8
+ {"id": "round11.qwen25c3b.collections.partition_order.rejected", "family": "collections", "source": "qwen25c3b_micro_round11_kto", "weakness": "reduce-order-preservation", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `PartitionOrder.split/2`.\n\nPartition a list into `%{keep: list, skip: list}` according to a one-argument\npredicate. Preserve the original order in both lists and use an immutable\nreduce accumulator.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule PartitionOrder do\n @spec split([term()], (term() -> boolean())) :: %{keep: [term()], skip: [term()]}\n def split(values, predicate) when is_list(values) and is_function(predicate, 1) do\n Enum.reduce(values, %{keep: [], skip: []}, fn value, result ->\n key = if predicate.(value), do: :keep, else: :skip\n Map.update!(result, key, &[value | &1])\n end)\n end\nend\n```"}], "label": false}
9
+ {"id": "round11.qwen25c3b.binaries.big_frame.chosen", "family": "binaries", "source": "qwen25c3b_micro_round11_kto", "weakness": "exact-big-endian-frame", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `BigFrame.pack/2` and `BigFrame.unpack/1`.\n\nPack a one-byte tag, a 16-bit unsigned big-endian payload length, and the\npayload. Unpack only an exact frame: a short header, short payload, or\ntrailing bytes must return `:error`.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule BigFrame do\n @spec pack(byte(), binary()) :: binary()\n def pack(tag, payload) when is_integer(tag) and is_binary(payload) do\n <<tag, byte_size(payload)::unsigned-big-integer-size(16), payload::binary>>\n end\n\n @spec unpack(binary()) :: {:ok, byte(), binary()} | :error\n def unpack(<<tag, size::unsigned-big-integer-size(16), payload::binary>>) do\n if byte_size(payload) == size, do: {:ok, tag, payload}, else: :error\n end\n\n def unpack(_other), do: :error\nend\n```"}], "label": true}
10
+ {"id": "round11.qwen25c3b.binaries.big_frame.rejected", "family": "binaries", "source": "qwen25c3b_micro_round11_kto", "weakness": "exact-big-endian-frame", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `BigFrame.pack/2` and `BigFrame.unpack/1`.\n\nPack a one-byte tag, a 16-bit unsigned big-endian payload length, and the\npayload. Unpack only an exact frame: a short header, short payload, or\ntrailing bytes must return `:error`.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule BigFrame do\n @spec pack(byte(), binary()) :: binary()\n def pack(tag, payload) when is_integer(tag) and is_binary(payload) do\n <<tag, byte_size(payload)::unsigned-big-integer-size(16), payload::binary>>\n end\n\n @spec unpack(binary()) :: {:ok, byte(), binary()} | :error\n def unpack(<<tag, size::unsigned-little-integer-size(16), payload::binary>>) do\n if byte_size(payload) >= size, do: {:ok, tag, binary_part(payload, 0, size)}, else: :error\n end\n\n def unpack(_other), do: :error\nend\n```"}], "label": false}
11
+ {"id": "round11.qwen25c3b.binaries.nibble_pair.chosen", "family": "binaries", "source": "qwen25c3b_micro_round11_kto", "weakness": "sub-byte-bit-syntax", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `NibblePair.encode/2` and `NibblePair.decode/1`.\n\nEncode two integers from 0 through 15 into one byte, with the first integer\nin the high four bits and the second in the low four bits. Decode exactly one\nbyte into `{high, low}` and return `:error` for every other binary size.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule NibblePair do\n @spec encode(non_neg_integer(), non_neg_integer()) :: binary()\n def encode(high, low) when high in 0..15 and low in 0..15 do\n <<high::4, low::4>>\n end\n\n @spec decode(binary()) :: {:ok, {non_neg_integer(), non_neg_integer()}} | :error\n def decode(<<high::4, low::4>>), do: {:ok, {high, low}}\n def decode(_other), do: :error\nend\n```"}], "label": true}
12
+ {"id": "round11.qwen25c3b.binaries.nibble_pair.rejected", "family": "binaries", "source": "qwen25c3b_micro_round11_kto", "weakness": "sub-byte-bit-syntax", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `NibblePair.encode/2` and `NibblePair.decode/1`.\n\nEncode two integers from 0 through 15 into one byte, with the first integer\nin the high four bits and the second in the low four bits. Decode exactly one\nbyte into `{high, low}` and return `:error` for every other binary size.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule NibblePair do\n @spec encode(non_neg_integer(), non_neg_integer()) :: binary()\n def encode(high, low) when high in 0..15 and low in 0..15, do: <<high, low>>\n\n @spec decode(binary()) :: {:ok, {non_neg_integer(), non_neg_integer()}} | :error\n def decode(<<high, low>>), do: {:ok, {high, low}}\n def decode(_other), do: :error\nend\n```"}], "label": false}
13
+ {"id": "round11.qwen25c3b.errors.strict_number.chosen", "family": "errors", "source": "qwen25c3b_micro_round11_kto", "weakness": "tagged-strict-parse", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `StrictNumber.parse/1`.\n\nReturn `{:ok, integer}` only when `Integer.parse/1` consumes the complete\nstring. Return `{:error, :invalid}` for an empty string, partial number, or\nnon-number without raising. Use a tagged `with` expression.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule StrictNumber do\n @spec parse(String.t()) :: {:ok, integer()} | {:error, :invalid}\n def parse(text) when is_binary(text) do\n with {value, \"\"} <- Integer.parse(text) do\n {:ok, value}\n else\n _ -> {:error, :invalid}\n end\n end\nend\n```"}], "label": true}
14
+ {"id": "round11.qwen25c3b.errors.strict_number.rejected", "family": "errors", "source": "qwen25c3b_micro_round11_kto", "weakness": "tagged-strict-parse", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `StrictNumber.parse/1`.\n\nReturn `{:ok, integer}` only when `Integer.parse/1` consumes the complete\nstring. Return `{:error, :invalid}` for an empty string, partial number, or\nnon-number without raising. Use a tagged `with` expression.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule StrictNumber do\n @spec parse(String.t()) :: {:ok, integer()} | {:error, :invalid}\n def parse(text) when is_binary(text), do: {:ok, String.to_integer(text)}\nend\n```"}], "label": false}
15
+ {"id": "round11.qwen25c3b.errors.rescue_cleanup.chosen", "family": "errors", "source": "qwen25c3b_micro_round11_kto", "weakness": "rescue-and-after", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `RescueCleanup.run/2`.\n\nCall a zero-arity `work` function. Return `{:ok, value}` on success, convert a\n`RuntimeError` into `{:error, message}`, and always call the zero-arity\n`cleanup` function. Do not swallow other exception types.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule RescueCleanup do\n @spec run((() -> term()), (() -> term())) :: {:ok, term()} | {:error, String.t()}\n def run(work, cleanup) when is_function(work, 0) and is_function(cleanup, 0) do\n try do\n {:ok, work.()}\n rescue\n error in RuntimeError -> {:error, Exception.message(error)}\n after\n cleanup.()\n end\n end\nend\n```"}], "label": true}
16
+ {"id": "round11.qwen25c3b.errors.rescue_cleanup.rejected", "family": "errors", "source": "qwen25c3b_micro_round11_kto", "weakness": "rescue-and-after", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `RescueCleanup.run/2`.\n\nCall a zero-arity `work` function. Return `{:ok, value}` on success, convert a\n`RuntimeError` into `{:error, message}`, and always call the zero-arity\n`cleanup` function. Do not swallow other exception types.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule RescueCleanup do\n @spec run((() -> term()), (() -> term())) :: {:ok, term()} | {:error, String.t()}\n def run(work, cleanup) when is_function(work, 0) and is_function(cleanup, 0) do\n try do\n result = {:ok, work.()}\n cleanup.()\n result\n rescue\n error in RuntimeError -> {:error, Exception.message(error)}\n end\n end\nend\n```"}], "label": false}
17
+ {"id": "round11.qwen25c3b.otp.mailbox.chosen", "family": "otp", "source": "qwen25c3b_micro_round11_kto", "weakness": "genserver-call-state", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `Mailbox.start_link/1`, `Mailbox.push/2`, and `Mailbox.drain/1`.\n\nUse a GenServer whose state is a list. `push/2` must synchronously prepend a\nvalue and return `:ok`; `drain/1` must synchronously return values in insertion\norder and reset the state to an empty list. Both calls must pass an explicit\nmodule timeout.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule Mailbox do\n use GenServer\n\n @timeout 1_000\n\n @spec start_link(term()) :: GenServer.on_start()\n def start_link(initial), do: GenServer.start_link(__MODULE__, [initial])\n\n @spec push(pid(), term()) :: :ok\n def push(pid, value), do: GenServer.call(pid, {:push, value}, @timeout)\n\n @spec drain(pid()) :: [term()]\n def drain(pid), do: GenServer.call(pid, :drain, @timeout)\n\n @impl true\n def init(values), do: {:ok, values}\n\n @impl true\n def handle_call({:push, value}, _from, state), do: {:reply, :ok, [value | state]}\n\n @impl true\n def handle_call(:drain, _from, state), do: {:reply, Enum.reverse(state), []}\nend\n```"}], "label": true}
18
+ {"id": "round11.qwen25c3b.otp.mailbox.rejected", "family": "otp", "source": "qwen25c3b_micro_round11_kto", "weakness": "genserver-call-state", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `Mailbox.start_link/1`, `Mailbox.push/2`, and `Mailbox.drain/1`.\n\nUse a GenServer whose state is a list. `push/2` must synchronously prepend a\nvalue and return `:ok`; `drain/1` must synchronously return values in insertion\norder and reset the state to an empty list. Both calls must pass an explicit\nmodule timeout.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule Mailbox do\n use GenServer\n\n @timeout 1_000\n\n def start_link(initial), do: GenServer.start_link(__MODULE__, [initial])\n def push(pid, value), do: GenServer.cast(pid, {:push, value})\n def drain(pid), do: GenServer.call(pid, :drain, @timeout)\n\n @impl true\n def init(values), do: {:ok, values}\n\n @impl true\n def handle_cast({:push, value}, state), do: {:noreply, [value | state]}\n\n @impl true\n def handle_call(:drain, _from, state), do: {:reply, state, []}\nend\n```"}], "label": false}
19
+ {"id": "round11.qwen25c3b.otp.supervised_map.chosen", "family": "otp", "source": "qwen25c3b_micro_round11_kto", "weakness": "supervised-task-await", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `SupervisedMap.run/3`.\n\nRun a one-argument function for each value using\n`Task.Supervisor.async_nolink/2`. Await every task with an explicit timeout of\n1_000 milliseconds and return results in input order. Require a supervisor pid\nand a one-argument function.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule SupervisedMap do\n @timeout 1_000\n\n @spec run(pid(), [term()], (term() -> term())) :: [term()]\n def run(supervisor, values, function)\n when is_pid(supervisor) and is_list(values) and is_function(function, 1) do\n values\n |> Enum.map(fn value -> Task.Supervisor.async_nolink(supervisor, fn -> function.(value) end) end)\n |> Enum.map(&Task.await(&1, @timeout))\n end\nend\n```"}], "label": true}
20
+ {"id": "round11.qwen25c3b.otp.supervised_map.rejected", "family": "otp", "source": "qwen25c3b_micro_round11_kto", "weakness": "supervised-task-await", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `SupervisedMap.run/3`.\n\nRun a one-argument function for each value using\n`Task.Supervisor.async_nolink/2`. Await every task with an explicit timeout of\n1_000 milliseconds and return results in input order. Require a supervisor pid\nand a one-argument function.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule SupervisedMap do\n @timeout 1_000\n\n @spec run(pid(), [term()], (term() -> term())) :: [term()]\n def run(supervisor, values, function)\n when is_pid(supervisor) and is_list(values) and is_function(function, 1) do\n values\n |> Enum.reverse()\n |> Enum.map(fn value -> Task.async(fn -> function.(value) end) end)\n |> Enum.map(&Task.await(&1, @timeout))\n end\nend\n```"}], "label": false}
21
+ {"id": "round11.qwen25c3b.beam.ets_fetch.chosen", "family": "beam", "source": "qwen25c3b_micro_round11_kto", "weakness": "ets-tagged-lookup", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `EtsFetch.open/0`, `EtsFetch.put/3`, and `EtsFetch.get/2`.\n\nUse an ETS set. `open/0` creates and returns a private table; `put/3` stores a\nkey/value pair and returns `:ok`; `get/2` returns `{:ok, value}` for an\nexisting key and `:error` for a missing key without raising.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule EtsFetch do\n @spec open() :: :ets.tid()\n def open, do: :ets.new(:ets_fetch_table, [:set, :private])\n\n @spec put(:ets.tid(), term(), term()) :: :ok\n def put(table, key, value) do\n true = :ets.insert(table, {key, value})\n :ok\n end\n\n @spec get(:ets.tid(), term()) :: {:ok, term()} | :error\n def get(table, key) do\n case :ets.lookup(table, key) do\n [{^key, value}] -> {:ok, value}\n [] -> :error\n end\n end\nend\n```"}], "label": true}
22
+ {"id": "round11.qwen25c3b.beam.ets_fetch.rejected", "family": "beam", "source": "qwen25c3b_micro_round11_kto", "weakness": "ets-tagged-lookup", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `EtsFetch.open/0`, `EtsFetch.put/3`, and `EtsFetch.get/2`.\n\nUse an ETS set. `open/0` creates and returns a private table; `put/3` stores a\nkey/value pair and returns `:ok`; `get/2` returns `{:ok, value}` for an\nexisting key and `:error` for a missing key without raising.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule EtsFetch do\n @spec open() :: :ets.tid()\n def open, do: :ets.new(:ets_fetch_table, [:set, :private])\n\n @spec put(:ets.tid(), term(), term()) :: :ok\n def put(table, key, value) do\n true = :ets.insert(table, {key, value})\n :ok\n end\n\n @spec get(:ets.tid(), term()) :: {:ok, term()} | :error\n def get(table, key), do: {:ok, :ets.lookup_element(table, key, 2)}\nend\n```"}], "label": false}
23
+ {"id": "round11.qwen25c3b.beam.ref_timer.chosen", "family": "beam", "source": "qwen25c3b_micro_round11_kto", "weakness": "process-timer-reference", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `RefTimer.schedule/3`.\n\nSchedule the supplied message to a pid after a non-negative millisecond delay\nwith `Process.send_after/3`, and return the timer reference. Require a pid,\ninteger delay, and any message.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule RefTimer do\n @spec schedule(pid(), non_neg_integer(), term()) :: reference()\n def schedule(pid, delay, message) when is_pid(pid) and is_integer(delay) and delay >= 0 do\n Process.send_after(pid, message, delay)\n end\nend\n```"}], "label": true}
24
+ {"id": "round11.qwen25c3b.beam.ref_timer.rejected", "family": "beam", "source": "qwen25c3b_micro_round11_kto", "weakness": "process-timer-reference", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `RefTimer.schedule/3`.\n\nSchedule the supplied message to a pid after a non-negative millisecond delay\nwith `Process.send_after/3`, and return the timer reference. Require a pid,\ninteger delay, and any message.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule RefTimer do\n @spec schedule(pid(), non_neg_integer(), term()) :: reference()\n def schedule(pid, delay, message) when is_pid(pid) and is_integer(delay) and delay >= 0 do\n send(pid, message)\n end\nend\n```"}], "label": false}
25
+ {"id": "round11.qwen25c3b.abstractions.contract_call.chosen", "family": "abstractions", "source": "qwen25c3b_micro_round11_kto", "weakness": "behaviour-contract-arity", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `ContractCall.call/2` and declare its callback.\n\nDeclare `c:render/1` as a callback returning a term, then call that callback\non a provider module passed as the first argument. The call must pass the\nvalue as exactly one argument and return the provider result.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule ContractCall do\n @callback render(term()) :: term()\n\n @spec call(module(), term()) :: term()\n def call(provider, value) when is_atom(provider), do: provider.render(value)\nend\n```"}], "label": true}
26
+ {"id": "round11.qwen25c3b.abstractions.contract_call.rejected", "family": "abstractions", "source": "qwen25c3b_micro_round11_kto", "weakness": "behaviour-contract-arity", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `ContractCall.call/2` and declare its callback.\n\nDeclare `c:render/1` as a callback returning a term, then call that callback\non a provider module passed as the first argument. The call must pass the\nvalue as exactly one argument and return the provider result.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule ContractCall do\n @callback render(term()) :: term()\n\n @spec call(module(), term()) :: term()\n def call(provider, _value) when is_atom(provider), do: provider.render(:ignored)\nend\n```"}], "label": false}
27
+ {"id": "round11.qwen25c3b.abstractions.optional_callback.chosen", "family": "abstractions", "source": "qwen25c3b_micro_round11_kto", "weakness": "optional-callback-default", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `OptionalLabel.label/2`.\n\nCall `provider.label/1` when the provider module exports that one-argument\nfunction; otherwise return the supplied fallback. Check exports without\nraising and preserve the value passed to the provider.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule OptionalLabel do\n @spec label(module(), term()) :: term()\n def label(provider, fallback) when is_atom(provider) do\n if function_exported?(provider, :label, 1) do\n provider.label(fallback)\n else\n fallback\n end\n end\nend\n```"}], "label": true}
28
+ {"id": "round11.qwen25c3b.abstractions.optional_callback.rejected", "family": "abstractions", "source": "qwen25c3b_micro_round11_kto", "weakness": "optional-callback-default", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `OptionalLabel.label/2`.\n\nCall `provider.label/1` when the provider module exports that one-argument\nfunction; otherwise return the supplied fallback. Check exports without\nraising and preserve the value passed to the provider.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule OptionalLabel do\n @spec label(module(), term()) :: term()\n def label(provider, fallback) when is_atom(provider) do\n if function_exported?(provider, :label, 0) do\n provider.label()\n else\n fallback\n end\n end\nend\n```"}], "label": false}
29
+ {"id": "round11.qwen25c3b.stdlib.query_map.chosen", "family": "stdlib", "source": "qwen25c3b_micro_round11_kto", "weakness": "uri-query-decoding", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `QueryMap.decode/1`.\n\nDecode a URI query string into a map using the standard library. For example,\n`\"name=Ada&role=admin\"` becomes `%{\"name\" => \"Ada\", \"role\" => \"admin\"}`.\nAn empty query must return an empty map.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule QueryMap do\n @spec decode(String.t()) :: map()\n def decode(query) when is_binary(query), do: URI.decode_query(query)\nend\n```"}], "label": true}
30
+ {"id": "round11.qwen25c3b.stdlib.query_map.rejected", "family": "stdlib", "source": "qwen25c3b_micro_round11_kto", "weakness": "uri-query-decoding", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `QueryMap.decode/1`.\n\nDecode a URI query string into a map using the standard library. For example,\n`\"name=Ada&role=admin\"` becomes `%{\"name\" => \"Ada\", \"role\" => \"admin\"}`.\nAn empty query must return an empty map.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule QueryMap do\n @spec decode(String.t()) :: map()\n def decode(query) when is_binary(query), do: URI.parse(query)\nend\n```"}], "label": false}
31
+ {"id": "round11.qwen25c3b.stdlib.named_capture.chosen", "family": "stdlib", "source": "qwen25c3b_micro_round11_kto", "weakness": "regex-named-capture", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `NamedCapture.user/1`.\n\nExtract a lowercase username after an `@` from a string with a named regular\nexpression capture. Return the captured username as a string, or `:error` if\nthere is no match.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule NamedCapture do\n @spec user(String.t()) :: String.t() | :error\n def user(text) when is_binary(text) do\n case Regex.named_captures(~r/@(?<user>[a-z][a-z0-9_]*)/, text) do\n %{\"user\" => value} -> value\n nil -> :error\n end\n end\nend\n```"}], "label": true}
32
+ {"id": "round11.qwen25c3b.stdlib.named_capture.rejected", "family": "stdlib", "source": "qwen25c3b_micro_round11_kto", "weakness": "regex-named-capture", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `NamedCapture.user/1`.\n\nExtract a lowercase username after an `@` from a string with a named regular\nexpression capture. Return the captured username as a string, or `:error` if\nthere is no match.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule NamedCapture do\n @spec user(String.t()) :: String.t() | :error\n def user(text) when is_binary(text) do\n case Regex.run(~r/@(?<user>[a-z][a-z0-9_]*)/, text) do\n [value, _username] -> value\n nil -> :error\n end\n end\nend\n```"}], "label": false}
33
+ {"id": "round11.qwen25c3b.stdlib.date_delta.chosen", "family": "stdlib", "source": "qwen25c3b_micro_round11_kto", "weakness": "date-diff-direction", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `DateDelta.days/2`.\n\nReturn the signed number of calendar days from the first `Date` to the second\n`Date`, using the standard library. The result must be negative when the\nsecond date is earlier.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule DateDelta do\n @spec days(Date.t(), Date.t()) :: integer()\n def days(first, second) do\n Date.diff(second, first)\n end\nend\n```"}], "label": true}
34
+ {"id": "round11.qwen25c3b.stdlib.date_delta.rejected", "family": "stdlib", "source": "qwen25c3b_micro_round11_kto", "weakness": "date-diff-direction", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"role": "user", "content": "Write `DateDelta.days/2`.\n\nReturn the signed number of calendar days from the first `Date` to the second\n`Date`, using the standard library. The result must be negative when the\nsecond date is earlier.\n\nReply with a single ```elixir fence containing only the requested module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule DateDelta do\n @spec days(Date.t(), Date.t()) :: non_neg_integer()\n def days(first, second) do\n abs(Date.diff(first, second))\n end\nend\n```"}], "label": false}
data/onpolicy/qwen25c3b_micro_round13_dpo.jsonl ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.abstractions.contract_call", "family": "abstractions", "source": "qwen25c3b_micro_round13_dpo", "weakness": "behaviour-contract-arity", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `ContractCall.call/2` and declare its callback.\n\nDeclare `c:render/1` as a callback returning a term, then call that callback\non a provider module passed as the first argument. The call must pass the\nvalue as exactly one argument and return the provider result.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule ContractCall do\n @callback render(term()) :: term()\n\n @spec call(module(), term()) :: term()\n def call(provider, value) when is_atom(provider), do: provider.render(value)\nend\n```", "rejected": "```elixir\ndefmodule ContractCall do\n @callback render(term()) :: term()\n\n @spec call(module(), term()) :: term()\n def call(provider, _value) when is_atom(provider), do: provider.render(:ignored)\nend\n```"}
2
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.abstractions.optional_callback", "family": "abstractions", "source": "qwen25c3b_micro_round13_dpo", "weakness": "optional-callback-default", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `OptionalLabel.label/2`.\n\nCall `provider.label/1` when the provider module exports that one-argument\nfunction; otherwise return the supplied fallback. Check exports without\nraising and preserve the value passed to the provider.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule OptionalLabel do\n @spec label(module(), term()) :: term()\n def label(provider, fallback) when is_atom(provider) do\n if function_exported?(provider, :label, 1) do\n provider.label(fallback)\n else\n fallback\n end\n end\nend\n```", "rejected": "```elixir\ndefmodule OptionalLabel do\n @spec label(module(), term()) :: term()\n def label(provider, fallback) when is_atom(provider) do\n if function_exported?(provider, :label, 0) do\n provider.label()\n else\n fallback\n end\n end\nend\n```"}
3
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.beam.ets_fetch", "family": "beam", "source": "qwen25c3b_micro_round13_dpo", "weakness": "ets-tagged-lookup", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `EtsFetch.open/0`, `EtsFetch.put/3`, and `EtsFetch.get/2`.\n\nUse an ETS set. `open/0` creates and returns a private table; `put/3` stores a\nkey/value pair and returns `:ok`; `get/2` returns `{:ok, value}` for an\nexisting key and `:error` for a missing key without raising.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule EtsFetch do\n @spec open() :: :ets.tid()\n def open, do: :ets.new(:ets_fetch_table, [:set, :private])\n\n @spec put(:ets.tid(), term(), term()) :: :ok\n def put(table, key, value) do\n true = :ets.insert(table, {key, value})\n :ok\n end\n\n @spec get(:ets.tid(), term()) :: {:ok, term()} | :error\n def get(table, key) do\n case :ets.lookup(table, key) do\n [{^key, value}] -> {:ok, value}\n [] -> :error\n end\n end\nend\n```", "rejected": "```elixir\ndefmodule EtsFetch do\n @spec open() :: :ets.tid()\n def open, do: :ets.new(:ets_fetch_table, [:set, :private])\n\n @spec put(:ets.tid(), term(), term()) :: :ok\n def put(table, key, value) do\n true = :ets.insert(table, {key, value})\n :ok\n end\n\n @spec get(:ets.tid(), term()) :: {:ok, term()} | :error\n def get(table, key), do: {:ok, :ets.lookup_element(table, key, 2)}\nend\n```"}
4
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.beam.ref_timer", "family": "beam", "source": "qwen25c3b_micro_round13_dpo", "weakness": "process-timer-reference", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `RefTimer.schedule/3`.\n\nSchedule the supplied message to a pid after a non-negative millisecond delay\nwith `Process.send_after/3`, and return the timer reference. Require a pid,\ninteger delay, and any message.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule RefTimer do\n @spec schedule(pid(), non_neg_integer(), term()) :: reference()\n def schedule(pid, delay, message) when is_pid(pid) and is_integer(delay) and delay >= 0 do\n Process.send_after(pid, message, delay)\n end\nend\n```", "rejected": "```elixir\ndefmodule RefTimer do\n @spec schedule(pid(), non_neg_integer(), term()) :: reference()\n def schedule(pid, delay, message) when is_pid(pid) and is_integer(delay) and delay >= 0 do\n send(pid, message)\n end\nend\n```"}
5
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.binaries.big_frame", "family": "binaries", "source": "qwen25c3b_micro_round13_dpo", "weakness": "exact-big-endian-frame", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `BigFrame.pack/2` and `BigFrame.unpack/1`.\n\nPack a one-byte tag, a 16-bit unsigned big-endian payload length, and the\npayload. Unpack only an exact frame: a short header, short payload, or\ntrailing bytes must return `:error`.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule BigFrame do\n @spec pack(byte(), binary()) :: binary()\n def pack(tag, payload) when is_integer(tag) and is_binary(payload) do\n <<tag, byte_size(payload)::unsigned-big-integer-size(16), payload::binary>>\n end\n\n @spec unpack(binary()) :: {:ok, byte(), binary()} | :error\n def unpack(<<tag, size::unsigned-big-integer-size(16), payload::binary>>) do\n if byte_size(payload) == size, do: {:ok, tag, payload}, else: :error\n end\n\n def unpack(_other), do: :error\nend\n```", "rejected": "```elixir\ndefmodule BigFrame do\n @spec pack(byte(), binary()) :: binary()\n def pack(tag, payload) when is_integer(tag) and is_binary(payload) do\n <<tag, byte_size(payload)::unsigned-big-integer-size(16), payload::binary>>\n end\n\n @spec unpack(binary()) :: {:ok, byte(), binary()} | :error\n def unpack(<<tag, size::unsigned-little-integer-size(16), payload::binary>>) do\n if byte_size(payload) >= size, do: {:ok, tag, binary_part(payload, 0, size)}, else: :error\n end\n\n def unpack(_other), do: :error\nend\n```"}
6
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.binaries.nibble_pair", "family": "binaries", "source": "qwen25c3b_micro_round13_dpo", "weakness": "sub-byte-bit-syntax", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `NibblePair.encode/2` and `NibblePair.decode/1`.\n\nEncode two integers from 0 through 15 into one byte, with the first integer\nin the high four bits and the second in the low four bits. Decode exactly one\nbyte into `{high, low}` and return `:error` for every other binary size.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule NibblePair do\n @spec encode(non_neg_integer(), non_neg_integer()) :: binary()\n def encode(high, low) when high in 0..15 and low in 0..15 do\n <<high::4, low::4>>\n end\n\n @spec decode(binary()) :: {:ok, {non_neg_integer(), non_neg_integer()}} | :error\n def decode(<<high::4, low::4>>), do: {:ok, {high, low}}\n def decode(_other), do: :error\nend\n```", "rejected": "```elixir\ndefmodule NibblePair do\n @spec encode(non_neg_integer(), non_neg_integer()) :: binary()\n def encode(high, low) when high in 0..15 and low in 0..15, do: <<high, low>>\n\n @spec decode(binary()) :: {:ok, {non_neg_integer(), non_neg_integer()}} | :error\n def decode(<<high, low>>), do: {:ok, {high, low}}\n def decode(_other), do: :error\nend\n```"}
7
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.collections.partition_order", "family": "collections", "source": "qwen25c3b_micro_round13_dpo", "weakness": "reduce-order-preservation", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `PartitionOrder.split/2`.\n\nPartition a list into `%{keep: list, skip: list}` according to a one-argument\npredicate. Preserve the original order in both lists and use an immutable\nreduce accumulator.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule PartitionOrder do\n @spec split([term()], (term() -> boolean())) :: %{keep: [term()], skip: [term()]}\n def split(values, predicate) when is_list(values) and is_function(predicate, 1) do\n {keep, skip} =\n Enum.reduce(values, {[], []}, fn value, {keep, skip} ->\n if predicate.(value) do\n {[value | keep], skip}\n else\n {keep, [value | skip]}\n end\n end)\n\n %{keep: Enum.reverse(keep), skip: Enum.reverse(skip)}\n end\nend\n```", "rejected": "```elixir\ndefmodule PartitionOrder do\n @spec split([term()], (term() -> boolean())) :: %{keep: [term()], skip: [term()]}\n def split(values, predicate) when is_list(values) and is_function(predicate, 1) do\n Enum.reduce(values, %{keep: [], skip: []}, fn value, result ->\n key = if predicate.(value), do: :keep, else: :skip\n Map.update!(result, key, &[value | &1])\n end)\n end\nend\n```"}
8
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.collections.reduce_summary", "family": "collections", "source": "qwen25c3b_micro_round13_dpo", "weakness": "reduce-nil-maximum", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `ReduceSummary.run/1`.\n\nFor a list of integers, return `{sum, maximum}` using one `Enum.reduce/3`.\nThe maximum is `nil` for an empty list, and negative values must remain\nnegative rather than being compared with a zero sentinel.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule ReduceSummary do\n @spec run([integer()]) :: {integer(), integer() | nil}\n def run(values) when is_list(values) do\n Enum.reduce(values, {0, nil}, fn value, {sum, maximum} ->\n next_maximum =\n if is_nil(maximum) or value > maximum do\n value\n else\n maximum\n end\n\n {sum + value, next_maximum}\n end)\n end\nend\n```", "rejected": "```elixir\ndefmodule ReduceSummary do\n @spec run([integer()]) :: {integer(), integer() | nil}\n def run(values) when is_list(values) do\n Enum.reduce(values, {0, 0}, fn value, {sum, maximum} ->\n {sum + value, max(maximum, value)}\n end)\n end\nend\n```"}
9
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.core.guard_window", "family": "core", "source": "qwen25c3b_micro_round13_dpo", "weakness": "inclusive-guard-boundary", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `GuardWindow.inside?/3`.\n\nReturn `true` when an integer value is between the integer lower and upper\nbounds, inclusive. Return `false` for a value outside the interval. Express\nthe contract with a guard and handle an invalid interval as `false`.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule GuardWindow do\n @spec inside?(integer(), integer(), integer()) :: boolean()\n def inside?(value, lower, upper)\n when is_integer(value) and is_integer(lower) and is_integer(upper) and lower <= upper,\n do: value >= lower and value <= upper\n\n def inside?(_value, _lower, _upper), do: false\nend\n```", "rejected": "```elixir\ndefmodule GuardWindow do\n @spec inside?(integer(), integer(), integer()) :: boolean()\n def inside?(value, lower, upper) when is_integer(value) and is_integer(lower) and is_integer(upper),\n do: value > lower and value < upper\n\n def inside?(_value, _lower, _upper), do: false\nend\n```"}
10
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.core.head_or_fallback", "family": "core", "source": "qwen25c3b_micro_round13_dpo", "weakness": "pattern-match-empty-case", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `HeadFallback.first/2`.\n\nReturn the first element of a non-empty list, or the supplied fallback for an\nempty list. Use function clauses and keep the fallback term unchanged.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule HeadFallback do\n @spec first([term()], term()) :: term()\n def first([head | _tail], _fallback), do: head\n def first([], fallback), do: fallback\nend\n```", "rejected": "```elixir\ndefmodule HeadFallback do\n @spec first([term()], term()) :: term()\n def first(values, _fallback), do: Enum.at(values, 0, nil)\nend\n```"}
11
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.errors.rescue_cleanup", "family": "errors", "source": "qwen25c3b_micro_round13_dpo", "weakness": "rescue-and-after", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `RescueCleanup.run/2`.\n\nCall a zero-arity `work` function. Return `{:ok, value}` on success, convert a\n`RuntimeError` into `{:error, message}`, and always call the zero-arity\n`cleanup` function. Do not swallow other exception types.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule RescueCleanup do\n @spec run((() -> term()), (() -> term())) :: {:ok, term()} | {:error, String.t()}\n def run(work, cleanup) when is_function(work, 0) and is_function(cleanup, 0) do\n try do\n {:ok, work.()}\n rescue\n error in RuntimeError -> {:error, Exception.message(error)}\n after\n cleanup.()\n end\n end\nend\n```", "rejected": "```elixir\ndefmodule RescueCleanup do\n @spec run((() -> term()), (() -> term())) :: {:ok, term()} | {:error, String.t()}\n def run(work, cleanup) when is_function(work, 0) and is_function(cleanup, 0) do\n try do\n result = {:ok, work.()}\n cleanup.()\n result\n rescue\n error in RuntimeError -> {:error, Exception.message(error)}\n end\n end\nend\n```"}
12
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.errors.strict_number", "family": "errors", "source": "qwen25c3b_micro_round13_dpo", "weakness": "tagged-strict-parse", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `StrictNumber.parse/1`.\n\nReturn `{:ok, integer}` only when `Integer.parse/1` consumes the complete\nstring. Return `{:error, :invalid}` for an empty string, partial number, or\nnon-number without raising. Use a tagged `with` expression.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule StrictNumber do\n @spec parse(String.t()) :: {:ok, integer()} | {:error, :invalid}\n def parse(text) when is_binary(text) do\n with {value, \"\"} <- Integer.parse(text) do\n {:ok, value}\n else\n _ -> {:error, :invalid}\n end\n end\nend\n```", "rejected": "```elixir\ndefmodule StrictNumber do\n @spec parse(String.t()) :: {:ok, integer()} | {:error, :invalid}\n def parse(text) when is_binary(text), do: {:ok, String.to_integer(text)}\nend\n```"}
13
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.otp.mailbox", "family": "otp", "source": "qwen25c3b_micro_round13_dpo", "weakness": "genserver-call-state", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `Mailbox.start_link/1`, `Mailbox.push/2`, and `Mailbox.drain/1`.\n\nUse a GenServer whose state is a list. `push/2` must synchronously prepend a\nvalue and return `:ok`; `drain/1` must synchronously return values in insertion\norder and reset the state to an empty list. Both calls must pass an explicit\nmodule timeout.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule Mailbox do\n use GenServer\n\n @timeout 1_000\n\n @spec start_link(term()) :: GenServer.on_start()\n def start_link(initial), do: GenServer.start_link(__MODULE__, [initial])\n\n @spec push(pid(), term()) :: :ok\n def push(pid, value), do: GenServer.call(pid, {:push, value}, @timeout)\n\n @spec drain(pid()) :: [term()]\n def drain(pid), do: GenServer.call(pid, :drain, @timeout)\n\n @impl true\n def init(values), do: {:ok, values}\n\n @impl true\n def handle_call({:push, value}, _from, state), do: {:reply, :ok, [value | state]}\n\n @impl true\n def handle_call(:drain, _from, state), do: {:reply, Enum.reverse(state), []}\nend\n```", "rejected": "```elixir\ndefmodule Mailbox do\n use GenServer\n\n @timeout 1_000\n\n def start_link(initial), do: GenServer.start_link(__MODULE__, [initial])\n def push(pid, value), do: GenServer.cast(pid, {:push, value})\n def drain(pid), do: GenServer.call(pid, :drain, @timeout)\n\n @impl true\n def init(values), do: {:ok, values}\n\n @impl true\n def handle_cast({:push, value}, state), do: {:noreply, [value | state]}\n\n @impl true\n def handle_call(:drain, _from, state), do: {:reply, state, []}\nend\n```"}
14
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.otp.supervised_map", "family": "otp", "source": "qwen25c3b_micro_round13_dpo", "weakness": "supervised-task-await", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `SupervisedMap.run/3`.\n\nRun a one-argument function for each value using\n`Task.Supervisor.async_nolink/2`. Await every task with an explicit timeout of\n1_000 milliseconds and return results in input order. Require a supervisor pid\nand a one-argument function.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule SupervisedMap do\n @timeout 1_000\n\n @spec run(pid(), [term()], (term() -> term())) :: [term()]\n def run(supervisor, values, function)\n when is_pid(supervisor) and is_list(values) and is_function(function, 1) do\n values\n |> Enum.map(fn value -> Task.Supervisor.async_nolink(supervisor, fn -> function.(value) end) end)\n |> Enum.map(&Task.await(&1, @timeout))\n end\nend\n```", "rejected": "```elixir\ndefmodule SupervisedMap do\n @timeout 1_000\n\n @spec run(pid(), [term()], (term() -> term())) :: [term()]\n def run(supervisor, values, function)\n when is_pid(supervisor) and is_list(values) and is_function(function, 1) do\n values\n |> Enum.reverse()\n |> Enum.map(fn value -> Task.async(fn -> function.(value) end) end)\n |> Enum.map(&Task.await(&1, @timeout))\n end\nend\n```"}
15
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.stdlib.date_delta", "family": "stdlib", "source": "qwen25c3b_micro_round13_dpo", "weakness": "date-diff-direction", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `DateDelta.days/2`.\n\nReturn the signed number of calendar days from the first `Date` to the second\n`Date`, using the standard library. The result must be negative when the\nsecond date is earlier.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule DateDelta do\n @spec days(Date.t(), Date.t()) :: integer()\n def days(first, second) do\n Date.diff(second, first)\n end\nend\n```", "rejected": "```elixir\ndefmodule DateDelta do\n @spec days(Date.t(), Date.t()) :: non_neg_integer()\n def days(first, second) do\n abs(Date.diff(first, second))\n end\nend\n```"}
16
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.stdlib.named_capture", "family": "stdlib", "source": "qwen25c3b_micro_round13_dpo", "weakness": "regex-named-capture", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `NamedCapture.user/1`.\n\nExtract a lowercase username after an `@` from a string with a named regular\nexpression capture. Return the captured username as a string, or `:error` if\nthere is no match.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule NamedCapture do\n @spec user(String.t()) :: String.t() | :error\n def user(text) when is_binary(text) do\n case Regex.named_captures(~r/@(?<user>[a-z][a-z0-9_]*)/, text) do\n %{\"user\" => value} -> value\n nil -> :error\n end\n end\nend\n```", "rejected": "```elixir\ndefmodule NamedCapture do\n @spec user(String.t()) :: String.t() | :error\n def user(text) when is_binary(text) do\n case Regex.run(~r/@(?<user>[a-z][a-z0-9_]*)/, text) do\n [value, _username] -> value\n nil -> :error\n end\n end\nend\n```"}
17
+ {"id": "round13.qwen25c3b.round11.qwen25c3b.stdlib.query_map", "family": "stdlib", "source": "qwen25c3b_micro_round13_dpo", "weakness": "uri-query-decoding", "origin": "fresh-authored-round11-repacked", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "conversations": [{"from": "system", "value": "You are a coding assistant. Write correct, idiomatic Elixir using the standard library and OTP when appropriate."}, {"from": "user", "value": "Write `QueryMap.decode/1`.\n\nDecode a URI query string into a map using the standard library. For example,\n`\"name=Ada&role=admin\"` becomes `%{\"name\" => \"Ada\", \"role\" => \"admin\"}`.\nAn empty query must return an empty map.\n\nReply with a single ```elixir fence containing only the requested module."}], "chosen": "```elixir\ndefmodule QueryMap do\n @spec decode(String.t()) :: map()\n def decode(query) when is_binary(query), do: URI.decode_query(query)\nend\n```", "rejected": "```elixir\ndefmodule QueryMap do\n @spec decode(String.t()) :: map()\n def decode(query) when is_binary(query), do: URI.parse(query)\nend\n```"}
data/onpolicy/qwen25c3b_micro_round2_dpo.jsonl ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"id": "round2.qwen25c3b.dpo.abstractions.facade.enum-state", "family": "abstractions", "source": "qwen25c3b_micro_round2_dpo", "weakness": "enum-state", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `Facade` with:\n\n`InnerMath` holds `double/1` and `triple/1` (integer guards). `Facade`\nexposes both via `defdelegate/2`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule InnerMath do\n def double(n) when is_integer(n), do: n * 2\n def triple(n) when is_integer(n), do: n * 3\nend\n\ndefmodule Facade do\n defdelegate double(n), to: InnerMath\n defdelegate triple(n), to: InnerMath, as: :triple\nend\n```", "rejected": "```elixir\ndefmodule Facade do\n defdelegate double(n), to: InnerMath\n defdelegate triple(n), to: InnerMath, as: :double\nend\n```"}
2
+ {"id": "round2.qwen25c3b.dpo.abstractions.overridable.v2.enum-state", "family": "abstractions", "source": "qwen25c3b_micro_round2_dpo", "weakness": "enum-state", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `StepRunner02` with:\n\nModule `StepRunner02` provides a `__using__/1` macro that injects a default\n`step/1` (`value + 1`) and marks it `defoverridable`. `StepDemo` does\n`use StepRunner02` and overrides `step/1` to return `super(value) * 10`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule StepRunner02 do\n defmacro __using__(_) do\n quote do\n def step(value), do: value + 1\n\n defoverridable step: 1\n end\n end\nend\n\ndefmodule StepDemo do\n use StepRunner02\n\n @doc \"Doubly-stepped: default result times ten.\"\n def step(value), do: super(value) * 10\nend\n```", "rejected": "```elixir\ndefmodule StepDemo do\n use StepRunner02\n\n @doc \"Doubly-stepped: default result times ten.\"\n def step(value), do: super(value * 10)\nend\n```"}
3
+ {"id": "round2.qwen25c3b.dpo.core.tuplerotate.v3.enum-state", "family": "core", "source": "qwen25c3b_micro_round2_dpo", "weakness": "enum-state", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `TupleSpin03` with:\n\n@spec left(tuple()) :: tuple()\n def left(tuple)\n\n @spec right(tuple()) :: tuple()\n def right(tuple)\n\nRotate tuples of size >= 2: `left` moves the first element to the end,\n`right` moves the last element to the front.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule TupleSpin03 do\n @spec left(tuple()) :: tuple()\n def left(tuple) when tuple_size(tuple) >= 2 do\n list = Tuple.to_list(tuple)\n [first | rest] = list\n List.to_tuple(rest ++ [first])\n end\n\n @spec right(tuple()) :: tuple()\n def right(tuple) when tuple_size(tuple) >= 2 do\n list = Tuple.to_list(tuple)\n {last, front} = List.pop_at(list, -1)\n List.to_tuple([last | front])\n end\nend\n```", "rejected": "```elixir\ndefmodule TupleSpin03 do\n @spec left(tuple()) :: tuple()\n def left(tuple) when tuple_size(tuple) >= 2 do\n list = Tuple.to_list(tuple)\n [first | rest] = list\n List.to_tuple([List.last(rest) | List.delete(rest, List.last(rest))] ) |> then(fn t -> t end)\n end\n\n @spec right(tuple()) :: tuple()\n def right(tuple) when tuple_size(tuple) >= 2 do\n list = Tuple.to_list(tuple)\n {last, front} = List.pop_at(list, -1)\n List.to_tuple([last | front])\n end\nend\n```"}
4
+ {"id": "round2.qwen25c3b.dpo.core.poppath.v2.edge-empty", "family": "core", "source": "qwen25c3b_micro_round2_dpo", "weakness": "edge-empty", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `PopPath02` with:\n\n@spec pop(map(), [term()]) :: {term() | nil, map()}\n def pop(map, path)\n\nRemove the value at a nested path and return `{value, updated_map}`. Missing\npaths and empty paths give `{nil, original_map}`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule PopPath02 do\n @spec pop(map(), [term()]) :: {term() | nil, map()}\n def pop(map, []), do: {nil, map}\n\n def pop(map, path) when is_map(map) and is_list(path) do\n case do_pop(map, path) do\n {:ok, value, updated} -> {value, updated}\n :missing -> {nil, map}\n end\n end\n\n defp do_pop(map, [key]) do\n case Map.fetch(map, key) do\n {:ok, value} -> {:ok, value, Map.delete(map, key)}\n :error -> :missing\n end\n end\n\n defp do_pop(map, [key | rest]) do\n case Map.fetch(map, key) do\n {:ok, child} when is_map(child) ->\n case do_pop(child, rest) do\n {:ok, value, updated_child} -> {:ok, value, Map.put(map, key, updated_child)}\n :missing -> :missing\n end\n\n _other -> :missing\n end\n end\nend\n```", "rejected": "```elixir\ndefmodule PopPath02 do\n @spec pop(map(), [term()]) :: {term() | nil, map()}\n def pop(map, path) when is_map(map) and is_list(path) do\n case do_pop(map, path) do\n {:ok, value, updated} -> {value, updated}\n :missing -> {nil, map}\n end\n end\n\n defp do_pop(map, [key]) do\n case Map.fetch(map, key) do\n {:ok, value} -> {:ok, value, Map.delete(map, key)}\n :error -> :missing\n end\n end\n\n defp do_pop(map, [key | rest]) do\n case Map.fetch(map, key) do\n {:ok, child} when is_map(child) ->\n case do_pop(child, rest) do\n {:ok, value, updated_child} -> {:ok, value, Map.put(map, key, updated_child)}\n :missing -> :missing\n end\n\n _other -> :missing\n end\n end\nend\n```"}
5
+ {"id": "round2.qwen25c3b.dpo.collections.firstrerun.v3.edge-empty", "family": "collections", "source": "qwen25c3b_micro_round2_dpo", "weakness": "edge-empty", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `FirstRerun03` with:\n\n@spec first_repeat([term()]) :: {non_neg_integer(), non_neg_integer()} | :none\n def first_repeat(items)\n\nIndices `{first, second}` of the earliest repeated value (by first occurrence).\n`:none` when every value is unique.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule FirstRerun03 do\n @spec first_repeat([term()]) :: {non_neg_integer(), non_neg_integer()} | :none\n def first_repeat(items) when is_list(items) do\n items\n |> Enum.with_index()\n |> Enum.reduce_while(%{}, fn {item, idx}, seen ->\n case seen do\n %{^item => first_idx} -> {:halt, {first_idx, idx}}\n _map -> {:cont, Map.put(seen, item, idx)}\n end\n end)\n |> case do\n %{} = _unfinished -> :none\n pair -> pair\n end\n end\nend\n```", "rejected": "```elixir\ndefmodule FirstRerun03 do\n @spec first_repeat([term()]) :: {non_neg_integer(), non_neg_integer()} | :none\n def first_repeat(items) when is_list(items) do\n items\n |> Enum.with_index()\n |> then(fn l -> if l == [], do: [{hd([]), 0}], else: l end)\n |> Enum.reduce_while(%{}, fn {item, idx}, seen ->\n case seen do\n %{^item => first_idx} -> {:halt, {first_idx, idx}}\n _map -> {:cont, Map.put(seen, item, idx)}\n end\n end)\n |> case do\n %{} = _unfinished -> :none\n pair -> pair\n end\n end\nend\n```"}
6
+ {"id": "round2.qwen25c3b.dpo.stdlib.bizdays.v3.edge-empty", "family": "stdlib", "source": "qwen25c3b_micro_round2_dpo", "weakness": "edge-empty", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `BizDays03` with:\n\n@spec next_biz(Date.t()) :: Date.t()\n def next_biz(date)\n\nThe next business day AFTER `date`: skip Saturdays and Sundays\n(`Date.day_of_week/1` returns 6 and 7).\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule BizDays03 do\n @spec next_biz(Date.t()) :: Date.t()\n def next_biz(date) when is_struct(date, Date) do\n date\n |> Date.add(1)\n |> advance_if_weekend()\n end\n\n defp advance_if_weekend(date) do\n case Date.day_of_week(date) do\n day when day > 5 -> date |> Date.add(8 - day) |> advance_if_weekend()\n _day -> date\n end\n end\nend\n```", "rejected": "```elixir\ndefmodule BizDays03 do\n @spec next_biz(Date.t()) :: Date.t()\n def next_biz(date) when is_struct(date, Date) do\nDate.add(date, 1)\n end\n\n defp advance_if_weekend(date) do\n case Date.day_of_week(date) do\n day when day > 5 -> date |> Date.add(8 - day) |> advance_if_weekend()\n _day -> date\n end\n end\nend\n```"}
7
+ {"id": "round2.qwen25c3b.dpo.errors.catchtag.v3.err-swallow", "family": "errors", "source": "qwen25c3b_micro_round2_dpo", "weakness": "err-swallow", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `CatchKind03` with:\n\n@spec run((-> term())) :: {:ok, term()} | {:error, term()}\n def run(fun)\n\nCall `fun`. Wrap normal returns as `{:ok, value}`, rescue `ArgumentError` as\n`{:error, {:argument, message}}`, and catch thrown terms as\n`{:error, {:thrown, value}}`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule CatchKind03 do\n @spec run((-> term())) :: {:ok, term()} | {:error, term()}\n def run(fun) when is_function(fun, 0) do\n {:ok, fun.()}\n rescue\n e in ArgumentError -> {:error, {:argument, Exception.message(e)}}\n catch\n :throw, value -> {:error, {:thrown, value}}\n end\nend\n```", "rejected": "```elixir\ndefmodule CatchKind03 do\n @spec run((-> term())) :: {:ok, term()} | {:error, term()}\n def run(fun) when is_function(fun, 0) do\n {:ok, fun.()}\n rescue\n _kind, _value -> {:error, :unknown}\n catch\n :throw, value -> {:error, {:thrown, value}}\n end\nend\n```"}
8
+ {"id": "round2.qwen25c3b.dpo.errors.mapresults.err-swallow", "family": "errors", "source": "qwen25c3b_micro_round2_dpo", "weakness": "err-swallow", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `MapResults` with:\n\n@spec run([{:ok, term()} | {:error, term()}]) :: {:ok, [term()]} | {:error, term()}\n def run(items)\n\nCollect ok values in order; return the FIRST error otherwise.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule MapResults do\n @spec run([{:ok, term()} | {:error, term()}]) ::\n {:ok, [term()]} | {:error, term()}\n def run(items) when is_list(items) do\n Enum.reduce_while(items, {:ok, []}, fn\n {:ok, value}, {:ok, acc} -> {:cont, {:ok, [value | acc]}}\n {:error, reason}, _acc -> {:halt, {:error, reason}}\n _other, acc -> {:cont, acc}\n end)\n |> case do\n {:ok, acc} -> {:ok, Enum.reverse(acc)}\n error -> error\n end\n end\nend\n```", "rejected": "```elixir\ndefmodule MapResults do\n @spec run([{:ok, term()} | {:error, term()}]) ::\n {:ok, [term()]} | {:error, term()}\n def run(items) when is_list(items) do\n Enum.reduce_while(items, {:ok, []}, fn\n {:ok, value}, {:ok, acc} -> {:cont, {:ok, [value | acc]}}\n {:error, _reason}, acc -> {:cont, acc}\n _other, acc -> {:cont, acc}\n end)\n |> case do\n {:ok, acc} -> {:ok, Enum.reverse(acc)}\n error -> error\n end\n end\nend\n```"}
9
+ {"id": "round2.qwen25c3b.dpo.binaries.mpxframe.v2.err-swallow", "family": "binaries", "source": "qwen25c3b_micro_round2_dpo", "weakness": "err-swallow", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `MpxFrame02` with:\n\n@spec encode(binary()) :: binary()\n def encode(payload)\n\n @spec decode(binary()) :: {:ok, binary()} | :error\n def decode(packet)\n\nLayout is magic `<<\"MPX1\">>`, version byte `1`, a one-byte payload\nlength, then the payload. Anything else is `:error`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule MpxFrame02 do\n @spec encode(binary()) :: binary()\n def encode(payload) when is_binary(payload) do\n <<\"MPX1\", 1, byte_size(payload), payload::binary>>\n end\n\n @spec decode(binary()) :: {:ok, binary()} | :error\n def decode(<<\"MPX1\", 1, len, rest::binary>>) do\n if byte_size(rest) == len, do: {:ok, rest}, else: :error\n end\n\n def decode(_other), do: :error\nend\n```", "rejected": "```elixir\ndefmodule MpxFrame02 do\n @spec encode(binary()) :: binary()\n def encode(payload) when is_binary(payload) do\n <<\"MPX1\", 1, byte_size(payload), payload::binary>>\n end\n\n @spec decode(binary()) :: {:ok, binary()} | :error\n def decode(<<_magic::binary-size(4), _version, len, rest::binary>>) do\n if byte_size(rest) == len, do: {:ok, rest}, else: :error\n end\n\n def decode(_other), do: :error\nend\n```"}
10
+ {"id": "round2.qwen25c3b.dpo.errors.safecleanup.v3.err-with-else", "family": "errors", "source": "qwen25c3b_micro_round2_dpo", "weakness": "err-with-else", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `SafeCleanup03` with:\n\n@spec run((-> term()), (-> :ok)) :: {:ok, term()} | {:error, String.t()}\n def run(fun, cleanup)\n\nCall `fun` inside `try`. Normal results become `{:ok, value}`, raised errors\nbecome `{:error, message}`. `cleanup` MUST run exactly once afterwards, on\nboth paths (`after`).\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule SafeCleanup03 do\n @spec run((-> term()), (-> :ok)) :: {:ok, term()} | {:error, String.t()}\n def run(fun, cleanup) when is_function(fun, 0) and is_function(cleanup, 0) do\n try do\n {:ok, fun.()}\n rescue\n e -> {:error, Exception.message(e)}\n after\n cleanup.()\n end\n end\nend\n```", "rejected": "```elixir\ndefmodule SafeCleanup03 do\n @spec run((-> term()), (-> :ok)) :: {:ok, term()} | {:error, String.t()}\n def run(fun, cleanup) when is_function(fun, 0) and is_function(cleanup, 0) do\n try do\n cleanup.()\n {:ok, fun.()}\n rescue\n e -> {:error, Exception.message(e)}\n end\n end\nend\n```"}
11
+ {"id": "round2.qwen25c3b.dpo.errors.gradeof.err-with-else", "family": "errors", "source": "qwen25c3b_micro_round2_dpo", "weakness": "err-with-else", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `GradeOf` with:\n\n@spec run(String.t()) :: {:ok, :low | :high} | {:error, :blank | :invalid}\n def run(text)\n\nTrim `text`. Blank input is `{:error, :blank}`. Whole integers below 50 are\n`{:ok, :low}`, from 50 up `{:ok, :high}`. Anything else is\n`{:error, :invalid}`. Use `with` and an `else` that tells the error cases\napart.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule GradeOf do\n @spec run(String.t()) :: {:ok, :low | :high} | {:error, :blank | :invalid}\n def run(text) when is_binary(text) do\n trimmed = String.trim(text)\n\n with :ok <- check(trimmed),\n {n, \"\"} <- Integer.parse(trimmed) do\n {:ok, grade(n)}\n else\n :blank -> {:error, :blank}\n :error -> {:error, :invalid}\n _other -> {:error, :invalid}\n end\n end\n\n defp check(\"\"), do: :blank\n defp check(_t), do: :ok\n\n defp grade(n) when n >= 50, do: :high\n defp grade(_n), do: :low\nend\n```", "rejected": "```elixir\ndefmodule GradeOf do\n @spec run(String.t()) :: {:ok, :low | :high} | {:error, :blank | :invalid}\n def run(text) when is_binary(text) do\n trimmed = String.trim(text)\n\n with :ok <- check(trimmed),\n {n, \"\"} <- Integer.parse(trimmed) do\n {:ok, grade(n)}\n else\n _other -> {:error, :blank}\n end\n end\n\n defp check(\"\"), do: :blank\n defp check(_t), do: :ok\n\n defp grade(n) when n >= 50, do: :high\n defp grade(_n), do: :low\nend\n```"}
12
+ {"id": "round2.qwen25c3b.dpo.binaries.lenboxle.v3.bin-size-guard", "family": "binaries", "source": "qwen25c3b_micro_round2_dpo", "weakness": "bin-size-guard", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `LenBoxLE03` with:\n\n@spec encode(binary()) :: binary()\n def encode(payload)\n\n @spec decode(binary()) :: {:ok, binary()} | :error\n def decode(packet)\n\nPrefix `payload` with its byte size as an unsigned-little 32-bit integer.\n`decode/1` succeeds only when the length matches the remaining bytes exactly.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule LenBoxLE03 do\n @spec encode(binary()) :: binary()\n def encode(payload) when is_binary(payload) do\n <<byte_size(payload)::unsigned-little-integer-size(32), payload::binary>>\n end\n\n @spec decode(binary()) :: {:ok, binary()} | :error\n def decode(<<len::unsigned-little-integer-size(32), rest::binary>>) do\n if byte_size(rest) == len, do: {:ok, rest}, else: :error\n end\n\n def decode(_other), do: :error\nend\n```", "rejected": "```elixir\ndefmodule LenBoxLE03 do\n @spec encode(binary()) :: binary()\n def encode(payload) when is_binary(payload) do\n <<byte_size(payload)::unsigned-little-integer-size(32), payload::binary>>\n end\n\n @spec decode(binary()) :: {:ok, binary()} | :error\n def decode(<<len::unsigned-little-integer-size(32), rest::binary>>) do\n if byte_size(rest) >= len, do: {:ok, binary_part(rest, 0, len)}, else: :error\n end\n\n def decode(_other), do: :error\nend\n```"}
13
+ {"id": "round2.qwen25c3b.dpo.binaries.lenbox.v3.bin-size-guard", "family": "binaries", "source": "qwen25c3b_micro_round2_dpo", "weakness": "bin-size-guard", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `LenBox03` with:\n\n@spec encode(binary()) :: binary()\n def encode(payload)\n\n @spec decode(binary()) :: {:ok, binary()} | :error\n def decode(packet)\n\nPrefix `payload` with its byte size as an unsigned-big 16-bit integer.\n`decode/1` succeeds only when the length matches the remaining bytes exactly.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule LenBox03 do\n @spec encode(binary()) :: binary()\n def encode(payload) when is_binary(payload) do\n <<byte_size(payload)::unsigned-big-integer-size(16), payload::binary>>\n end\n\n @spec decode(binary()) :: {:ok, binary()} | :error\n def decode(<<len::unsigned-big-integer-size(16), rest::binary>>) do\n if byte_size(rest) == len, do: {:ok, rest}, else: :error\n end\n\n def decode(_other), do: :error\nend\n```", "rejected": "```elixir\ndefmodule LenBox03 do\n @spec encode(binary()) :: binary()\n def encode(payload) when is_binary(payload) do\n <<byte_size(payload)::unsigned-big-integer-size(16), payload::binary>>\n end\n\n @spec decode(binary()) :: {:ok, binary()} | :error\n def decode(<<len::unsigned-big-integer-size(16), rest::binary>>) do\n if byte_size(rest) >= len, do: {:ok, binary_part(rest, 0, len)}, else: :error\n end\n\n def decode(_other), do: :error\nend\n```"}
14
+ {"id": "round2.qwen25c3b.dpo.binaries.bitflags.v2.bin-size-guard", "family": "binaries", "source": "qwen25c3b_micro_round2_dpo", "weakness": "bin-size-guard", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `BitFlags02` with:\n\n@spec pack([boolean()]) :: bitstring()\n def pack(flags)\n\n @spec unpack(bitstring()) :: [boolean()]\n def unpack(bits)\n\nOne bit per flag, FIRST flag in the MOST significant position of the\nbitstring. `unpack/1` inverts it exactly.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule BitFlags02 do\n @spec pack([boolean()]) :: bitstring()\n def pack(flags) when is_list(flags) do\n for flag <- flags, into: <<>>, do: <<if(flag, do: 1, else: 0)::size(1)>>\n end\n\n @spec unpack(bitstring()) :: [boolean()]\n def unpack(bits) when is_bitstring(bits) do\n for <<bit::size(1) <- bits>>, do: bit == 1\n end\nend\n```", "rejected": "```elixir\ndefmodule BitFlags02 do\n @spec pack([boolean()]) :: bitstring()\n def pack(flags) when is_list(flags) do\n for flag <- flags, into: <<>>, do: <<if(flag, do: 1, else: 0)::size(1)>>\n end\n\n @spec unpack(bitstring()) :: [boolean()]\n def unpack(bits) when is_bitstring(bits) do\n for <<byte::8 <- bits>>, byte != 0, do: true\n end\nend\n```"}
15
+ {"id": "round2.qwen25c3b.dpo.otp.asyncuniqcount.fn-guard", "family": "otp", "source": "qwen25c3b_micro_round2_dpo", "weakness": "fn-guard", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `AsyncUniqCount` with:\n\n@spec run(list()) :: term()\n def run(list)\n\nCompute the number of unique elements inside `Task.async`. Await with timeout `5_000` and return the\nresult. Do not use `spawn`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule AsyncUniqCount do\n @spec run(list()) :: term()\n def run(list) when is_list(list) do\n task = Task.async(fn -> list |> Enum.uniq() |> length() end)\n Task.await(task, 5_000)\n end\nend\n```", "rejected": "```elixir\ndefmodule AsyncUniqCount do\n @spec run(list()) :: term()\n def run(list) when is_list(list) do\n task = Task.async(fn list when is_list(list) -> list |> Enum.uniq() |> length() end)\n Task.await(task, 5_000)\n end\nend\n```"}
16
+ {"id": "round2.qwen25c3b.dpo.beam.appflag.persistent-term", "family": "beam", "source": "qwen25c3b_micro_round2_dpo", "weakness": "persistent-term", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `AppFlag` with:\n\n@spec put(term()) :: :ok\n def put(value)\n\n @spec get() :: {:ok, term()} | :unset\n def get()\n\n @spec erase() :: :ok\n def erase()\n\nGlobal flag in `:persistent_term` under a module-specific key. Before any\n`put/1`, `get/0` is `:unset`; after `erase/0` it is `:unset` again.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule AppFlag do\n @key {__MODULE__, :flag}\n\n @spec put(term()) :: :ok\n def put(value) do\n :persistent_term.put(@key, value)\n :ok\n end\n\n @spec get() :: {:ok, term()} | :unset\n def get do\n case :persistent_term.get(@key, :unset) do\n :unset -> :unset\n value -> {:ok, value}\n end\n end\n\n @spec erase() :: :ok\n def erase do\n :persistent_term.erase(@key)\n :ok\n end\nend\n```", "rejected": "```elixir\ndefmodule AppFlag do\n @key {__MODULE__, :flag}\n\n @spec put(term()) :: :ok\n def put(value) do\n :persistent_term.put(@key, value)\n :ok\n end\n\n @spec get() :: {:ok, term()} | :unset\n def get do\n case :persistent_term.get(@key) do\n {:ok, value} -> {:ok, value}\n :error -> :unset\n end\n end\n\n @spec erase() :: :ok\n def erase do\n :persistent_term.erase(@key)\n :ok\n end\nend\n```"}
17
+ {"id": "round2.qwen25c3b.dpo.otp.stampstore.v2.otp-cast-call", "family": "otp", "source": "qwen25c3b_micro_round2_dpo", "weakness": "otp-cast-call", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `StampStore02` with:\n\n@spec start_link() :: {:ok, pid()}\n def start_link()\n\n @spec put(pid(), term(), term()) :: :ok\n def put(pid, key, value)\n\n @spec get(pid(), term()) :: {:ok, term()} | :error\n def get(pid, key)\n\n @spec keys(pid()) :: [term()]\n def keys(pid)\n\nGenServer map that stamps each write with `System.monotonic_time/0` internally.\nCalls use timeout `5_000`. Unknown keys read as `:error`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule StampStore02 do\n use GenServer\n\n @timeout 5_000\n\n @spec start_link() :: {:ok, pid()}\n def start_link, do: GenServer.start_link(__MODULE__, %{})\n\n @spec put(pid(), term(), term()) :: :ok\n def put(pid, key, value), do: GenServer.call(pid, {:put, key, value}, @timeout)\n\n @spec get(pid(), term()) :: {:ok, term()} | :error\n def get(pid, key), do: GenServer.call(pid, {:get, key}, @timeout)\n\n @spec keys(pid()) :: [term()]\n def keys(pid), do: GenServer.call(pid, :keys, @timeout)\n\n @impl true\n def init(state), do: {:ok, state}\n\n @impl true\n def handle_call({:put, key, value}, _from, state) do\n {:reply, :ok, Map.put(state, key, {System.monotonic_time(), value})}\n end\n\n def handle_call({:get, key}, _from, state) do\n case Map.get(state, key) do\n nil -> {:reply, :error, state}\n {_ts, value} -> {:reply, {:ok, value}, state}\n end\n end\n\n def handle_call(:keys, _from, state), do: {:reply, Map.keys(state), state}\nend\n```", "rejected": "```elixir\ndefmodule StampStore02 do\n use GenServer\n\n @timeout 5_000\n\n @spec start_link() :: {:ok, pid()}\n def start_link, do: GenServer.start_link(__MODULE__, %{})\n\n @spec put(pid(), term(), term()) :: :ok\n def put(pid, key, value), do: GenServer.cast(pid, {:put, key, value})\n\n @spec get(pid(), term()) :: {:ok, term()} | :error\n def get(pid, key), do: GenServer.call(pid, {:get, key}, @timeout)\n\n @spec keys(pid()) :: [term()]\n def keys(pid), do: GenServer.call(pid, :keys, @timeout)\n\n @impl true\n def init(state), do: {:ok, state}\n\n @impl true\n def handle_cast({:put, key, value}, state) do\n {:noreply, Map.put(state, key, value)}\n end\n\n def handle_call({:get, key}, _from, state) do\n case Map.get(state, key) do\n nil -> {:reply, :error, state}\n {_ts, value} -> {:reply, {:ok, value}, state}\n end\n end\n\n def handle_call(:keys, _from, state), do: {:reply, Map.keys(state), state}\nend\n```"}
18
+ {"id": "round2.qwen25c3b.dpo.otp.rategate.otp-cast-call", "family": "otp", "source": "qwen25c3b_micro_round2_dpo", "weakness": "otp-cast-call", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `RateGate` with:\n\n@spec start_link() :: {:ok, pid()}\n def start_link()\n\n @spec pass?(pid()) :: boolean()\n def pass?(pid)\n\nOne-shot gate: the first `pass?/1` is `true`, every later one is `false`.\nEvery `GenServer.call` must pass timeout `5_000`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule RateGate do\n use GenServer\n\n @timeout 5_000\n\n @spec start_link() :: {:ok, pid()}\n def start_link, do: GenServer.start_link(__MODULE__, :ready)\n\n @spec pass?(pid()) :: boolean()\n def pass?(pid), do: GenServer.call(pid, :pass, @timeout)\n\n @impl true\n def init(state), do: {:ok, state}\n\n @impl true\n def handle_call(:pass, _from, :ready), do: {:reply, true, :spent}\n def handle_call(:pass, _from, :spent), do: {:reply, false, :spent}\nend\n```", "rejected": "```elixir\ndefmodule RateGate do\n use GenServer\n\n @timeout 5_000\n\n @spec start_link() :: {:ok, pid()}\n def start_link, do: GenServer.start_link(__MODULE__, :ready)\n\n @spec pass?(pid()) :: boolean()\n def pass?(pid) do\n GenServer.cast(pid, :pass)\n :ok\n end\n\n @impl true\n def init(state), do: {:ok, state}\n\n @impl true\n def handle_cast(:pass, :ready), do: {:noreply, :spent}\n def handle_cast(:pass, :spent), do: {:noreply, :spent}\nend\n```"}
19
+ {"id": "round2.qwen25c3b.dpo.otp.tapecell.otp-cast-call", "family": "otp", "source": "qwen25c3b_micro_round2_dpo", "weakness": "otp-cast-call", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `TapeCell` with:\n\n@spec start_link(term()) :: {:ok, pid()}\n def start_link(initial)\n\n @spec write(pid(), term()) :: term()\n def write(pid, value)\n\nAgent cell. `write/2` stores `value` and returns the PREVIOUS value.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule TapeCell do\n @spec start_link(term()) :: {:ok, pid()}\n def start_link(initial), do: Agent.start_link(fn -> initial end)\n\n @spec write(pid(), term()) :: term()\n def write(pid, value), do: Agent.get_and_update(pid, fn old -> {old, value} end)\nend\n```", "rejected": "```elixir\ndefmodule TapeCell do\n @spec start_link(term()) :: {:ok, pid()}\n def start_link(initial), do: Agent.start_link(fn -> initial end)\n\n @spec write(pid(), term()) :: term()\n def write(pid, value) do\n Agent.update(pid, fn _old -> value end)\n value\n end\nend\n```"}
20
+ {"id": "round2.qwen25c3b.dpo.otp.suprun.v3.otp-task-await", "family": "otp", "source": "qwen25c3b_micro_round2_dpo", "weakness": "otp-task-await", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `SupTaskRun03` with:\n\n@spec run((-> term())) :: term()\n def run(fun)\n\nStart an unnamed `Task.Supervisor`, run the zero-arity function with\n`Task.Supervisor.async_nolink/2`, await it with timeout `5_000`, stop the\nsupervisor, and return the function result.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule SupTaskRun03 do\n @spec run((-> term())) :: term()\n def run(fun) do\n {:ok, sup} = Task.Supervisor.start_link()\n task = Task.Supervisor.async_nolink(sup, fun)\n result = Task.await(task, 5_000)\n Supervisor.stop(sup)\n result\n end\nend\n```", "rejected": "```elixir\ndefmodule SupTaskRun03 do\n @spec run((-> term())) :: term()\n def run(fun) do\n {:ok, sup} = Task.Supervisor.start_link()\n task = Task.Supervisor.async_nolink(sup, fun)\n Supervisor.stop(sup)\n Task.await(task, 5_000)\n end\nend\n```"}
21
+ {"id": "round2.qwen25c3b.dpo.otp.stoplater.v3.otp-timeout", "family": "otp", "source": "qwen25c3b_micro_round2_dpo", "weakness": "otp-timeout", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `StopLater03` with:\n\n@spec start_link() :: {:ok, pid()}\n def start_link()\n\n @spec ping(pid()) :: :ok\n def ping(pid)\n\nGenServer that answers `ping/1` calls and STOPS normally when it receives\nthe `:stop` message via `handle_info/2`. Calls use timeout `5_000`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule StopLater03 do\n use GenServer\n\n @timeout 5_000\n\n @spec start_link() :: {:ok, pid()}\n def start_link, do: GenServer.start_link(__MODULE__, [])\n\n @spec ping(pid()) :: :ok\n def ping(pid), do: GenServer.call(pid, :ping, @timeout)\n\n @impl true\n def init(state), do: {:ok, state}\n\n @impl true\n def handle_call(:ping, _from, state), do: {:reply, :ok, state}\n\n @impl true\n def handle_info(:stop, state), do: {:stop, :normal, state}\nend\n```", "rejected": "```elixir\ndefmodule StopLater03 do\n use GenServer\n\n @spec start_link() :: {:ok, pid()}\n def start_link, do: GenServer.start_link(__MODULE__, [])\n\n @spec ping(pid()) :: :ok\n def ping(pid), do: GenServer.call(pid, :ping)\n\n @impl true\n def init(state), do: {:ok, state}\n\n @impl true\n def handle_call(:ping, _from, state), do: {:reply, :ok, state}\n\n @impl true\n def handle_info(:stop, state), do: {:stop, :normal, state}\nend\n```"}
22
+ {"id": "round2.qwen25c3b.dpo.beam.linktrap.otp-supervision", "family": "beam", "source": "qwen25c3b_micro_round2_dpo", "weakness": "otp-supervision", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `LinkTrap` with:\n\n@spec run((-> term())) :: {:ok, term()} | {:exit, term()}\n def run(fun)\n\nTrap exits, spawn_link a process that computes `fun.()` and sends the result\nback to the caller as `{:result, value}`. Return `{:ok, value}` once the\nlinked process exits normally, or `{:exit, reason}` when it dies before\nproducing a result. Guard every receive with `after 2_000`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule LinkTrap do\n @spec run((-> term())) :: {:ok, term()} | {:exit, term()}\n def run(fun) do\n previous = Process.flag(:trap_exit, true)\n\n try do\n parent = self()\n\n pid =\n spawn_link(fn ->\n send(parent, {:result, fun.()})\n end)\n\n receive do\n {:result, value} ->\n receive do\n {:EXIT, ^pid, _reason} -> {:ok, value}\n after\n 2_000 -> {:ok, value}\n end\n\n {:EXIT, ^pid, reason} -> {:exit, reason}\n after\n 2_000 ->\n Process.unlink(pid)\n Process.exit(pid, :kill)\n {:exit, :timeout}\n end\n after\n Process.flag(:trap_exit, previous)\n end\n end\nend\n```", "rejected": "```elixir\ndefmodule LinkTrap do\n @spec run((-> term())) :: {:ok, term()} | {:exit, term()}\n def run(fun) do\n Process.flag(:trap_exit, true)\n parent = self()\n\n spawn(fn ->\n send(parent, {:result, fun.()})\n end)\n\n receive do\n {:result, value} -> {:ok, value}\n {:EXIT, _pid, reason} -> {:exit, reason}\n after\n 2_000 -> {:exit, :timeout}\n end\n end\nend\n```"}
23
+ {"id": "round2.qwen25c3b.dpo.beam.atomicvec.v3.otp-supervision", "family": "beam", "source": "qwen25c3b_micro_round2_dpo", "weakness": "otp-supervision", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `AtomicVec03` with:\n\n@spec new(pos_integer()) :: :atomics.ref()\n def new(size)\n\n @spec bump(:atomics.ref(), pos_integer()) :: non_neg_integer()\n def bump(ref, idx)\n\n @spec read(:atomics.ref(), pos_integer()) :: non_neg_integer()\n def read(ref, idx)\n\nAn unsigned `:atomics` array of `size` counters (1-based index). `bump/2`\nincrements and returns the NEW value; `read/2` never mutates.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule AtomicVec03 do\n @spec new(pos_integer()) :: :atomics.ref()\n def new(size) when size > 0, do: :atomics.new(size, signed: false)\n\n @spec bump(:atomics.ref(), pos_integer()) :: non_neg_integer()\n def bump(ref, idx), do: :atomics.add_get(ref, idx, 1)\n\n @spec read(:atomics.ref(), pos_integer()) :: non_neg_integer()\n def read(ref, idx), do: :atomics.get(ref, idx)\nend\n```", "rejected": "```elixir\ndefmodule AtomicVec03 do\n @spec new(pos_integer()) :: :atomics.ref()\n def new(size) when size > 0 do\n {:ok, pid} = Agent.start_link(fn -> List.duplicate(0, size) end)\n pid\n end\n\n @spec bump(:atomics.ref(), pos_integer()) :: non_neg_integer()\n def bump(ref, idx) do\n Agent.get_and_update(ref, fn counts ->\n {Enum.at(counts, idx - 1) + 1, List.update_at(counts, idx - 1, &(&1 + 1))}\n end)\n end\n\n @spec read(:atomics.ref(), pos_integer()) :: non_neg_integer()\n def read(ref, idx), do: Agent.get(ref, &Enum.at(&1, idx - 1))\nend\n```"}
24
+ {"id": "round2.qwen25c3b.dpo.abstractions.areacalc.protocol-behaviour.1", "family": "abstractions", "source": "qwen25c3b_micro_round2_dpo", "weakness": "protocol-behaviour", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `AreaCalc` with:\n\nDefine protocol `AreaCalc` with `area/1`. Structs:\n\n- `Circle` with field `r` and `Circle.new/1`; area is `3 * r * r`\n- `Rect` with fields `w`, `h` and `Rect.new/2`; area is `w * h`\n\nImplement the protocol for both structs.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefprotocol AreaCalc do\n def area(shape)\nend\n\ndefmodule Circle do\n defstruct [:r]\n\n def new(r), do: %__MODULE__{r: r}\nend\n\ndefimpl AreaCalc, for: Circle do\n def area(%Circle{r: r}), do: 3 * r * r\nend\n\ndefmodule Rect do\n defstruct [:w, :h]\n\n def new(w, h), do: %__MODULE__{w: w, h: h}\nend\n\ndefimpl AreaCalc, for: Rect do\n def area(%Rect{w: w, h: h}), do: w * h\nend\n```", "rejected": "```elixir\ndefmodule Rect do\n def area(%__MODULE__{w: w, h: h}), do: w * h\n defstruct [:w, :h]\n\n def new(w, h), do: %__MODULE__{w: w, h: h}\nend\n```"}
25
+ {"id": "round2.qwen25c3b.dpo.stdlib.uribuild.stdlib-misuse", "family": "stdlib", "source": "qwen25c3b_micro_round2_dpo", "weakness": "stdlib-misuse", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `UriBuild` with:\n\n@spec query(map()) :: String.t()\n def query(params)\n\n @spec parse(String.t()) :: map()\n def parse(raw)\n\n`query/1` URL-encodes a map (keys sorted). `parse/1` decodes a query string\ninto a map.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule UriBuild do\n @spec query(map()) :: String.t()\n def query(params) when is_map(params) do\n params |> Enum.sort() |> URI.encode_query()\n end\n\n @spec parse(String.t()) :: map()\n def parse(raw) when is_binary(raw), do: URI.decode_query(raw)\nend\n```", "rejected": "```elixir\ndefmodule UriBuild do\n @spec query(map()) :: String.t()\n def query(params) when is_map(params) do\n params |> Enum.sort() |> Enum.map_join(\"&\", fn {k, v} -> \"#{k}=#{v}\" end)\n end\n\n @spec parse(String.t()) :: map()\n def parse(raw) when is_binary(raw), do: URI.decode_query(raw)\nend\n```"}
data/onpolicy/qwen25c3b_micro_round3_kto.jsonl ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"id": "round3.qwen25c3b.kto.otp.cast-callback.chosen", "family": "otp", "source": "qwen25c3b_micro_round3_kto", "weakness": "otp-cast-call", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpCastState` with:\n\nDefine a GenServer cast callback that handles `{:set, value}` as an\nasynchronous state update and returns `{:noreply, new_state}`.\nKeep the callback contract separate from the synchronous reply\ncontract of `handle_call/3`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpCastState do\n use GenServer\n\n @impl true\n def init(state), do: {:ok, state}\n\n @impl true\n def handle_cast({:set, value}, _state), do: {:noreply, value}\nend\n```"}], "label": true}
2
+ {"id": "round3.qwen25c3b.kto.otp.cast-callback.rejected", "family": "otp", "source": "qwen25c3b_micro_round3_kto", "weakness": "otp-cast-call", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpCastState` with:\n\nDefine a GenServer cast callback that handles `{:set, value}` as an\nasynchronous state update and returns `{:noreply, new_state}`.\nKeep the callback contract separate from the synchronous reply\ncontract of `handle_call/3`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpCastState do\n use GenServer\n\n @impl true\n def handle_call({:set, value}, _from, _state), do: {:reply, :ok, value}\nend\n```"}], "label": false}
3
+ {"id": "round3.qwen25c3b.kto.binary.exact-frame.chosen", "family": "binaries", "source": "qwen25c3b_micro_round3_kto", "weakness": "bin-size-guard", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinFrame` with:\n\nDefine `encode/1` and `decode/1` for an unsigned-big 16-bit\nlength-prefixed binary. Decode must return `{:ok, payload}` only\nwhen the remaining byte count exactly equals the prefix; short and\ntrailing packets return `:error`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinFrame do\n @spec encode(binary()) :: binary()\n def encode(payload) when is_binary(payload) and byte_size(payload) <= 65_535 do\n <<byte_size(payload)::unsigned-big-integer-size(16), payload::binary>>\n end\n\n @spec decode(binary()) :: {:ok, binary()} | :error\n def decode(<<length::unsigned-big-integer-size(16), rest::binary>>) do\n if byte_size(rest) == length, do: {:ok, rest}, else: :error\n end\n\n def decode(_other), do: :error\nend\n```"}], "label": true}
4
+ {"id": "round3.qwen25c3b.kto.binary.exact-frame.rejected", "family": "binaries", "source": "qwen25c3b_micro_round3_kto", "weakness": "bin-size-guard", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinFrame` with:\n\nDefine `encode/1` and `decode/1` for an unsigned-big 16-bit\nlength-prefixed binary. Decode must return `{:ok, payload}` only\nwhen the remaining byte count exactly equals the prefix; short and\ntrailing packets return `:error`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinFrame do\n @spec encode(binary()) :: binary()\n def encode(payload) when is_binary(payload) and byte_size(payload) <= 65_535 do\n <<byte_size(payload)::unsigned-big-integer-size(16), payload::binary>>\n end\n\n @spec decode(binary()) :: {:ok, binary()} | :error\n def decode(<<length::unsigned-big-integer-size(16), rest::binary>>) do\n if byte_size(rest) >= length, do: {:ok, binary_part(rest, 0, length)}, else: :error\n end\n\n def decode(_other), do: :error\nend\n```"}], "label": false}
5
+ {"id": "round3.qwen25c3b.kto.otp.task-supervised-await.chosen", "family": "otp", "source": "qwen25c3b_micro_round3_kto", "weakness": "otp-task-await", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpTaskRun` with:\n\nDefine `run/2` that accepts a `Task.Supervisor` pid and a zero-arity\nfunction. Start the work with `Task.Supervisor.async_nolink/2` and\nawait it with an explicit timeout of 1_000 milliseconds.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpTaskRun do\n @timeout 1_000\n\n @spec run(pid(), (() -> term())) :: term()\n def run(supervisor, fun) when is_pid(supervisor) and is_function(fun, 0) do\n task = Task.Supervisor.async_nolink(supervisor, fun)\n Task.await(task, @timeout)\n end\nend\n```"}], "label": true}
6
+ {"id": "round3.qwen25c3b.kto.otp.task-supervised-await.rejected", "family": "otp", "source": "qwen25c3b_micro_round3_kto", "weakness": "otp-task-await", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpTaskRun` with:\n\nDefine `run/2` that accepts a `Task.Supervisor` pid and a zero-arity\nfunction. Start the work with `Task.Supervisor.async_nolink/2` and\nawait it with an explicit timeout of 1_000 milliseconds.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpTaskRun do\n @spec run(pid(), (() -> term())) :: term()\n def run(supervisor, fun) when is_pid(supervisor) and is_function(fun, 0) do\n task = Task.Supervisor.async_nolink(supervisor, fun)\n Task.await(task)\n end\nend\n```"}], "label": false}
7
+ {"id": "round3.qwen25c3b.kto.otp.child-spec.chosen", "family": "otp", "source": "qwen25c3b_micro_round3_kto", "weakness": "otp-supervision", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpWorker` with:\n\nDefine `start_link/1` and an explicit `child_spec/1`. The child\nspecification must use this module's start function, id from the\noptions, `restart: :transient`, `shutdown: 1_000`, and `type: :worker`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpWorker do\n use GenServer\n\n @spec start_link(keyword()) :: GenServer.on_start()\n def start_link(options), do: GenServer.start_link(__MODULE__, options)\n\n @spec child_spec(keyword()) :: Supervisor.child_spec()\n def child_spec(options) do\n %{\n id: Keyword.fetch!(options, :id),\n start: {__MODULE__, :start_link, [options]},\n restart: :transient,\n shutdown: 1_000,\n type: :worker\n }\n end\n\n @impl true\n def init(options), do: {:ok, options}\nend\n```"}], "label": true}
8
+ {"id": "round3.qwen25c3b.kto.otp.child-spec.rejected", "family": "otp", "source": "qwen25c3b_micro_round3_kto", "weakness": "otp-supervision", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpWorker` with:\n\nDefine `start_link/1` and an explicit `child_spec/1`. The child\nspecification must use this module's start function, id from the\noptions, `restart: :transient`, `shutdown: 1_000`, and `type: :worker`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpWorker do\n use GenServer\n\n @spec start_link(keyword()) :: GenServer.on_start()\n def start_link(options), do: GenServer.start_link(__MODULE__, options)\n\n @spec child_spec(keyword()) :: Supervisor.child_spec()\n def child_spec(options) do\n %{\n id: Keyword.fetch!(options, :id),\n start: {__MODULE__, :start_link, [options]},\n restart: :permanent,\n shutdown: 5_000,\n type: :worker\n }\n end\n\n @impl true\n def init(options), do: {:ok, options}\nend\n```"}], "label": false}
9
+ {"id": "round3.qwen25c3b.kto.core.function-clause-guard.chosen", "family": "core", "source": "qwen25c3b_micro_round3_kto", "weakness": "fn-guard", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoCoreClassify` with:\n\nDefine `classify/1` with function clauses and guards: non-negative\nintegers return `:non_negative`, negative integers return\n`:negative`, and all other terms return `:other`. Keep type and\nrange checks in function heads rather than simulating a procedural\ndecision tree inside an anonymous function.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoCoreClassify do\n @spec classify(term()) :: :non_negative | :negative | :other\n def classify(value) when is_integer(value) and value >= 0, do: :non_negative\n def classify(value) when is_integer(value), do: :negative\n def classify(_value), do: :other\nend\n```"}], "label": true}
10
+ {"id": "round3.qwen25c3b.kto.core.function-clause-guard.rejected", "family": "core", "source": "qwen25c3b_micro_round3_kto", "weakness": "fn-guard", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoCoreClassify` with:\n\nDefine `classify/1` with function clauses and guards: non-negative\nintegers return `:non_negative`, negative integers return\n`:negative`, and all other terms return `:other`. Keep type and\nrange checks in function heads rather than simulating a procedural\ndecision tree inside an anonymous function.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoCoreClassify do\n @spec classify(term()) :: :non_negative | :negative | :other\n def classify(value) do\n if is_integer(value) do\n if value >= 0, do: :non_negative, else: :negative\n else\n :other\n end\n end\nend\n```"}], "label": false}
11
+ {"id": "round3.qwen25c3b.kto.protocol.explicit-implementation.chosen", "family": "protocol", "source": "qwen25c3b_micro_round3_kto", "weakness": "protocol-behaviour", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoRender` with:\n\nDefine a `KtoRenderable` protocol with `render/1`, implement it\nfor integers, and expose `KtoRender.render/1` as the delegating\npublic function. Use the protocol/implementation boundary instead\nof a type-checking conditional in the public module.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefprotocol KtoRenderable do\n @spec render(term()) :: String.t()\n def render(value)\nend\n\ndefimpl KtoRenderable, for: Integer do\n def render(value), do: Integer.to_string(value)\nend\n\ndefmodule KtoRender do\n @spec render(term()) :: String.t()\n def render(value), do: KtoRenderable.render(value)\nend\n```"}], "label": true}
12
+ {"id": "round3.qwen25c3b.kto.protocol.explicit-implementation.rejected", "family": "protocol", "source": "qwen25c3b_micro_round3_kto", "weakness": "protocol-behaviour", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoRender` with:\n\nDefine a `KtoRenderable` protocol with `render/1`, implement it\nfor integers, and expose `KtoRender.render/1` as the delegating\npublic function. Use the protocol/implementation boundary instead\nof a type-checking conditional in the public module.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoRender do\n @spec render(term()) :: String.t()\n def render(value) when is_integer(value), do: Integer.to_string(value)\nend\n```"}], "label": false}
13
+ {"id": "round3.qwen25c3b.kto.binary.explicit-bitwise.chosen", "family": "binaries", "source": "qwen25c3b_micro_round3_kto", "weakness": "bin-bitwise", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinFlags` with:\n\nDefine `toggle/2` that returns the bitwise XOR of two integers.\nCall the explicit `Bitwise.bxor/2` function rather than relying on\ndeprecated operators or arithmetic that happens to work for a\nnarrow sample.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinFlags do\n @spec toggle(non_neg_integer(), non_neg_integer()) :: non_neg_integer()\n def toggle(left, right) when is_integer(left) and is_integer(right) do\n Bitwise.bxor(left, right)\n end\nend\n```"}], "label": true}
14
+ {"id": "round3.qwen25c3b.kto.binary.explicit-bitwise.rejected", "family": "binaries", "source": "qwen25c3b_micro_round3_kto", "weakness": "bin-bitwise", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinFlags` with:\n\nDefine `toggle/2` that returns the bitwise XOR of two integers.\nCall the explicit `Bitwise.bxor/2` function rather than relying on\ndeprecated operators or arithmetic that happens to work for a\nnarrow sample.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinFlags do\n @spec toggle(non_neg_integer(), non_neg_integer()) :: non_neg_integer()\n def toggle(left, right) when is_integer(left) and is_integer(right) do\n Bitwise.band(left, right)\n end\nend\n```"}], "label": false}
15
+ {"id": "round3.qwen25c3b.kto.errors.tagged-with.chosen", "family": "errors", "source": "qwen25c3b_micro_round3_kto", "weakness": "err-with-else", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoErrorsSum` with:\n\nDefine `sum/2` for two strings containing integers. Return\n`{:ok, sum}` on success and `{:error, :invalid}` for malformed\ninput. Use tagged `with` branches and do not turn a parse failure\ninto a successful default.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoErrorsSum do\n @spec sum(String.t(), String.t()) :: {:ok, integer()} | {:error, :invalid}\n def sum(left, right) when is_binary(left) and is_binary(right) do\n with {left_number, \"\"} <- Integer.parse(left),\n {right_number, \"\"} <- Integer.parse(right) do\n {:ok, left_number + right_number}\n else\n _ -> {:error, :invalid}\n end\n end\nend\n```"}], "label": true}
16
+ {"id": "round3.qwen25c3b.kto.errors.tagged-with.rejected", "family": "errors", "source": "qwen25c3b_micro_round3_kto", "weakness": "err-with-else", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoErrorsSum` with:\n\nDefine `sum/2` for two strings containing integers. Return\n`{:ok, sum}` on success and `{:error, :invalid}` for malformed\ninput. Use tagged `with` branches and do not turn a parse failure\ninto a successful default.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoErrorsSum do\n @spec sum(String.t(), String.t()) :: {:ok, integer()} | {:error, :invalid}\n def sum(left, right) when is_binary(left) and is_binary(right) do\n case Integer.parse(left) do\n {left_number, _rest} -> {:ok, left_number + String.to_integer(right)}\n :error -> {:ok, 0}\n end\n end\nend\n```"}], "label": false}
17
+ {"id": "round3.qwen25c3b.kto.stdlib.string-length.chosen", "family": "stdlib", "source": "qwen25c3b_micro_round3_kto", "weakness": "stdlib-byte-vs-grapheme", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoStdlibText` with:\n\nDefine `characters/1` to count user-visible Unicode graphemes in a\nstring. Use the String API rather than counting UTF-8 bytes.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoStdlibText do\n @spec characters(String.t()) :: non_neg_integer()\n def characters(text) when is_binary(text), do: String.length(text)\nend\n```"}], "label": true}
18
+ {"id": "round3.qwen25c3b.kto.stdlib.string-length.rejected", "family": "stdlib", "source": "qwen25c3b_micro_round3_kto", "weakness": "stdlib-byte-vs-grapheme", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoStdlibText` with:\n\nDefine `characters/1` to count user-visible Unicode graphemes in a\nstring. Use the String API rather than counting UTF-8 bytes.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoStdlibText do\n @spec characters(String.t()) :: non_neg_integer()\n def characters(text) when is_binary(text), do: byte_size(text)\nend\n```"}], "label": false}
19
+ {"id": "round3.qwen25c3b.kto.protocol.behaviour-contract.chosen", "family": "protocol", "source": "qwen25c3b_micro_round3_kto", "weakness": "protocol-behaviour", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoUpperFormatter` with:\n\nDefine a `KtoFormatter` behaviour with a `format/1` callback and an\nimplementation module `KtoUpperFormatter` that declares the\nbehaviour and uses `@impl true`. Formatting should uppercase text.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFormatter do\n @callback format(String.t()) :: String.t()\nend\n\ndefmodule KtoUpperFormatter do\n @behaviour KtoFormatter\n\n @impl true\n def format(text) when is_binary(text), do: String.upcase(text)\nend\n```"}], "label": true}
20
+ {"id": "round3.qwen25c3b.kto.protocol.behaviour-contract.rejected", "family": "protocol", "source": "qwen25c3b_micro_round3_kto", "weakness": "protocol-behaviour", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoUpperFormatter` with:\n\nDefine a `KtoFormatter` behaviour with a `format/1` callback and an\nimplementation module `KtoUpperFormatter` that declares the\nbehaviour and uses `@impl true`. Formatting should uppercase text.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoFormatter do\n @callback format(String.t()) :: String.t()\nend\n\ndefmodule KtoUpperFormatter do\n def format(text) when is_binary(text), do: String.upcase(text)\nend\n```"}], "label": false}
21
+ {"id": "round3.qwen25c3b.kto.binary.safe-term.chosen", "family": "binaries", "source": "qwen25c3b_micro_round3_kto", "weakness": "stdlib-safe-deserialization", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinTerm` with:\n\nDefine `decode/1` for a binary term. Use the safe Erlang decoding\noption so the function does not create atoms or other resources\nfrom untrusted input. Valid encoded terms should be returned.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinTerm do\n @spec decode(binary()) :: term()\n def decode(binary) when is_binary(binary) do\n :erlang.binary_to_term(binary, [:safe])\n end\nend\n```"}], "label": true}
22
+ {"id": "round3.qwen25c3b.kto.binary.safe-term.rejected", "family": "binaries", "source": "qwen25c3b_micro_round3_kto", "weakness": "stdlib-safe-deserialization", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinTerm` with:\n\nDefine `decode/1` for a binary term. Use the safe Erlang decoding\noption so the function does not create atoms or other resources\nfrom untrusted input. Valid encoded terms should be returned.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinTerm do\n @spec decode(binary()) :: term()\n def decode(binary) when is_binary(binary) do\n :erlang.binary_to_term(binary)\n end\nend\n```"}], "label": false}
23
+ {"id": "round3.qwen25c3b.kto.stdlib.regex-nil.chosen", "family": "stdlib", "source": "qwen25c3b_micro_round3_kto", "weakness": "edge-nil-result", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoStdlibDigits` with:\n\nDefine `extract/1` to return `{:ok, digits}` for the first run of\ndecimal digits in a string, or `:error` when there is no match.\nHandle the `nil` result from `Regex.run/3` explicitly.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoStdlibDigits do\n @spec extract(String.t()) :: {:ok, String.t()} | :error\n def extract(text) when is_binary(text) do\n case Regex.run(~r/(\\d+)/, text, capture: :all_but_first) do\n [digits] -> {:ok, digits}\n nil -> :error\n end\n end\nend\n```"}], "label": true}
24
+ {"id": "round3.qwen25c3b.kto.stdlib.regex-nil.rejected", "family": "stdlib", "source": "qwen25c3b_micro_round3_kto", "weakness": "edge-nil-result", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoStdlibDigits` with:\n\nDefine `extract/1` to return `{:ok, digits}` for the first run of\ndecimal digits in a string, or `:error` when there is no match.\nHandle the `nil` result from `Regex.run/3` explicitly.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoStdlibDigits do\n @spec extract(String.t()) :: {:ok, String.t()} | :error\n def extract(text) when is_binary(text) do\n [digits] = Regex.run(~r/(\\d+)/, text, capture: :all_but_first)\n {:ok, digits}\n end\nend\n```"}], "label": false}
25
+ {"id": "round3.qwen25c3b.kto.binary.signed-integer.chosen", "family": "binaries", "source": "qwen25c3b_micro_round3_kto", "weakness": "bin-signed", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinSigned16` with:\n\nDefine `decode/1` for exactly two bytes containing a signed\nbig-endian 16-bit integer. Return `{:ok, integer}` for the exact\nbinary and `:error` for all other sizes.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinSigned16 do\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(<<value::signed-big-integer-size(16)>>), do: {:ok, value}\n def decode(_other), do: :error\nend\n```"}], "label": true}
26
+ {"id": "round3.qwen25c3b.kto.binary.signed-integer.rejected", "family": "binaries", "source": "qwen25c3b_micro_round3_kto", "weakness": "bin-signed", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinSigned16` with:\n\nDefine `decode/1` for exactly two bytes containing a signed\nbig-endian 16-bit integer. Return `{:ok, integer}` for the exact\nbinary and `:error` for all other sizes.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinSigned16 do\n @spec decode(binary()) :: {:ok, integer()} | :error\n def decode(<<value::unsigned-big-integer-size(16)>>), do: {:ok, value}\n def decode(_other), do: :error\nend\n```"}], "label": false}
27
+ {"id": "round3.qwen25c3b.kto.binary.varint-empty-guard.chosen", "family": "binaries", "source": "qwen25c3b_micro_round3_kto", "weakness": "edge-empty", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinVarint` with:\n\nDefine `decode/1` for an unsigned little-endian base-128 varint.\nReturn `{:ok, {value, rest}}`, return `:error` for empty or\ntruncated input, and reject more than five bytes. Use recursive\npattern matching with an explicit empty-binary clause.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinVarint do\n @spec decode(binary()) :: {:ok, {non_neg_integer(), binary()}} | :error\n def decode(binary) when is_binary(binary), do: decode_bytes(binary, 0, 0)\n\n defp decode_bytes(_rest, _value, 5), do: :error\n defp decode_bytes(<<>>, _value, _count), do: :error\n\n defp decode_bytes(<<byte, rest::binary>>, value, count) do\n low_bits = Bitwise.band(byte, 0x7F)\n next_value = value + Bitwise.bsl(low_bits, 7 * count)\n\n if Bitwise.band(byte, 0x80) == 0 do\n {:ok, {next_value, rest}}\n else\n decode_bytes(rest, next_value, count + 1)\n end\n end\nend\n```"}], "label": true}
28
+ {"id": "round3.qwen25c3b.kto.binary.varint-empty-guard.rejected", "family": "binaries", "source": "qwen25c3b_micro_round3_kto", "weakness": "edge-empty", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoBinVarint` with:\n\nDefine `decode/1` for an unsigned little-endian base-128 varint.\nReturn `{:ok, {value, rest}}`, return `:error` for empty or\ntruncated input, and reject more than five bytes. Use recursive\npattern matching with an explicit empty-binary clause.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoBinVarint do\n @spec decode(binary()) :: {:ok, {non_neg_integer(), binary()}} | :error\n def decode(binary) when is_binary(binary), do: decode_bytes(binary, 0, 0)\n\n defp decode_bytes(_rest, _value, 5), do: :error\n\n defp decode_bytes(<<byte, rest::binary>>, value, count) do\n low_bits = Bitwise.band(byte, 0x7F)\n next_value = value + Bitwise.bsl(low_bits, 7 * count)\n\n if Bitwise.band(byte, 0x80) == 0 do\n {:ok, {next_value, rest}}\n else\n decode_bytes(rest, next_value, count + 1)\n end\n end\nend\n```"}], "label": false}
29
+ {"id": "round3.qwen25c3b.kto.otp.immutable-state-update.chosen", "family": "otp", "source": "qwen25c3b_micro_round3_kto", "weakness": "enum-state", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpTotals` with:\n\nDefine a GenServer callback for `{:add, key, amount}`. Update the\nmap state immutably with `Map.update/4`, reply with the new value,\nand keep the updated map as the next state.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpTotals do\n use GenServer\n\n @impl true\n def init(state), do: {:ok, state}\n\n @impl true\n def handle_call({:add, key, amount}, _from, state) when is_map(state) do\n new_state = Map.update(state, key, amount, &(&1 + amount))\n {:reply, Map.fetch!(new_state, key), new_state}\n end\nend\n```"}], "label": true}
30
+ {"id": "round3.qwen25c3b.kto.otp.immutable-state-update.rejected", "family": "otp", "source": "qwen25c3b_micro_round3_kto", "weakness": "enum-state", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpTotals` with:\n\nDefine a GenServer callback for `{:add, key, amount}`. Update the\nmap state immutably with `Map.update/4`, reply with the new value,\nand keep the updated map as the next state.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpTotals do\n use GenServer\n\n @impl true\n def handle_call({:add, key, amount}, _from, state) when is_map(state) do\n current = Map.get(state, key, 0)\n {:reply, current + amount, state}\n end\nend\n```"}], "label": false}
31
+ {"id": "round3.qwen25c3b.kto.otp.call-explicit-timeout.chosen", "family": "otp", "source": "qwen25c3b_micro_round3_kto", "weakness": "otp-timeout", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpCounter` with:\n\nDefine a GenServer with `start_link/1` and `value/1`. Store the\ninitial value and read it through a synchronous `GenServer.call/3`\nwith an explicit module timeout. The callback must preserve state.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpCounter do\n use GenServer\n\n @timeout 1_000\n\n @spec start_link(term()) :: GenServer.on_start()\n def start_link(initial), do: GenServer.start_link(__MODULE__, initial)\n\n @spec value(pid()) :: term()\n def value(pid), do: GenServer.call(pid, :value, @timeout)\n\n @impl true\n def init(initial), do: {:ok, initial}\n\n @impl true\n def handle_call(:value, _from, state), do: {:reply, state, state}\nend\n```"}], "label": true}
32
+ {"id": "round3.qwen25c3b.kto.otp.call-explicit-timeout.rejected", "family": "otp", "source": "qwen25c3b_micro_round3_kto", "weakness": "otp-timeout", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpCounter` with:\n\nDefine a GenServer with `start_link/1` and `value/1`. Store the\ninitial value and read it through a synchronous `GenServer.call/3`\nwith an explicit module timeout. The callback must preserve state.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpCounter do\n use GenServer\n\n @spec start_link(term()) :: GenServer.on_start()\n def start_link(initial), do: GenServer.start_link(__MODULE__, initial)\n\n @spec value(pid()) :: term()\n def value(pid), do: GenServer.call(pid, :value)\n\n @impl true\n def init(initial), do: {:ok, initial}\n\n @impl true\n def handle_call(:value, _from, state), do: {:reply, state, state}\nend\n```"}], "label": false}
33
+ {"id": "round3.qwen25c3b.kto.otp.handle-info.chosen", "family": "otp", "source": "qwen25c3b_micro_round3_kto", "weakness": "otp-handle-info", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpInfo` with:\n\nDefine a GenServer `handle_info/2` clause for `:refresh`. It should\nset `:refreshed` to `true` in a map state and return\n`{:noreply, new_state}`. Do not route an out-of-band message through\nthe cast or call callback.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpInfo do\n use GenServer\n\n @impl true\n def init(state), do: {:ok, state}\n\n @impl true\n def handle_info(:refresh, state) when is_map(state) do\n {:noreply, Map.put(state, :refreshed, true)}\n end\nend\n```"}], "label": true}
34
+ {"id": "round3.qwen25c3b.kto.otp.handle-info.rejected", "family": "otp", "source": "qwen25c3b_micro_round3_kto", "weakness": "otp-handle-info", "origin": null, "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `KtoOtpInfo` with:\n\nDefine a GenServer `handle_info/2` clause for `:refresh`. It should\nset `:refreshed` to `true` in a map state and return\n`{:noreply, new_state}`. Do not route an out-of-band message through\nthe cast or call callback.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule KtoOtpInfo do\n use GenServer\n\n @impl true\n def handle_cast(:refresh, state) when is_map(state) do\n {:noreply, Map.put(state, :refreshed, true)}\n end\nend\n```"}], "label": false}
data/onpolicy/qwen25c3b_micro_round4_dpo.jsonl ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"id": "round4.qwen25c3b.dpo.stdlib.multisort.v2.enum-state.0", "family": "stdlib", "source": "qwen25c3b_micro_round4_dpo", "weakness": "enum-state", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `MultiSort02` with:\n\n@spec run([map()]) :: [map()]\n def run(items)\n\nEach item is a map with `:first` and `:last`. Sort ascending by `:last`,\nties broken by `:first`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule MultiSort02 do\n @spec run([map()]) :: [map()]\n def run(items) when is_list(items) do\n Enum.sort_by(items, &{&1.last, &1.first})\n end\nend\n```", "rejected": "```elixir\ndefmodule MultiSort02 do\n @spec run([map()]) :: [map()]\n def run(items) when is_list(items) do\n Enum.sort_by(items, & &1.last)\n end\nend\n```"}
2
+ {"id": "round4.qwen25c3b.dpo.collections.cartpair.v2.enum-state.0", "family": "collections", "source": "qwen25c3b_micro_round4_dpo", "weakness": "enum-state", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `CartPair02` with:\n\n@spec run([term()], [term()], (term(), term() -> boolean())) :: [{term(), term()}]\n def run(left, right, keep)\n\nCartesian product of `left` and `right`, keeping only pairs where\n`keep.(a, b)` is true, in row-major order.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule CartPair02 do\n @spec run([term()], [term()], (term(), term() -> boolean())) :: [{term(), term()}]\n def run(left, right, keep) when is_function(keep, 2) do\n for a <- left, b <- right, keep.(a, b), do: {a, b}\n end\nend\n```", "rejected": "```elixir\ndefmodule CartPair02 do\n @spec run([term()], [term()], (term(), term() -> boolean())) :: [{term(), term()}]\n def run(left, right, keep) when is_function(keep, 2) do\n for a <- left, b <- right, do: {a, b}\n end\nend\n```"}
3
+ {"id": "round4.qwen25c3b.dpo.binaries.checksum8.v3.edge-empty", "family": "binaries", "source": "qwen25c3b_micro_round4_dpo", "weakness": "edge-empty", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `Checksum803` with:\n\n@spec frame(binary()) :: binary()\n def frame(payload)\n\n @spec verify(binary()) :: {:ok, binary()} | :error\n def verify(frame)\n\n`frame/1` appends one checksum byte: the byte-sum of the payload mod 256.\n`verify/1` returns `{:ok, payload}` when the trailing byte matches, otherwise\n`:error`. An empty frame is `:error`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule Checksum803 do\n @spec frame(binary()) :: binary()\n def frame(payload) when is_binary(payload) do\n <<payload::binary, sum(payload)>>\n end\n\n @spec verify(binary()) :: {:ok, binary()} | :error\n def verify(<<payload::binary>>) when byte_size(payload) < 1, do: :error\n\n def verify(frame) when is_binary(frame) do\n body = binary_part(frame, 0, byte_size(frame) - 1)\n <<checksum>> = binary_part(frame, byte_size(frame) - 1, 1)\n\n if sum(body) == checksum, do: {:ok, body}, else: :error\n end\n\n defp sum(bin) do\n Enum.reduce(:binary.bin_to_list(bin), 0, &+/2) |> rem(256)\n end\nend\n```", "rejected": "```elixir\ndefmodule Checksum803 do\n @spec frame(binary()) :: binary()\n def frame(payload) when is_binary(payload) do\n <<payload::binary, sum(payload)>>\n end\n\n @spec verify(binary()) :: {:ok, binary()} | :error\n def verify(frame) when is_binary(frame) do\n body = binary_part(frame, 0, byte_size(frame) - 1)\n <<checksum>> = binary_part(frame, byte_size(frame) - 1, 1)\n\n if sum(body) == checksum, do: {:ok, body}, else: :error\n end\n\n defp sum(bin) do\n Enum.reduce(:binary.bin_to_list(bin), 0, &+/2) |> rem(256)\n end\nend\n```"}
4
+ {"id": "round4.qwen25c3b.dpo.otp.freqlog.edge-empty", "family": "otp", "source": "qwen25c3b_micro_round4_dpo", "weakness": "edge-empty", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `FreqLog` with:\n\n@spec start_link() :: {:ok, pid()}\n def start_link()\n\n @spec bump(pid(), term()) :: non_neg_integer()\n def bump(pid, key)\n\n @spec count(pid(), term()) :: non_neg_integer()\n def count(pid, key)\n\nAgent frequency map. `bump/2` returns the new count; `count/2` is zero for\nunknown keys.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule FreqLog do\n @spec start_link() :: {:ok, pid()}\n def start_link, do: Agent.start_link(fn -> %{} end)\n\n @spec bump(pid(), term()) :: non_neg_integer()\n def bump(pid, key) do\n Agent.get_and_update(pid, fn map ->\n next = Map.update(map, key, 1, &(&1 + 1))\n {Map.fetch!(next, key), next}\n end)\n end\n\n @spec count(pid(), term()) :: non_neg_integer()\n def count(pid, key), do: Agent.get(pid, &Map.get(&1, key, 0))\nend\n```", "rejected": "```elixir\ndefmodule FreqLog do\n @spec start_link() :: {:ok, pid()}\n def start_link, do: Agent.start_link(fn -> %{} end)\n\n @spec bump(pid(), term()) :: non_neg_integer()\n def bump(pid, key) do\n Agent.get_and_update(pid, fn map ->\n next = Map.update(map, key, 1, &(&1 + 1))\n {Map.fetch!(next, key), next}\n end)\n end\n\n @spec count(pid(), term()) :: non_neg_integer()\n def count(pid, key), do: Agent.get(pid, &Map.fetch!(&1, key))\nend\n```"}
5
+ {"id": "round4.qwen25c3b.dpo.errors.validatefields.v3.err-swallow", "family": "errors", "source": "qwen25c3b_micro_round4_dpo", "weakness": "err-swallow", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `ValidateFields03` with:\n\n@spec run(keyword()) :: :ok | {:error, [atom()]}\n def run(fields)\n\nRequired keys are `[:name, :email]`. Return `:ok` when both are present,\notherwise `{:error, missing}` with the missing keys sorted alphabetically.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule ValidateFields03 do\n @required [:name, :email]\n\n @spec run(keyword()) :: :ok | {:error, [atom()]}\n def run(fields) when is_list(fields) do\n present = Keyword.keys(fields)\n missing = Enum.reject(@required, &Enum.member?(present, &1))\n\n case missing do\n [] -> :ok\n _missing -> {:error, Enum.sort(missing)}\n end\n end\nend\n```", "rejected": "```elixir\ndefmodule ValidateFields03 do\n @required [:name, :email]\n\n @spec run(keyword()) :: :ok | {:error, [atom()]}\n def run(fields) when is_list(fields) do\n present = Keyword.keys(fields)\n missing = Enum.reject(@required, &Enum.member?(present, &1))\n\n case missing do\n [] -> :ok\n _missing -> {:error, [hd(Enum.sort(missing))]}\n end\n end\nend\n```"}
6
+ {"id": "round4.qwen25c3b.dpo.functional_style.transition_02.functional-style-process-state", "family": "functional", "source": "qwen25c3b_micro_round4_dpo", "weakness": "functional-style-process-state", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `FnDpoStyleTransition02` with:\n\nDefine `step/2` for a state `%{total: integer, values: list}`. `{:add, value}` adds to the total and prepends the value; `:reset` returns an empty state.\n\nModel each event as a pure state transition with pattern clauses.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule FnDpoStyleTransition02 do\n @spec step(%{total: integer(), values: [integer()]}, {:add, integer()} | :reset) :: map()\n def step(state, {:add, value}) do\n %{state | total: state.total + value, values: [value | state.values]}\n end\n\n def step(_state, :reset), do: %{total: 0, values: []}\nend\n```", "rejected": "```elixir\ndefmodule FnDpoStyleTransition02 do\n @spec step(%{total: integer(), values: [integer()]}, {:add, integer()} | :reset) :: map()\n def step(state, event) do\n key = {__MODULE__, make_ref()}\n Process.put(key, state)\n\n case event do\n {:add, value} ->\n current = Process.get(key)\n Process.put(key, %{current | total: current.total + value, values: [value | current.values]})\n\n :reset ->\n Process.put(key, %{total: 0, values: []})\n end\n\n result = Process.get(key)\n Process.delete(key)\n result\n end\nend\n```"}
7
+ {"id": "round4.qwen25c3b.dpo.functional_style.transition_03.functional-style-process-state", "family": "functional", "source": "qwen25c3b_micro_round4_dpo", "weakness": "functional-style-process-state", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `FnDpoStyleTransition03` with:\n\nDefine `step/2` for a state `%{total: integer, values: list}`. `{:add, value}` adds to the total and prepends the value; `:reset` returns an empty state.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule FnDpoStyleTransition03 do\n @spec step(%{total: integer(), values: [integer()]}, {:add, integer()} | :reset) :: map()\n def step(state, {:add, value}) do\n %{state | total: state.total + value, values: [value | state.values]}\n end\n\n def step(_state, :reset), do: %{total: 0, values: []}\nend\n```", "rejected": "```elixir\ndefmodule FnDpoStyleTransition03 do\n @spec step(%{total: integer(), values: [integer()]}, {:add, integer()} | :reset) :: map()\n def step(state, event) do\n key = {__MODULE__, make_ref()}\n Process.put(key, state)\n\n case event do\n {:add, value} ->\n current = Process.get(key)\n Process.put(key, %{current | total: current.total + value, values: [value | current.values]})\n\n :reset ->\n Process.put(key, %{total: 0, values: []})\n end\n\n result = Process.get(key)\n Process.delete(key)\n result\n end\nend\n```"}
8
+ {"id": "round4.qwen25c3b.dpo.functional_style.reduce_07.functional-style-agent-state", "family": "functional", "source": "qwen25c3b_micro_round4_dpo", "weakness": "functional-style-agent-state", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `FnDpoStyleReduce07` with:\n\nDefine `run/1` to return a frequency map for all values in the list.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule FnDpoStyleReduce07 do\n @spec run([term()]) :: map()\n def run(values) when is_list(values) do\n Enum.reduce(values, %{}, fn value, counts ->\n Map.update(counts, value, 1, &(&1 + 1))\n end)\n end\nend\n```", "rejected": "```elixir\ndefmodule FnDpoStyleReduce07 do\n @spec run([term()]) :: map()\n def run(values) when is_list(values) do\n {:ok, state} = Agent.start_link(fn -> %{} end)\n\n Enum.each(values, fn value ->\n Agent.update(state, &Map.update(&1, value, 1, fn count -> count + 1 end))\n end)\n\n counts = Agent.get(state, & &1)\n Agent.stop(state)\n counts\n end\nend\n```"}
9
+ {"id": "round4.qwen25c3b.dpo.functional_style.reduce_06.functional-style-agent-state", "family": "functional", "source": "qwen25c3b_micro_round4_dpo", "weakness": "functional-style-agent-state", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `FnDpoStyleReduce06` with:\n\nDefine `run/1` to return a frequency map for all values in the list.\n\nThread one immutable map through `Enum.reduce/3`.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule FnDpoStyleReduce06 do\n @spec run([term()]) :: map()\n def run(values) when is_list(values) do\n Enum.reduce(values, %{}, fn value, counts ->\n Map.update(counts, value, 1, &(&1 + 1))\n end)\n end\nend\n```", "rejected": "```elixir\ndefmodule FnDpoStyleReduce06 do\n @spec run([term()]) :: map()\n def run(values) when is_list(values) do\n {:ok, state} = Agent.start_link(fn -> %{} end)\n\n Enum.each(values, fn value ->\n Agent.update(state, &Map.update(&1, value, 1, fn count -> count + 1 end))\n end)\n\n counts = Agent.get(state, & &1)\n Agent.stop(state)\n counts\n end\nend\n```"}
10
+ {"id": "round4.qwen25c3b.dpo.functional_style.stable_unique_10.functional-style-append-accumulator", "family": "functional", "source": "qwen25c3b_micro_round4_dpo", "weakness": "functional-style-append-accumulator", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `FnDpoStyleStableUnique10` with:\n\nDefine `run/1` to remove duplicate values while preserving their first occurrence.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule FnDpoStyleStableUnique10 do\n @spec run([term()]) :: [term()]\n def run(values) when is_list(values) do\n {_seen, reversed} =\n Enum.reduce(values, {MapSet.new(), []}, fn value, {seen, output} ->\n if MapSet.member?(seen, value) do\n {seen, output}\n else\n {MapSet.put(seen, value), [value | output]}\n end\n end)\n\n Enum.reverse(reversed)\n end\nend\n```", "rejected": "```elixir\ndefmodule FnDpoStyleStableUnique10 do\n @spec run([term()]) :: [term()]\n def run(values) when is_list(values) do\n {_seen, output} =\n Enum.reduce(values, {MapSet.new(), []}, fn value, {seen, output} ->\n if MapSet.member?(seen, value) do\n {seen, output}\n else\n {MapSet.put(seen, value), output ++ [value]}\n end\n end)\n\n output\n end\nend\n```"}
11
+ {"id": "round4.qwen25c3b.dpo.functional_style.stable_unique_04.functional-style-append-accumulator", "family": "functional", "source": "qwen25c3b_micro_round4_dpo", "weakness": "functional-style-append-accumulator", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-v1-dpo"], "conversations": [{"from": "system", "value": "You are a friendly coding assistant that helps with software engineering tasks."}, {"from": "human", "value": "Write a module `FnDpoStyleStableUnique04` with:\n\nDefine `run/1` to remove duplicate values while preserving their first occurrence.\n\nUse a `{seen, reversed}` reduction and reverse once.\n\nReply with a single ```elixir fence containing only the module."}], "chosen": "```elixir\ndefmodule FnDpoStyleStableUnique04 do\n @spec run([term()]) :: [term()]\n def run(values) when is_list(values) do\n {_seen, reversed} =\n Enum.reduce(values, {MapSet.new(), []}, fn value, {seen, output} ->\n if MapSet.member?(seen, value) do\n {seen, output}\n else\n {MapSet.put(seen, value), [value | output]}\n end\n end)\n\n Enum.reverse(reversed)\n end\nend\n```", "rejected": "```elixir\ndefmodule FnDpoStyleStableUnique04 do\n @spec run([term()]) :: [term()]\n def run(values) when is_list(values) do\n {_seen, output} =\n Enum.reduce(values, {MapSet.new(), []}, fn value, {seen, output} ->\n if MapSet.member?(seen, value) do\n {seen, output}\n else\n {MapSet.put(seen, value), output ++ [value]}\n end\n end)\n\n output\n end\nend\n```"}
data/onpolicy/qwen25c3b_micro_round6_kto.jsonl ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.stdlib.multisort.v2.enum-state.0.chosen", "family": "stdlib", "source": "qwen25c3b_micro_round6_kto", "weakness": "enum-state", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `MultiSort02` with:\n\n@spec run([map()]) :: [map()]\n def run(items)\n\nEach item is a map with `:first` and `:last`. Sort ascending by `:last`,\nties broken by `:first`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule MultiSort02 do\n @spec run([map()]) :: [map()]\n def run(items) when is_list(items) do\n Enum.sort_by(items, &{&1.last, &1.first})\n end\nend\n```"}], "label": true}
2
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.stdlib.multisort.v2.enum-state.0.rejected", "family": "stdlib", "source": "qwen25c3b_micro_round6_kto", "weakness": "enum-state", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `MultiSort02` with:\n\n@spec run([map()]) :: [map()]\n def run(items)\n\nEach item is a map with `:first` and `:last`. Sort ascending by `:last`,\nties broken by `:first`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule MultiSort02 do\n @spec run([map()]) :: [map()]\n def run(items) when is_list(items) do\n Enum.sort_by(items, & &1.last)\n end\nend\n```"}], "label": false}
3
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.collections.cartpair.v2.enum-state.0.chosen", "family": "collections", "source": "qwen25c3b_micro_round6_kto", "weakness": "enum-state", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `CartPair02` with:\n\n@spec run([term()], [term()], (term(), term() -> boolean())) :: [{term(), term()}]\n def run(left, right, keep)\n\nCartesian product of `left` and `right`, keeping only pairs where\n`keep.(a, b)` is true, in row-major order.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule CartPair02 do\n @spec run([term()], [term()], (term(), term() -> boolean())) :: [{term(), term()}]\n def run(left, right, keep) when is_function(keep, 2) do\n for a <- left, b <- right, keep.(a, b), do: {a, b}\n end\nend\n```"}], "label": true}
4
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.collections.cartpair.v2.enum-state.0.rejected", "family": "collections", "source": "qwen25c3b_micro_round6_kto", "weakness": "enum-state", "origin": "handmade", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `CartPair02` with:\n\n@spec run([term()], [term()], (term(), term() -> boolean())) :: [{term(), term()}]\n def run(left, right, keep)\n\nCartesian product of `left` and `right`, keeping only pairs where\n`keep.(a, b)` is true, in row-major order.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule CartPair02 do\n @spec run([term()], [term()], (term(), term() -> boolean())) :: [{term(), term()}]\n def run(left, right, keep) when is_function(keep, 2) do\n for a <- left, b <- right, do: {a, b}\n end\nend\n```"}], "label": false}
5
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.binaries.checksum8.v3.edge-empty.chosen", "family": "binaries", "source": "qwen25c3b_micro_round6_kto", "weakness": "edge-empty", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `Checksum803` with:\n\n@spec frame(binary()) :: binary()\n def frame(payload)\n\n @spec verify(binary()) :: {:ok, binary()} | :error\n def verify(frame)\n\n`frame/1` appends one checksum byte: the byte-sum of the payload mod 256.\n`verify/1` returns `{:ok, payload}` when the trailing byte matches, otherwise\n`:error`. An empty frame is `:error`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule Checksum803 do\n @spec frame(binary()) :: binary()\n def frame(payload) when is_binary(payload) do\n <<payload::binary, sum(payload)>>\n end\n\n @spec verify(binary()) :: {:ok, binary()} | :error\n def verify(<<payload::binary>>) when byte_size(payload) < 1, do: :error\n\n def verify(frame) when is_binary(frame) do\n body = binary_part(frame, 0, byte_size(frame) - 1)\n <<checksum>> = binary_part(frame, byte_size(frame) - 1, 1)\n\n if sum(body) == checksum, do: {:ok, body}, else: :error\n end\n\n defp sum(bin) do\n Enum.reduce(:binary.bin_to_list(bin), 0, &+/2) |> rem(256)\n end\nend\n```"}], "label": true}
6
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.binaries.checksum8.v3.edge-empty.rejected", "family": "binaries", "source": "qwen25c3b_micro_round6_kto", "weakness": "edge-empty", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `Checksum803` with:\n\n@spec frame(binary()) :: binary()\n def frame(payload)\n\n @spec verify(binary()) :: {:ok, binary()} | :error\n def verify(frame)\n\n`frame/1` appends one checksum byte: the byte-sum of the payload mod 256.\n`verify/1` returns `{:ok, payload}` when the trailing byte matches, otherwise\n`:error`. An empty frame is `:error`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule Checksum803 do\n @spec frame(binary()) :: binary()\n def frame(payload) when is_binary(payload) do\n <<payload::binary, sum(payload)>>\n end\n\n @spec verify(binary()) :: {:ok, binary()} | :error\n def verify(frame) when is_binary(frame) do\n body = binary_part(frame, 0, byte_size(frame) - 1)\n <<checksum>> = binary_part(frame, byte_size(frame) - 1, 1)\n\n if sum(body) == checksum, do: {:ok, body}, else: :error\n end\n\n defp sum(bin) do\n Enum.reduce(:binary.bin_to_list(bin), 0, &+/2) |> rem(256)\n end\nend\n```"}], "label": false}
7
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.otp.freqlog.edge-empty.chosen", "family": "otp", "source": "qwen25c3b_micro_round6_kto", "weakness": "edge-empty", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `FreqLog` with:\n\n@spec start_link() :: {:ok, pid()}\n def start_link()\n\n @spec bump(pid(), term()) :: non_neg_integer()\n def bump(pid, key)\n\n @spec count(pid(), term()) :: non_neg_integer()\n def count(pid, key)\n\nAgent frequency map. `bump/2` returns the new count; `count/2` is zero for\nunknown keys.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule FreqLog do\n @spec start_link() :: {:ok, pid()}\n def start_link, do: Agent.start_link(fn -> %{} end)\n\n @spec bump(pid(), term()) :: non_neg_integer()\n def bump(pid, key) do\n Agent.get_and_update(pid, fn map ->\n next = Map.update(map, key, 1, &(&1 + 1))\n {Map.fetch!(next, key), next}\n end)\n end\n\n @spec count(pid(), term()) :: non_neg_integer()\n def count(pid, key), do: Agent.get(pid, &Map.get(&1, key, 0))\nend\n```"}], "label": true}
8
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.otp.freqlog.edge-empty.rejected", "family": "otp", "source": "qwen25c3b_micro_round6_kto", "weakness": "edge-empty", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `FreqLog` with:\n\n@spec start_link() :: {:ok, pid()}\n def start_link()\n\n @spec bump(pid(), term()) :: non_neg_integer()\n def bump(pid, key)\n\n @spec count(pid(), term()) :: non_neg_integer()\n def count(pid, key)\n\nAgent frequency map. `bump/2` returns the new count; `count/2` is zero for\nunknown keys.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule FreqLog do\n @spec start_link() :: {:ok, pid()}\n def start_link, do: Agent.start_link(fn -> %{} end)\n\n @spec bump(pid(), term()) :: non_neg_integer()\n def bump(pid, key) do\n Agent.get_and_update(pid, fn map ->\n next = Map.update(map, key, 1, &(&1 + 1))\n {Map.fetch!(next, key), next}\n end)\n end\n\n @spec count(pid(), term()) :: non_neg_integer()\n def count(pid, key), do: Agent.get(pid, &Map.fetch!(&1, key))\nend\n```"}], "label": false}
9
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.errors.validatefields.v3.err-swallow.chosen", "family": "errors", "source": "qwen25c3b_micro_round6_kto", "weakness": "err-swallow", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `ValidateFields03` with:\n\n@spec run(keyword()) :: :ok | {:error, [atom()]}\n def run(fields)\n\nRequired keys are `[:name, :email]`. Return `:ok` when both are present,\notherwise `{:error, missing}` with the missing keys sorted alphabetically.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule ValidateFields03 do\n @required [:name, :email]\n\n @spec run(keyword()) :: :ok | {:error, [atom()]}\n def run(fields) when is_list(fields) do\n present = Keyword.keys(fields)\n missing = Enum.reject(@required, &Enum.member?(present, &1))\n\n case missing do\n [] -> :ok\n _missing -> {:error, Enum.sort(missing)}\n end\n end\nend\n```"}], "label": true}
10
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.errors.validatefields.v3.err-swallow.rejected", "family": "errors", "source": "qwen25c3b_micro_round6_kto", "weakness": "err-swallow", "origin": "designed", "preference_kind": "correctness", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `ValidateFields03` with:\n\n@spec run(keyword()) :: :ok | {:error, [atom()]}\n def run(fields)\n\nRequired keys are `[:name, :email]`. Return `:ok` when both are present,\notherwise `{:error, missing}` with the missing keys sorted alphabetically.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule ValidateFields03 do\n @required [:name, :email]\n\n @spec run(keyword()) :: :ok | {:error, [atom()]}\n def run(fields) when is_list(fields) do\n present = Keyword.keys(fields)\n missing = Enum.reject(@required, &Enum.member?(present, &1))\n\n case missing do\n [] -> :ok\n _missing -> {:error, [hd(Enum.sort(missing))]}\n end\n end\nend\n```"}], "label": false}
11
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.functional_style.transition_02.functional-style-process-state.chosen", "family": "functional", "source": "qwen25c3b_micro_round6_kto", "weakness": "functional-style-process-state", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `FnDpoStyleTransition02` with:\n\nDefine `step/2` for a state `%{total: integer, values: list}`. `{:add, value}` adds to the total and prepends the value; `:reset` returns an empty state.\n\nModel each event as a pure state transition with pattern clauses.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule FnDpoStyleTransition02 do\n @spec step(%{total: integer(), values: [integer()]}, {:add, integer()} | :reset) :: map()\n def step(state, {:add, value}) do\n %{state | total: state.total + value, values: [value | state.values]}\n end\n\n def step(_state, :reset), do: %{total: 0, values: []}\nend\n```"}], "label": true}
12
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.functional_style.transition_02.functional-style-process-state.rejected", "family": "functional", "source": "qwen25c3b_micro_round6_kto", "weakness": "functional-style-process-state", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `FnDpoStyleTransition02` with:\n\nDefine `step/2` for a state `%{total: integer, values: list}`. `{:add, value}` adds to the total and prepends the value; `:reset` returns an empty state.\n\nModel each event as a pure state transition with pattern clauses.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule FnDpoStyleTransition02 do\n @spec step(%{total: integer(), values: [integer()]}, {:add, integer()} | :reset) :: map()\n def step(state, event) do\n key = {__MODULE__, make_ref()}\n Process.put(key, state)\n\n case event do\n {:add, value} ->\n current = Process.get(key)\n Process.put(key, %{current | total: current.total + value, values: [value | current.values]})\n\n :reset ->\n Process.put(key, %{total: 0, values: []})\n end\n\n result = Process.get(key)\n Process.delete(key)\n result\n end\nend\n```"}], "label": false}
13
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.functional_style.transition_03.functional-style-process-state.chosen", "family": "functional", "source": "qwen25c3b_micro_round6_kto", "weakness": "functional-style-process-state", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `FnDpoStyleTransition03` with:\n\nDefine `step/2` for a state `%{total: integer, values: list}`. `{:add, value}` adds to the total and prepends the value; `:reset` returns an empty state.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule FnDpoStyleTransition03 do\n @spec step(%{total: integer(), values: [integer()]}, {:add, integer()} | :reset) :: map()\n def step(state, {:add, value}) do\n %{state | total: state.total + value, values: [value | state.values]}\n end\n\n def step(_state, :reset), do: %{total: 0, values: []}\nend\n```"}], "label": true}
14
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.functional_style.transition_03.functional-style-process-state.rejected", "family": "functional", "source": "qwen25c3b_micro_round6_kto", "weakness": "functional-style-process-state", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `FnDpoStyleTransition03` with:\n\nDefine `step/2` for a state `%{total: integer, values: list}`. `{:add, value}` adds to the total and prepends the value; `:reset` returns an empty state.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule FnDpoStyleTransition03 do\n @spec step(%{total: integer(), values: [integer()]}, {:add, integer()} | :reset) :: map()\n def step(state, event) do\n key = {__MODULE__, make_ref()}\n Process.put(key, state)\n\n case event do\n {:add, value} ->\n current = Process.get(key)\n Process.put(key, %{current | total: current.total + value, values: [value | current.values]})\n\n :reset ->\n Process.put(key, %{total: 0, values: []})\n end\n\n result = Process.get(key)\n Process.delete(key)\n result\n end\nend\n```"}], "label": false}
15
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.functional_style.reduce_07.functional-style-agent-state.chosen", "family": "functional", "source": "qwen25c3b_micro_round6_kto", "weakness": "functional-style-agent-state", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `FnDpoStyleReduce07` with:\n\nDefine `run/1` to return a frequency map for all values in the list.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule FnDpoStyleReduce07 do\n @spec run([term()]) :: map()\n def run(values) when is_list(values) do\n Enum.reduce(values, %{}, fn value, counts ->\n Map.update(counts, value, 1, &(&1 + 1))\n end)\n end\nend\n```"}], "label": true}
16
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.functional_style.reduce_07.functional-style-agent-state.rejected", "family": "functional", "source": "qwen25c3b_micro_round6_kto", "weakness": "functional-style-agent-state", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `FnDpoStyleReduce07` with:\n\nDefine `run/1` to return a frequency map for all values in the list.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule FnDpoStyleReduce07 do\n @spec run([term()]) :: map()\n def run(values) when is_list(values) do\n {:ok, state} = Agent.start_link(fn -> %{} end)\n\n Enum.each(values, fn value ->\n Agent.update(state, &Map.update(&1, value, 1, fn count -> count + 1 end))\n end)\n\n counts = Agent.get(state, & &1)\n Agent.stop(state)\n counts\n end\nend\n```"}], "label": false}
17
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.functional_style.reduce_06.functional-style-agent-state.chosen", "family": "functional", "source": "qwen25c3b_micro_round6_kto", "weakness": "functional-style-agent-state", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `FnDpoStyleReduce06` with:\n\nDefine `run/1` to return a frequency map for all values in the list.\n\nThread one immutable map through `Enum.reduce/3`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule FnDpoStyleReduce06 do\n @spec run([term()]) :: map()\n def run(values) when is_list(values) do\n Enum.reduce(values, %{}, fn value, counts ->\n Map.update(counts, value, 1, &(&1 + 1))\n end)\n end\nend\n```"}], "label": true}
18
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.functional_style.reduce_06.functional-style-agent-state.rejected", "family": "functional", "source": "qwen25c3b_micro_round6_kto", "weakness": "functional-style-agent-state", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `FnDpoStyleReduce06` with:\n\nDefine `run/1` to return a frequency map for all values in the list.\n\nThread one immutable map through `Enum.reduce/3`.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule FnDpoStyleReduce06 do\n @spec run([term()]) :: map()\n def run(values) when is_list(values) do\n {:ok, state} = Agent.start_link(fn -> %{} end)\n\n Enum.each(values, fn value ->\n Agent.update(state, &Map.update(&1, value, 1, fn count -> count + 1 end))\n end)\n\n counts = Agent.get(state, & &1)\n Agent.stop(state)\n counts\n end\nend\n```"}], "label": false}
19
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.functional_style.stable_unique_10.functional-style-append-accumulator.chosen", "family": "functional", "source": "qwen25c3b_micro_round6_kto", "weakness": "functional-style-append-accumulator", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `FnDpoStyleStableUnique10` with:\n\nDefine `run/1` to remove duplicate values while preserving their first occurrence.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule FnDpoStyleStableUnique10 do\n @spec run([term()]) :: [term()]\n def run(values) when is_list(values) do\n {_seen, reversed} =\n Enum.reduce(values, {MapSet.new(), []}, fn value, {seen, output} ->\n if MapSet.member?(seen, value) do\n {seen, output}\n else\n {MapSet.put(seen, value), [value | output]}\n end\n end)\n\n Enum.reverse(reversed)\n end\nend\n```"}], "label": true}
20
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.functional_style.stable_unique_10.functional-style-append-accumulator.rejected", "family": "functional", "source": "qwen25c3b_micro_round6_kto", "weakness": "functional-style-append-accumulator", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `FnDpoStyleStableUnique10` with:\n\nDefine `run/1` to remove duplicate values while preserving their first occurrence.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule FnDpoStyleStableUnique10 do\n @spec run([term()]) :: [term()]\n def run(values) when is_list(values) do\n {_seen, output} =\n Enum.reduce(values, {MapSet.new(), []}, fn value, {seen, output} ->\n if MapSet.member?(seen, value) do\n {seen, output}\n else\n {MapSet.put(seen, value), output ++ [value]}\n end\n end)\n\n output\n end\nend\n```"}], "label": false}
21
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.functional_style.stable_unique_04.functional-style-append-accumulator.chosen", "family": "functional", "source": "qwen25c3b_micro_round6_kto", "weakness": "functional-style-append-accumulator", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `FnDpoStyleStableUnique04` with:\n\nDefine `run/1` to remove duplicate values while preserving their first occurrence.\n\nUse a `{seen, reversed}` reduction and reverse once.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule FnDpoStyleStableUnique04 do\n @spec run([term()]) :: [term()]\n def run(values) when is_list(values) do\n {_seen, reversed} =\n Enum.reduce(values, {MapSet.new(), []}, fn value, {seen, output} ->\n if MapSet.member?(seen, value) do\n {seen, output}\n else\n {MapSet.put(seen, value), [value | output]}\n end\n end)\n\n Enum.reverse(reversed)\n end\nend\n```"}], "label": true}
22
+ {"id": "round6.qwen25c3b.round4.qwen25c3b.dpo.functional_style.stable_unique_04.functional-style-append-accumulator.rejected", "family": "functional", "source": "qwen25c3b_micro_round6_kto", "weakness": "functional-style-append-accumulator", "origin": "functional-style", "preference_kind": "functional-style", "models": ["qwen2.5-coder-3b-extra-layer-elixir-micro-round3-kto"], "prompt": [{"role": "system", "content": "You are a friendly coding assistant that helps with software engineering tasks."}, {"role": "user", "content": "Write a module `FnDpoStyleStableUnique04` with:\n\nDefine `run/1` to remove duplicate values while preserving their first occurrence.\n\nUse a `{seen, reversed}` reduction and reverse once.\n\nReply with a single ```elixir fence containing only the module."}], "completion": [{"role": "assistant", "content": "```elixir\ndefmodule FnDpoStyleStableUnique04 do\n @spec run([term()]) :: [term()]\n def run(values) when is_list(values) do\n {_seen, output} =\n Enum.reduce(values, {MapSet.new(), []}, fn value, {seen, output} ->\n if MapSet.member?(seen, value) do\n {seen, output}\n else\n {MapSet.put(seen, value), output ++ [value]}\n end\n end)\n\n output\n end\nend\n```"}], "label": false}
metadata/dataset_stats.json ADDED
@@ -0,0 +1,606 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "repo": "jmarceno/elixir-preference",
3
+ "total_rows": 909,
4
+ "files": [
5
+ {
6
+ "path": "data/dpo/dpo_failv0.jsonl",
7
+ "source": "publish/hf/_stage/elixir-preference/data/dpo/dpo_failv0.jsonl",
8
+ "rows": 654,
9
+ "sha256": "f27eb2c2ffcbea068ef03ad4c1c116e2b91cd5f5c60d01e107cd00e188ddc043",
10
+ "bytes": 1048704,
11
+ "characters": 460060,
12
+ "fields": [
13
+ "chosen",
14
+ "conversations",
15
+ "family",
16
+ "id",
17
+ "models",
18
+ "origin",
19
+ "preference_kind",
20
+ "rejected",
21
+ "source",
22
+ "weakness"
23
+ ],
24
+ "families": {
25
+ "abstractions": 41,
26
+ "beam": 66,
27
+ "binaries": 119,
28
+ "collections": 37,
29
+ "core": 41,
30
+ "errors": 47,
31
+ "functional": 120,
32
+ "otp": 134,
33
+ "stdlib": 49
34
+ },
35
+ "pack_overlap": {
36
+ "elixir_eval_v1.jsonl": {
37
+ "prompt_collisions": 0,
38
+ "module_collisions": 0
39
+ },
40
+ "elixir_eval_v2.jsonl": {
41
+ "prompt_collisions": 0,
42
+ "module_collisions": 0
43
+ }
44
+ },
45
+ "preference_kind": {
46
+ "correctness": 534,
47
+ "functional-style": 120
48
+ },
49
+ "origin": {
50
+ "designed": 411,
51
+ "functional-style": 120,
52
+ "handmade": 123
53
+ },
54
+ "weakness": {
55
+ "bin-bitwise": 6,
56
+ "bin-endian": 24,
57
+ "bin-signed": 21,
58
+ "bin-size-guard": 33,
59
+ "edge-empty": 42,
60
+ "enum-state": 99,
61
+ "err-swallow": 42,
62
+ "err-with-else": 15,
63
+ "ets-api": 6,
64
+ "fn-guard": 15,
65
+ "format-hygiene": 114,
66
+ "functional-style-agent-state": 40,
67
+ "functional-style-append-accumulator": 10,
68
+ "functional-style-manual-rebuild": 10,
69
+ "functional-style-multiple-passes": 10,
70
+ "functional-style-process-state": 40,
71
+ "functional-style-repeated-scan": 10,
72
+ "otp-cast-call": 15,
73
+ "otp-handle-info": 3,
74
+ "otp-supervision": 24,
75
+ "otp-task-await": 15,
76
+ "otp-timeout": 12,
77
+ "persistent-term": 9,
78
+ "protocol-behaviour": 21,
79
+ "stdlib-misuse": 18
80
+ }
81
+ },
82
+ {
83
+ "path": "data/kto/kto_v0.jsonl",
84
+ "source": "publish/hf/_stage/elixir-preference/data/kto/kto_v0.jsonl",
85
+ "rows": 76,
86
+ "sha256": "35737e168213360fb79cca7c1d577fba6b86a460919f4cfe898b642da7b7ee98",
87
+ "bytes": 75384,
88
+ "characters": 44173,
89
+ "fields": [
90
+ "completion",
91
+ "family",
92
+ "id",
93
+ "label",
94
+ "preference_kind",
95
+ "prompt",
96
+ "source",
97
+ "weakness"
98
+ ],
99
+ "families": {
100
+ "binaries": 10,
101
+ "core": 2,
102
+ "errors": 2,
103
+ "format": 2,
104
+ "functional": 40,
105
+ "otp": 12,
106
+ "protocol": 4,
107
+ "stdlib": 4
108
+ },
109
+ "pack_overlap": {
110
+ "elixir_eval_v1.jsonl": {
111
+ "prompt_collisions": 0,
112
+ "module_collisions": 0
113
+ },
114
+ "elixir_eval_v2.jsonl": {
115
+ "prompt_collisions": 0,
116
+ "module_collisions": 0
117
+ }
118
+ },
119
+ "preference_kind": {
120
+ "correctness": 36,
121
+ "functional-style": 40
122
+ },
123
+ "weakness": {
124
+ "bin-bitwise": 2,
125
+ "bin-signed": 2,
126
+ "bin-size-guard": 2,
127
+ "edge-absent-key": 2,
128
+ "edge-empty": 2,
129
+ "edge-nil-result": 2,
130
+ "enum-state": 2,
131
+ "err-with-else": 4,
132
+ "fn-guard": 2,
133
+ "format-hygiene": 2,
134
+ "functional-comprehension": 2,
135
+ "functional-early-halt": 2,
136
+ "functional-get-and-update": 2,
137
+ "functional-immutable-accumulator": 2,
138
+ "functional-iodata": 2,
139
+ "functional-lazy-stream": 2,
140
+ "functional-linear-recursion": 2,
141
+ "functional-nested-update": 2,
142
+ "functional-pattern-clauses": 2,
143
+ "functional-pipeline": 2,
144
+ "functional-pure-transition": 2,
145
+ "functional-reduce": 2,
146
+ "functional-set-operation": 2,
147
+ "functional-single-pass": 2,
148
+ "functional-state-threading": 2,
149
+ "functional-tagged-flow": 2,
150
+ "functional-unfold": 2,
151
+ "functional-zip-with": 2,
152
+ "otp-cast-call": 2,
153
+ "otp-handle-info": 2,
154
+ "otp-supervision": 2,
155
+ "otp-task-await": 2,
156
+ "otp-timeout": 2,
157
+ "protocol-behaviour": 4,
158
+ "stdlib-byte-vs-grapheme": 2,
159
+ "stdlib-safe-deserialization": 2
160
+ },
161
+ "label": {
162
+ "False": 38,
163
+ "True": 38
164
+ }
165
+ },
166
+ {
167
+ "path": "data/onpolicy/qwen25c3b_micro_dpo_v1.jsonl",
168
+ "source": "publish/hf/_stage/elixir-preference/data/onpolicy/qwen25c3b_micro_dpo_v1.jsonl",
169
+ "rows": 36,
170
+ "sha256": "07568a3a77ba0a9e9f2b1d434f373a10d7d953d0f2f13531037fe86a8221c83f",
171
+ "bytes": 57067,
172
+ "characters": 26322,
173
+ "fields": [
174
+ "chosen",
175
+ "conversations",
176
+ "family",
177
+ "id",
178
+ "models",
179
+ "origin",
180
+ "preference_kind",
181
+ "rejected",
182
+ "source",
183
+ "weakness"
184
+ ],
185
+ "families": {
186
+ "abstractions": 2,
187
+ "beam": 7,
188
+ "binaries": 9,
189
+ "collections": 3,
190
+ "core": 2,
191
+ "errors": 1,
192
+ "otp": 9,
193
+ "stdlib": 3
194
+ },
195
+ "pack_overlap": {
196
+ "elixir_eval_v1.jsonl": {
197
+ "prompt_collisions": 0,
198
+ "module_collisions": 0
199
+ },
200
+ "elixir_eval_v2.jsonl": {
201
+ "prompt_collisions": 0,
202
+ "module_collisions": 0
203
+ }
204
+ },
205
+ "preference_kind": {
206
+ "correctness": 36
207
+ },
208
+ "origin": {
209
+ "designed": 27,
210
+ "handmade": 9
211
+ },
212
+ "weakness": {
213
+ "bin-bitwise": 2,
214
+ "bin-endian": 2,
215
+ "bin-signed": 2,
216
+ "bin-size-guard": 2,
217
+ "edge-empty": 2,
218
+ "enum-state": 2,
219
+ "err-swallow": 2,
220
+ "err-with-else": 2,
221
+ "ets-api": 2,
222
+ "fn-guard": 2,
223
+ "format-hygiene": 2,
224
+ "otp-cast-call": 2,
225
+ "otp-supervision": 2,
226
+ "otp-task-await": 2,
227
+ "otp-timeout": 2,
228
+ "persistent-term": 2,
229
+ "protocol-behaviour": 2,
230
+ "stdlib-misuse": 2
231
+ }
232
+ },
233
+ {
234
+ "path": "data/onpolicy/qwen25c3b_micro_round2_dpo.jsonl",
235
+ "source": "publish/hf/_stage/elixir-preference/data/onpolicy/qwen25c3b_micro_round2_dpo.jsonl",
236
+ "rows": 25,
237
+ "sha256": "f119688017c19d217f5a009fac20f59b6a4da9905457b16d7190b02498a82cd8",
238
+ "bytes": 42058,
239
+ "characters": 19358,
240
+ "fields": [
241
+ "chosen",
242
+ "conversations",
243
+ "family",
244
+ "id",
245
+ "models",
246
+ "origin",
247
+ "preference_kind",
248
+ "rejected",
249
+ "source",
250
+ "weakness"
251
+ ],
252
+ "families": {
253
+ "abstractions": 3,
254
+ "beam": 3,
255
+ "binaries": 4,
256
+ "collections": 1,
257
+ "core": 2,
258
+ "errors": 4,
259
+ "otp": 6,
260
+ "stdlib": 2
261
+ },
262
+ "pack_overlap": {
263
+ "elixir_eval_v1.jsonl": {
264
+ "prompt_collisions": 0,
265
+ "module_collisions": 0
266
+ },
267
+ "elixir_eval_v2.jsonl": {
268
+ "prompt_collisions": 0,
269
+ "module_collisions": 0
270
+ }
271
+ },
272
+ "preference_kind": {
273
+ "correctness": 25
274
+ },
275
+ "origin": {
276
+ "designed": 19,
277
+ "handmade": 6
278
+ },
279
+ "weakness": {
280
+ "bin-size-guard": 3,
281
+ "edge-empty": 3,
282
+ "enum-state": 3,
283
+ "err-swallow": 3,
284
+ "err-with-else": 2,
285
+ "fn-guard": 1,
286
+ "otp-cast-call": 3,
287
+ "otp-supervision": 2,
288
+ "otp-task-await": 1,
289
+ "otp-timeout": 1,
290
+ "persistent-term": 1,
291
+ "protocol-behaviour": 1,
292
+ "stdlib-misuse": 1
293
+ }
294
+ },
295
+ {
296
+ "path": "data/onpolicy/qwen25c3b_micro_round4_dpo.jsonl",
297
+ "source": "publish/hf/_stage/elixir-preference/data/onpolicy/qwen25c3b_micro_round4_dpo.jsonl",
298
+ "rows": 11,
299
+ "sha256": "6f55c1192573313eb315e238e7f0e25f83f2581dd7aecc63833222c2aa6b6532",
300
+ "bytes": 17273,
301
+ "characters": 6953,
302
+ "fields": [
303
+ "chosen",
304
+ "conversations",
305
+ "family",
306
+ "id",
307
+ "models",
308
+ "origin",
309
+ "preference_kind",
310
+ "rejected",
311
+ "source",
312
+ "weakness"
313
+ ],
314
+ "families": {
315
+ "binaries": 1,
316
+ "collections": 1,
317
+ "errors": 1,
318
+ "functional": 6,
319
+ "otp": 1,
320
+ "stdlib": 1
321
+ },
322
+ "pack_overlap": {
323
+ "elixir_eval_v1.jsonl": {
324
+ "prompt_collisions": 0,
325
+ "module_collisions": 0
326
+ },
327
+ "elixir_eval_v2.jsonl": {
328
+ "prompt_collisions": 0,
329
+ "module_collisions": 0
330
+ }
331
+ },
332
+ "preference_kind": {
333
+ "correctness": 5,
334
+ "functional-style": 6
335
+ },
336
+ "origin": {
337
+ "designed": 4,
338
+ "functional-style": 6,
339
+ "handmade": 1
340
+ },
341
+ "weakness": {
342
+ "edge-empty": 2,
343
+ "enum-state": 2,
344
+ "err-swallow": 1,
345
+ "functional-style-agent-state": 2,
346
+ "functional-style-append-accumulator": 2,
347
+ "functional-style-process-state": 2
348
+ }
349
+ },
350
+ {
351
+ "path": "data/onpolicy/qwen25c3b_micro_round13_dpo.jsonl",
352
+ "source": "publish/hf/_stage/elixir-preference/data/onpolicy/qwen25c3b_micro_round13_dpo.jsonl",
353
+ "rows": 17,
354
+ "sha256": "36e22759596a2ea7dc39e5b8f92bf0a9cdbac628cd233535782e70c0630a8bd2",
355
+ "bytes": 25677,
356
+ "characters": 11000,
357
+ "fields": [
358
+ "chosen",
359
+ "conversations",
360
+ "family",
361
+ "id",
362
+ "models",
363
+ "origin",
364
+ "preference_kind",
365
+ "rejected",
366
+ "source",
367
+ "weakness"
368
+ ],
369
+ "families": {
370
+ "abstractions": 2,
371
+ "beam": 2,
372
+ "binaries": 2,
373
+ "collections": 2,
374
+ "core": 2,
375
+ "errors": 2,
376
+ "otp": 2,
377
+ "stdlib": 3
378
+ },
379
+ "pack_overlap": {
380
+ "elixir_eval_v1.jsonl": {
381
+ "prompt_collisions": 0,
382
+ "module_collisions": 0
383
+ },
384
+ "elixir_eval_v2.jsonl": {
385
+ "prompt_collisions": 0,
386
+ "module_collisions": 0
387
+ }
388
+ },
389
+ "preference_kind": {
390
+ "correctness": 17
391
+ },
392
+ "origin": {
393
+ "fresh-authored-round11-repacked": 17
394
+ },
395
+ "weakness": {
396
+ "behaviour-contract-arity": 1,
397
+ "date-diff-direction": 1,
398
+ "ets-tagged-lookup": 1,
399
+ "exact-big-endian-frame": 1,
400
+ "genserver-call-state": 1,
401
+ "inclusive-guard-boundary": 1,
402
+ "optional-callback-default": 1,
403
+ "pattern-match-empty-case": 1,
404
+ "process-timer-reference": 1,
405
+ "reduce-nil-maximum": 1,
406
+ "reduce-order-preservation": 1,
407
+ "regex-named-capture": 1,
408
+ "rescue-and-after": 1,
409
+ "sub-byte-bit-syntax": 1,
410
+ "supervised-task-await": 1,
411
+ "tagged-strict-parse": 1,
412
+ "uri-query-decoding": 1
413
+ }
414
+ },
415
+ {
416
+ "path": "data/onpolicy/qwen25c3b_micro_round3_kto.jsonl",
417
+ "source": "publish/hf/_stage/elixir-preference/data/onpolicy/qwen25c3b_micro_round3_kto.jsonl",
418
+ "rows": 34,
419
+ "sha256": "17642df15cc328fdf789f8491c73b4a3e0618920d967d1cc06c3cb6a8b59158c",
420
+ "bytes": 37855,
421
+ "characters": 20468,
422
+ "fields": [
423
+ "completion",
424
+ "family",
425
+ "id",
426
+ "label",
427
+ "models",
428
+ "origin",
429
+ "preference_kind",
430
+ "prompt",
431
+ "source",
432
+ "weakness"
433
+ ],
434
+ "families": {
435
+ "binaries": 10,
436
+ "core": 2,
437
+ "errors": 2,
438
+ "otp": 12,
439
+ "protocol": 4,
440
+ "stdlib": 4
441
+ },
442
+ "pack_overlap": {
443
+ "elixir_eval_v1.jsonl": {
444
+ "prompt_collisions": 0,
445
+ "module_collisions": 0
446
+ },
447
+ "elixir_eval_v2.jsonl": {
448
+ "prompt_collisions": 0,
449
+ "module_collisions": 0
450
+ }
451
+ },
452
+ "preference_kind": {
453
+ "correctness": 34
454
+ },
455
+ "origin": {
456
+ "None": 34
457
+ },
458
+ "weakness": {
459
+ "bin-bitwise": 2,
460
+ "bin-signed": 2,
461
+ "bin-size-guard": 2,
462
+ "edge-empty": 2,
463
+ "edge-nil-result": 2,
464
+ "enum-state": 2,
465
+ "err-with-else": 2,
466
+ "fn-guard": 2,
467
+ "otp-cast-call": 2,
468
+ "otp-handle-info": 2,
469
+ "otp-supervision": 2,
470
+ "otp-task-await": 2,
471
+ "otp-timeout": 2,
472
+ "protocol-behaviour": 4,
473
+ "stdlib-byte-vs-grapheme": 2,
474
+ "stdlib-safe-deserialization": 2
475
+ },
476
+ "label": {
477
+ "False": 17,
478
+ "True": 17
479
+ }
480
+ },
481
+ {
482
+ "path": "data/onpolicy/qwen25c3b_micro_round6_kto.jsonl",
483
+ "source": "publish/hf/_stage/elixir-preference/data/onpolicy/qwen25c3b_micro_round6_kto.jsonl",
484
+ "rows": 22,
485
+ "sha256": "dba0ce8fe08a964af7f9e56b90731229e5359bbca44be299879a9cb159e111b4",
486
+ "bytes": 27434,
487
+ "characters": 14549,
488
+ "fields": [
489
+ "completion",
490
+ "family",
491
+ "id",
492
+ "label",
493
+ "models",
494
+ "origin",
495
+ "preference_kind",
496
+ "prompt",
497
+ "source",
498
+ "weakness"
499
+ ],
500
+ "families": {
501
+ "binaries": 2,
502
+ "collections": 2,
503
+ "errors": 2,
504
+ "functional": 12,
505
+ "otp": 2,
506
+ "stdlib": 2
507
+ },
508
+ "pack_overlap": {
509
+ "elixir_eval_v1.jsonl": {
510
+ "prompt_collisions": 0,
511
+ "module_collisions": 0
512
+ },
513
+ "elixir_eval_v2.jsonl": {
514
+ "prompt_collisions": 0,
515
+ "module_collisions": 0
516
+ }
517
+ },
518
+ "preference_kind": {
519
+ "correctness": 10,
520
+ "functional-style": 12
521
+ },
522
+ "origin": {
523
+ "designed": 8,
524
+ "functional-style": 12,
525
+ "handmade": 2
526
+ },
527
+ "weakness": {
528
+ "edge-empty": 4,
529
+ "enum-state": 4,
530
+ "err-swallow": 2,
531
+ "functional-style-agent-state": 4,
532
+ "functional-style-append-accumulator": 4,
533
+ "functional-style-process-state": 4
534
+ },
535
+ "label": {
536
+ "False": 11,
537
+ "True": 11
538
+ }
539
+ },
540
+ {
541
+ "path": "data/onpolicy/qwen25c3b_micro_round11_kto.jsonl",
542
+ "source": "publish/hf/_stage/elixir-preference/data/onpolicy/qwen25c3b_micro_round11_kto.jsonl",
543
+ "rows": 34,
544
+ "sha256": "7c844c0e7107ba608bca9e2e92b5e010c3bdd8e15327f64437f437b1472f40d5",
545
+ "bytes": 39628,
546
+ "characters": 21397,
547
+ "fields": [
548
+ "completion",
549
+ "family",
550
+ "id",
551
+ "label",
552
+ "models",
553
+ "preference_kind",
554
+ "prompt",
555
+ "source",
556
+ "weakness"
557
+ ],
558
+ "families": {
559
+ "abstractions": 4,
560
+ "beam": 4,
561
+ "binaries": 4,
562
+ "collections": 4,
563
+ "core": 4,
564
+ "errors": 4,
565
+ "otp": 4,
566
+ "stdlib": 6
567
+ },
568
+ "pack_overlap": {
569
+ "elixir_eval_v1.jsonl": {
570
+ "prompt_collisions": 0,
571
+ "module_collisions": 0
572
+ },
573
+ "elixir_eval_v2.jsonl": {
574
+ "prompt_collisions": 0,
575
+ "module_collisions": 0
576
+ }
577
+ },
578
+ "preference_kind": {
579
+ "correctness": 34
580
+ },
581
+ "weakness": {
582
+ "behaviour-contract-arity": 2,
583
+ "date-diff-direction": 2,
584
+ "ets-tagged-lookup": 2,
585
+ "exact-big-endian-frame": 2,
586
+ "genserver-call-state": 2,
587
+ "inclusive-guard-boundary": 2,
588
+ "optional-callback-default": 2,
589
+ "pattern-match-empty-case": 2,
590
+ "process-timer-reference": 2,
591
+ "reduce-nil-maximum": 2,
592
+ "reduce-order-preservation": 2,
593
+ "regex-named-capture": 2,
594
+ "rescue-and-after": 2,
595
+ "sub-byte-bit-syntax": 2,
596
+ "supervised-task-await": 2,
597
+ "tagged-strict-parse": 2,
598
+ "uri-query-decoding": 2
599
+ },
600
+ "label": {
601
+ "False": 17,
602
+ "True": 17
603
+ }
604
+ }
605
+ ]
606
+ }
metadata/manifests/qwen25c3b_micro_dpo_v1.manifest.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "recipe": "qwen25c3b-micro-dpo-v1",
3
+ "base_checkpoint": "outputs/continue/qwen25c3b-sft2-final",
4
+ "frozen_pack": "eval/pack/elixir_eval_v1.jsonl",
5
+ "source": "sft/elixir_dpo_failv0.jsonl",
6
+ "source_sha256": "f27eb2c2ffcbea068ef03ad4c1c116e2b91cd5f5c60d01e107cd00e188ddc043",
7
+ "selection": "two unique normalized prompts per abstract weakness; no benchmark task rows",
8
+ "validation": {
9
+ "rows": 36,
10
+ "weaknesses": {
11
+ "otp-supervision": 2,
12
+ "edge-empty": 2,
13
+ "format-hygiene": 2,
14
+ "err-swallow": 2,
15
+ "enum-state": 2,
16
+ "persistent-term": 2,
17
+ "protocol-behaviour": 2,
18
+ "ets-api": 2,
19
+ "fn-guard": 2,
20
+ "bin-size-guard": 2,
21
+ "stdlib-misuse": 2,
22
+ "bin-signed": 2,
23
+ "otp-task-await": 2,
24
+ "otp-cast-call": 2,
25
+ "bin-endian": 2,
26
+ "err-with-else": 2,
27
+ "otp-timeout": 2,
28
+ "bin-bitwise": 2
29
+ },
30
+ "pack_prompt_collisions": 0,
31
+ "pack_module_collisions": 0
32
+ }
33
+ }
metadata/manifests/qwen25c3b_micro_round11.manifest.json ADDED
@@ -0,0 +1,625 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "recipe": "qwen25c3b_micro_round11_kto",
3
+ "backend": "unsloth",
4
+ "base_checkpoint": "outputs/continue/qwen25c3b-micro-round3-kto/qwen25c3b-targeted-kto-final",
5
+ "phases": [
6
+ "kto"
7
+ ],
8
+ "no_cpt": true,
9
+ "selection": {
10
+ "source": "17 fresh authored generic construction contracts",
11
+ "benchmark_rows": "none; fresh prompts and module names authored independently",
12
+ "preference_signal": "semantic test failure only; formatting is identical Elixir fencing"
13
+ },
14
+ "frozen_pack": "eval/pack/elixir_eval_v1.jsonl",
15
+ "counts": {
16
+ "rows": 34,
17
+ "pairs": 17,
18
+ "labels": {
19
+ "true": 17,
20
+ "false": 17
21
+ },
22
+ "by_family": {
23
+ "core": 4,
24
+ "collections": 4,
25
+ "binaries": 4,
26
+ "errors": 4,
27
+ "otp": 4,
28
+ "beam": 4,
29
+ "abstractions": 4,
30
+ "stdlib": 6
31
+ },
32
+ "by_weakness": {
33
+ "pattern-match-empty-case": 2,
34
+ "inclusive-guard-boundary": 2,
35
+ "reduce-nil-maximum": 2,
36
+ "reduce-order-preservation": 2,
37
+ "exact-big-endian-frame": 2,
38
+ "sub-byte-bit-syntax": 2,
39
+ "tagged-strict-parse": 2,
40
+ "rescue-and-after": 2,
41
+ "genserver-call-state": 2,
42
+ "supervised-task-await": 2,
43
+ "ets-tagged-lookup": 2,
44
+ "process-timer-reference": 2,
45
+ "behaviour-contract-arity": 2,
46
+ "optional-callback-default": 2,
47
+ "uri-query-decoding": 2,
48
+ "regex-named-capture": 2,
49
+ "date-diff-direction": 2
50
+ }
51
+ },
52
+ "validation": {
53
+ "pairs": 17,
54
+ "rows": 34,
55
+ "pack_prompt_collisions": 0,
56
+ "pack_module_collisions": 0,
57
+ "scorer_checks": [
58
+ {
59
+ "id": "core.head_or_fallback",
60
+ "chosen": {
61
+ "compile_ok": true,
62
+ "error": "",
63
+ "failures": 0,
64
+ "format_ok": true,
65
+ "parse_ok": true,
66
+ "pass": true,
67
+ "static_failures": [],
68
+ "static_ok": true,
69
+ "timeout": false,
70
+ "total": 1,
71
+ "warning_count": 0,
72
+ "warning_free": true,
73
+ "output_format_ok": true
74
+ },
75
+ "rejected": {
76
+ "compile_ok": true,
77
+ "error": "",
78
+ "failures": 1,
79
+ "format_ok": true,
80
+ "parse_ok": true,
81
+ "pass": false,
82
+ "static_failures": [],
83
+ "static_ok": true,
84
+ "timeout": false,
85
+ "total": 1,
86
+ "warning_count": 0,
87
+ "warning_free": true,
88
+ "output_format_ok": true
89
+ }
90
+ },
91
+ {
92
+ "id": "core.guard_window",
93
+ "chosen": {
94
+ "compile_ok": true,
95
+ "error": "",
96
+ "failures": 0,
97
+ "format_ok": true,
98
+ "parse_ok": true,
99
+ "pass": true,
100
+ "static_failures": [],
101
+ "static_ok": true,
102
+ "timeout": false,
103
+ "total": 1,
104
+ "warning_count": 0,
105
+ "warning_free": true,
106
+ "output_format_ok": true
107
+ },
108
+ "rejected": {
109
+ "compile_ok": true,
110
+ "error": "",
111
+ "failures": 1,
112
+ "format_ok": true,
113
+ "parse_ok": true,
114
+ "pass": false,
115
+ "static_failures": [],
116
+ "static_ok": true,
117
+ "timeout": false,
118
+ "total": 1,
119
+ "warning_count": 0,
120
+ "warning_free": true,
121
+ "output_format_ok": true
122
+ }
123
+ },
124
+ {
125
+ "id": "collections.reduce_summary",
126
+ "chosen": {
127
+ "compile_ok": true,
128
+ "error": "",
129
+ "failures": 0,
130
+ "format_ok": true,
131
+ "parse_ok": true,
132
+ "pass": true,
133
+ "static_failures": [],
134
+ "static_ok": true,
135
+ "timeout": false,
136
+ "total": 1,
137
+ "warning_count": 0,
138
+ "warning_free": true,
139
+ "output_format_ok": true
140
+ },
141
+ "rejected": {
142
+ "compile_ok": true,
143
+ "error": "",
144
+ "failures": 1,
145
+ "format_ok": true,
146
+ "parse_ok": true,
147
+ "pass": false,
148
+ "static_failures": [],
149
+ "static_ok": true,
150
+ "timeout": false,
151
+ "total": 1,
152
+ "warning_count": 0,
153
+ "warning_free": true,
154
+ "output_format_ok": true
155
+ }
156
+ },
157
+ {
158
+ "id": "collections.partition_order",
159
+ "chosen": {
160
+ "compile_ok": true,
161
+ "error": "",
162
+ "failures": 0,
163
+ "format_ok": true,
164
+ "parse_ok": true,
165
+ "pass": true,
166
+ "static_failures": [],
167
+ "static_ok": true,
168
+ "timeout": false,
169
+ "total": 1,
170
+ "warning_count": 0,
171
+ "warning_free": true,
172
+ "output_format_ok": true
173
+ },
174
+ "rejected": {
175
+ "compile_ok": true,
176
+ "error": "",
177
+ "failures": 1,
178
+ "format_ok": true,
179
+ "parse_ok": true,
180
+ "pass": false,
181
+ "static_failures": [],
182
+ "static_ok": true,
183
+ "timeout": false,
184
+ "total": 1,
185
+ "warning_count": 0,
186
+ "warning_free": true,
187
+ "output_format_ok": true
188
+ }
189
+ },
190
+ {
191
+ "id": "binaries.big_frame",
192
+ "chosen": {
193
+ "compile_ok": true,
194
+ "error": "",
195
+ "failures": 0,
196
+ "format_ok": true,
197
+ "parse_ok": true,
198
+ "pass": true,
199
+ "static_failures": [],
200
+ "static_ok": true,
201
+ "timeout": false,
202
+ "total": 1,
203
+ "warning_count": 0,
204
+ "warning_free": true,
205
+ "output_format_ok": true
206
+ },
207
+ "rejected": {
208
+ "compile_ok": true,
209
+ "error": "",
210
+ "failures": 1,
211
+ "format_ok": true,
212
+ "parse_ok": true,
213
+ "pass": false,
214
+ "static_failures": [],
215
+ "static_ok": true,
216
+ "timeout": false,
217
+ "total": 1,
218
+ "warning_count": 0,
219
+ "warning_free": true,
220
+ "output_format_ok": true
221
+ }
222
+ },
223
+ {
224
+ "id": "binaries.nibble_pair",
225
+ "chosen": {
226
+ "compile_ok": true,
227
+ "error": "",
228
+ "failures": 0,
229
+ "format_ok": true,
230
+ "parse_ok": true,
231
+ "pass": true,
232
+ "static_failures": [],
233
+ "static_ok": true,
234
+ "timeout": false,
235
+ "total": 1,
236
+ "warning_count": 0,
237
+ "warning_free": true,
238
+ "output_format_ok": true
239
+ },
240
+ "rejected": {
241
+ "compile_ok": true,
242
+ "error": "",
243
+ "failures": 1,
244
+ "format_ok": true,
245
+ "parse_ok": true,
246
+ "pass": false,
247
+ "static_failures": [],
248
+ "static_ok": true,
249
+ "timeout": false,
250
+ "total": 1,
251
+ "warning_count": 0,
252
+ "warning_free": true,
253
+ "output_format_ok": true
254
+ }
255
+ },
256
+ {
257
+ "id": "errors.strict_number",
258
+ "chosen": {
259
+ "compile_ok": true,
260
+ "error": "",
261
+ "failures": 0,
262
+ "format_ok": true,
263
+ "parse_ok": true,
264
+ "pass": true,
265
+ "static_failures": [],
266
+ "static_ok": true,
267
+ "timeout": false,
268
+ "total": 1,
269
+ "warning_count": 0,
270
+ "warning_free": true,
271
+ "output_format_ok": true
272
+ },
273
+ "rejected": {
274
+ "compile_ok": true,
275
+ "error": "",
276
+ "failures": 1,
277
+ "format_ok": true,
278
+ "parse_ok": true,
279
+ "pass": false,
280
+ "static_failures": [],
281
+ "static_ok": true,
282
+ "timeout": false,
283
+ "total": 1,
284
+ "warning_count": 0,
285
+ "warning_free": true,
286
+ "output_format_ok": true
287
+ }
288
+ },
289
+ {
290
+ "id": "errors.rescue_cleanup",
291
+ "chosen": {
292
+ "compile_ok": true,
293
+ "error": "",
294
+ "failures": 0,
295
+ "format_ok": true,
296
+ "parse_ok": true,
297
+ "pass": true,
298
+ "static_failures": [],
299
+ "static_ok": true,
300
+ "timeout": false,
301
+ "total": 1,
302
+ "warning_count": 0,
303
+ "warning_free": true,
304
+ "output_format_ok": true
305
+ },
306
+ "rejected": {
307
+ "compile_ok": true,
308
+ "error": "",
309
+ "failures": 1,
310
+ "format_ok": true,
311
+ "parse_ok": true,
312
+ "pass": false,
313
+ "static_failures": [],
314
+ "static_ok": true,
315
+ "timeout": false,
316
+ "total": 1,
317
+ "warning_count": 0,
318
+ "warning_free": true,
319
+ "output_format_ok": true
320
+ }
321
+ },
322
+ {
323
+ "id": "otp.mailbox",
324
+ "chosen": {
325
+ "compile_ok": true,
326
+ "error": "",
327
+ "failures": 0,
328
+ "format_ok": true,
329
+ "parse_ok": true,
330
+ "pass": true,
331
+ "static_failures": [],
332
+ "static_ok": true,
333
+ "timeout": false,
334
+ "total": 1,
335
+ "warning_count": 0,
336
+ "warning_free": true,
337
+ "output_format_ok": true
338
+ },
339
+ "rejected": {
340
+ "compile_ok": true,
341
+ "error": "",
342
+ "failures": 1,
343
+ "format_ok": true,
344
+ "parse_ok": true,
345
+ "pass": false,
346
+ "static_failures": [],
347
+ "static_ok": true,
348
+ "timeout": false,
349
+ "total": 1,
350
+ "warning_count": 0,
351
+ "warning_free": true,
352
+ "output_format_ok": true
353
+ }
354
+ },
355
+ {
356
+ "id": "otp.supervised_map",
357
+ "chosen": {
358
+ "compile_ok": true,
359
+ "error": "",
360
+ "failures": 0,
361
+ "format_ok": true,
362
+ "parse_ok": true,
363
+ "pass": true,
364
+ "static_failures": [],
365
+ "static_ok": true,
366
+ "timeout": false,
367
+ "total": 1,
368
+ "warning_count": 0,
369
+ "warning_free": true,
370
+ "output_format_ok": true
371
+ },
372
+ "rejected": {
373
+ "compile_ok": true,
374
+ "error": "",
375
+ "failures": 1,
376
+ "format_ok": true,
377
+ "parse_ok": true,
378
+ "pass": false,
379
+ "static_failures": [],
380
+ "static_ok": true,
381
+ "timeout": false,
382
+ "total": 1,
383
+ "warning_count": 0,
384
+ "warning_free": true,
385
+ "output_format_ok": true
386
+ }
387
+ },
388
+ {
389
+ "id": "beam.ets_fetch",
390
+ "chosen": {
391
+ "compile_ok": true,
392
+ "error": "",
393
+ "failures": 0,
394
+ "format_ok": true,
395
+ "parse_ok": true,
396
+ "pass": true,
397
+ "static_failures": [],
398
+ "static_ok": true,
399
+ "timeout": false,
400
+ "total": 1,
401
+ "warning_count": 0,
402
+ "warning_free": true,
403
+ "output_format_ok": true
404
+ },
405
+ "rejected": {
406
+ "compile_ok": true,
407
+ "error": "",
408
+ "failures": 1,
409
+ "format_ok": true,
410
+ "parse_ok": true,
411
+ "pass": false,
412
+ "static_failures": [],
413
+ "static_ok": true,
414
+ "timeout": false,
415
+ "total": 1,
416
+ "warning_count": 0,
417
+ "warning_free": true,
418
+ "output_format_ok": true
419
+ }
420
+ },
421
+ {
422
+ "id": "beam.ref_timer",
423
+ "chosen": {
424
+ "compile_ok": true,
425
+ "error": "",
426
+ "failures": 0,
427
+ "format_ok": true,
428
+ "parse_ok": true,
429
+ "pass": true,
430
+ "static_failures": [],
431
+ "static_ok": true,
432
+ "timeout": false,
433
+ "total": 1,
434
+ "warning_count": 0,
435
+ "warning_free": true,
436
+ "output_format_ok": true
437
+ },
438
+ "rejected": {
439
+ "compile_ok": true,
440
+ "error": "",
441
+ "failures": 1,
442
+ "format_ok": true,
443
+ "parse_ok": true,
444
+ "pass": false,
445
+ "static_failures": [],
446
+ "static_ok": true,
447
+ "timeout": false,
448
+ "total": 1,
449
+ "warning_count": 0,
450
+ "warning_free": true,
451
+ "output_format_ok": true
452
+ }
453
+ },
454
+ {
455
+ "id": "abstractions.contract_call",
456
+ "chosen": {
457
+ "compile_ok": true,
458
+ "error": "",
459
+ "failures": 0,
460
+ "format_ok": true,
461
+ "parse_ok": true,
462
+ "pass": true,
463
+ "static_failures": [],
464
+ "static_ok": true,
465
+ "timeout": false,
466
+ "total": 1,
467
+ "warning_count": 0,
468
+ "warning_free": true,
469
+ "output_format_ok": true
470
+ },
471
+ "rejected": {
472
+ "compile_ok": true,
473
+ "error": "",
474
+ "failures": 1,
475
+ "format_ok": true,
476
+ "parse_ok": true,
477
+ "pass": false,
478
+ "static_failures": [],
479
+ "static_ok": true,
480
+ "timeout": false,
481
+ "total": 1,
482
+ "warning_count": 0,
483
+ "warning_free": true,
484
+ "output_format_ok": true
485
+ }
486
+ },
487
+ {
488
+ "id": "abstractions.optional_callback",
489
+ "chosen": {
490
+ "compile_ok": true,
491
+ "error": "",
492
+ "failures": 0,
493
+ "format_ok": true,
494
+ "parse_ok": true,
495
+ "pass": true,
496
+ "static_failures": [],
497
+ "static_ok": true,
498
+ "timeout": false,
499
+ "total": 1,
500
+ "warning_count": 0,
501
+ "warning_free": true,
502
+ "output_format_ok": true
503
+ },
504
+ "rejected": {
505
+ "compile_ok": true,
506
+ "error": "",
507
+ "failures": 1,
508
+ "format_ok": true,
509
+ "parse_ok": true,
510
+ "pass": false,
511
+ "static_failures": [],
512
+ "static_ok": true,
513
+ "timeout": false,
514
+ "total": 1,
515
+ "warning_count": 0,
516
+ "warning_free": true,
517
+ "output_format_ok": true
518
+ }
519
+ },
520
+ {
521
+ "id": "stdlib.query_map",
522
+ "chosen": {
523
+ "compile_ok": true,
524
+ "error": "",
525
+ "failures": 0,
526
+ "format_ok": true,
527
+ "parse_ok": true,
528
+ "pass": true,
529
+ "static_failures": [],
530
+ "static_ok": true,
531
+ "timeout": false,
532
+ "total": 1,
533
+ "warning_count": 0,
534
+ "warning_free": true,
535
+ "output_format_ok": true
536
+ },
537
+ "rejected": {
538
+ "compile_ok": true,
539
+ "error": "",
540
+ "failures": 1,
541
+ "format_ok": true,
542
+ "parse_ok": true,
543
+ "pass": false,
544
+ "static_failures": [],
545
+ "static_ok": true,
546
+ "timeout": false,
547
+ "total": 1,
548
+ "warning_count": 0,
549
+ "warning_free": true,
550
+ "output_format_ok": true
551
+ }
552
+ },
553
+ {
554
+ "id": "stdlib.named_capture",
555
+ "chosen": {
556
+ "compile_ok": true,
557
+ "error": "",
558
+ "failures": 0,
559
+ "format_ok": true,
560
+ "parse_ok": true,
561
+ "pass": true,
562
+ "static_failures": [],
563
+ "static_ok": true,
564
+ "timeout": false,
565
+ "total": 1,
566
+ "warning_count": 0,
567
+ "warning_free": true,
568
+ "output_format_ok": true
569
+ },
570
+ "rejected": {
571
+ "compile_ok": true,
572
+ "error": "",
573
+ "failures": 1,
574
+ "format_ok": true,
575
+ "parse_ok": true,
576
+ "pass": false,
577
+ "static_failures": [],
578
+ "static_ok": true,
579
+ "timeout": false,
580
+ "total": 1,
581
+ "warning_count": 0,
582
+ "warning_free": true,
583
+ "output_format_ok": true
584
+ }
585
+ },
586
+ {
587
+ "id": "stdlib.date_delta",
588
+ "chosen": {
589
+ "compile_ok": true,
590
+ "error": "",
591
+ "failures": 0,
592
+ "format_ok": true,
593
+ "parse_ok": true,
594
+ "pass": true,
595
+ "static_failures": [],
596
+ "static_ok": true,
597
+ "timeout": false,
598
+ "total": 1,
599
+ "warning_count": 0,
600
+ "warning_free": true,
601
+ "output_format_ok": true
602
+ },
603
+ "rejected": {
604
+ "compile_ok": true,
605
+ "error": "",
606
+ "failures": 1,
607
+ "format_ok": true,
608
+ "parse_ok": true,
609
+ "pass": false,
610
+ "static_failures": [],
611
+ "static_ok": true,
612
+ "timeout": false,
613
+ "total": 1,
614
+ "warning_count": 0,
615
+ "warning_free": true,
616
+ "output_format_ok": true
617
+ }
618
+ }
619
+ ]
620
+ },
621
+ "sha256": {
622
+ "pack": "945f41d2f09b3cd4e3a483837f0225d05737be0aa5554a2e0e8eb7cb011d1f05",
623
+ "output": "7c844c0e7107ba608bca9e2e92b5e010c3bdd8e15327f64437f437b1472f40d5"
624
+ }
625
+ }
metadata/manifests/qwen25c3b_micro_round13.manifest.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "recipe": "qwen25c3b_micro_round13_dpo",
3
+ "backend": "unsloth",
4
+ "base_checkpoint": "outputs/continue/qwen25c3b-micro-round3-kto/qwen25c3b-targeted-kto-final",
5
+ "phases": [
6
+ "dpo"
7
+ ],
8
+ "no_cpt": true,
9
+ "source": "kto/qwen25c3b_micro_round11_kto.jsonl",
10
+ "source_manifest": "kto/qwen25c3b_micro_round11.manifest.json",
11
+ "frozen_pack": "eval/pack/elixir_eval_v1.jsonl",
12
+ "selection": "same 17 fresh authored contracts as round 11; KTO sides repacked as DPO pairs",
13
+ "counts": {
14
+ "rows": 17,
15
+ "pairs": 17,
16
+ "pack_prompt_collisions": 0,
17
+ "pack_module_collisions": 0,
18
+ "by_family": {
19
+ "abstractions": 2,
20
+ "beam": 2,
21
+ "binaries": 2,
22
+ "collections": 2,
23
+ "core": 2,
24
+ "errors": 2,
25
+ "otp": 2,
26
+ "stdlib": 3
27
+ }
28
+ },
29
+ "sha256": {
30
+ "source": "7c844c0e7107ba608bca9e2e92b5e010c3bdd8e15327f64437f437b1472f40d5",
31
+ "output": "36e22759596a2ea7dc39e5b8f92bf0a9cdbac628cd233535782e70c0630a8bd2",
32
+ "pack": "945f41d2f09b3cd4e3a483837f0225d05737be0aa5554a2e0e8eb7cb011d1f05"
33
+ }
34
+ }
metadata/manifests/qwen25c3b_micro_round2.manifest.json ADDED
@@ -0,0 +1,898 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "recipe": "qwen25c3b_micro_round2_sft_dpo",
3
+ "backend": "unsloth",
4
+ "base_checkpoint": "outputs/continue/qwen25c3b-micro-v1-dpo/qwen25c3b-targeted-dpo-final",
5
+ "phases": [
6
+ "sft",
7
+ "dpo"
8
+ ],
9
+ "no_cpt": true,
10
+ "selection": {
11
+ "sft": "six fresh normalized prompts per benchmark family from evalfmt_v0",
12
+ "dpo": "up to three fresh scorer-gated prompts per construction weakness; format-only pairs excluded",
13
+ "benchmark_rows": "never selected; prompt and module collisions rejected"
14
+ },
15
+ "sources": {
16
+ "sft": "sft/elixir_sft_evalfmt_v0.jsonl",
17
+ "dpo": "sft/elixir_dpo_failv0.jsonl",
18
+ "previous_dpo": "sft/qwen25c3b_micro_dpo_v1.jsonl",
19
+ "frozen_pack": "eval/pack/elixir_eval_v1.jsonl"
20
+ },
21
+ "counts": {
22
+ "sft": 48,
23
+ "dpo": 25,
24
+ "sft_by_family": {
25
+ "core": 6,
26
+ "collections": 6,
27
+ "errors": 6,
28
+ "binaries": 6,
29
+ "otp": 6,
30
+ "beam": 6,
31
+ "abstractions": 6,
32
+ "stdlib": 6
33
+ },
34
+ "dpo_by_weakness": {
35
+ "enum-state": 3,
36
+ "edge-empty": 3,
37
+ "err-swallow": 3,
38
+ "err-with-else": 2,
39
+ "bin-size-guard": 3,
40
+ "fn-guard": 1,
41
+ "persistent-term": 1,
42
+ "otp-cast-call": 3,
43
+ "otp-task-await": 1,
44
+ "otp-timeout": 1,
45
+ "otp-supervision": 2,
46
+ "protocol-behaviour": 1,
47
+ "stdlib-misuse": 1
48
+ }
49
+ },
50
+ "validation": {
51
+ "pack_prompt_collisions": 0,
52
+ "pack_module_collisions": 0,
53
+ "dpo": {
54
+ "rows": 25,
55
+ "scorer_checks": [
56
+ {
57
+ "id": "dpo.abstractions.facade.enum-state",
58
+ "chosen": {
59
+ "compile_ok": true,
60
+ "error": "",
61
+ "failures": 0,
62
+ "format_ok": true,
63
+ "parse_ok": true,
64
+ "pass": true,
65
+ "static_failures": [],
66
+ "static_ok": true,
67
+ "timeout": false,
68
+ "total": 1,
69
+ "warning_count": 0,
70
+ "warning_free": true,
71
+ "output_format_ok": true
72
+ },
73
+ "rejected": {
74
+ "compile_ok": true,
75
+ "error": "",
76
+ "failures": 1,
77
+ "format_ok": true,
78
+ "parse_ok": true,
79
+ "pass": false,
80
+ "static_failures": [],
81
+ "static_ok": true,
82
+ "timeout": false,
83
+ "total": 1,
84
+ "warning_count": 2,
85
+ "warning_free": false,
86
+ "output_format_ok": true
87
+ }
88
+ },
89
+ {
90
+ "id": "dpo.abstractions.overridable.v2.enum-state",
91
+ "chosen": {
92
+ "compile_ok": true,
93
+ "error": "",
94
+ "failures": 0,
95
+ "format_ok": true,
96
+ "parse_ok": true,
97
+ "pass": true,
98
+ "static_failures": [],
99
+ "static_ok": true,
100
+ "timeout": false,
101
+ "total": 1,
102
+ "warning_count": 0,
103
+ "warning_free": true,
104
+ "output_format_ok": true
105
+ },
106
+ "rejected": {
107
+ "compile_ok": false,
108
+ "error": "generated.ex: cannot compile module StepDemo (errors have been logged)",
109
+ "failures": 0,
110
+ "format_ok": true,
111
+ "parse_ok": true,
112
+ "pass": false,
113
+ "static_failures": [],
114
+ "static_ok": true,
115
+ "timeout": false,
116
+ "total": 0,
117
+ "warning_count": 0,
118
+ "warning_free": false,
119
+ "output_format_ok": true
120
+ }
121
+ },
122
+ {
123
+ "id": "dpo.core.tuplerotate.v3.enum-state",
124
+ "chosen": {
125
+ "compile_ok": true,
126
+ "error": "",
127
+ "failures": 0,
128
+ "format_ok": true,
129
+ "parse_ok": true,
130
+ "pass": true,
131
+ "static_failures": [],
132
+ "static_ok": true,
133
+ "timeout": false,
134
+ "total": 1,
135
+ "warning_count": 0,
136
+ "warning_free": true,
137
+ "output_format_ok": true
138
+ },
139
+ "rejected": {
140
+ "compile_ok": true,
141
+ "error": "",
142
+ "failures": 1,
143
+ "format_ok": true,
144
+ "parse_ok": true,
145
+ "pass": false,
146
+ "static_failures": [],
147
+ "static_ok": true,
148
+ "timeout": false,
149
+ "total": 1,
150
+ "warning_count": 1,
151
+ "warning_free": false,
152
+ "output_format_ok": true
153
+ }
154
+ },
155
+ {
156
+ "id": "dpo.core.poppath.v2.edge-empty",
157
+ "chosen": {
158
+ "compile_ok": true,
159
+ "error": "",
160
+ "failures": 0,
161
+ "format_ok": true,
162
+ "parse_ok": true,
163
+ "pass": true,
164
+ "static_failures": [],
165
+ "static_ok": true,
166
+ "timeout": false,
167
+ "total": 1,
168
+ "warning_count": 0,
169
+ "warning_free": true,
170
+ "output_format_ok": true
171
+ },
172
+ "rejected": {
173
+ "compile_ok": true,
174
+ "error": "",
175
+ "failures": 1,
176
+ "format_ok": true,
177
+ "parse_ok": true,
178
+ "pass": false,
179
+ "static_failures": [],
180
+ "static_ok": true,
181
+ "timeout": false,
182
+ "total": 1,
183
+ "warning_count": 0,
184
+ "warning_free": true,
185
+ "output_format_ok": true
186
+ }
187
+ },
188
+ {
189
+ "id": "dpo.collections.firstrerun.v3.edge-empty",
190
+ "chosen": {
191
+ "compile_ok": true,
192
+ "error": "",
193
+ "failures": 0,
194
+ "format_ok": true,
195
+ "parse_ok": true,
196
+ "pass": true,
197
+ "static_failures": [],
198
+ "static_ok": true,
199
+ "timeout": false,
200
+ "total": 1,
201
+ "warning_count": 0,
202
+ "warning_free": true,
203
+ "output_format_ok": true
204
+ },
205
+ "rejected": {
206
+ "compile_ok": true,
207
+ "error": "",
208
+ "failures": 1,
209
+ "format_ok": true,
210
+ "parse_ok": true,
211
+ "pass": false,
212
+ "static_failures": [],
213
+ "static_ok": true,
214
+ "timeout": false,
215
+ "total": 1,
216
+ "warning_count": 1,
217
+ "warning_free": false,
218
+ "output_format_ok": true
219
+ }
220
+ },
221
+ {
222
+ "id": "dpo.stdlib.bizdays.v3.edge-empty",
223
+ "chosen": {
224
+ "compile_ok": true,
225
+ "error": "",
226
+ "failures": 0,
227
+ "format_ok": true,
228
+ "parse_ok": true,
229
+ "pass": true,
230
+ "static_failures": [],
231
+ "static_ok": true,
232
+ "timeout": false,
233
+ "total": 1,
234
+ "warning_count": 0,
235
+ "warning_free": true,
236
+ "output_format_ok": true
237
+ },
238
+ "rejected": {
239
+ "compile_ok": true,
240
+ "error": "",
241
+ "failures": 1,
242
+ "format_ok": true,
243
+ "parse_ok": true,
244
+ "pass": false,
245
+ "static_failures": [],
246
+ "static_ok": true,
247
+ "timeout": false,
248
+ "total": 1,
249
+ "warning_count": 1,
250
+ "warning_free": false,
251
+ "output_format_ok": true
252
+ }
253
+ },
254
+ {
255
+ "id": "dpo.errors.catchtag.v3.err-swallow",
256
+ "chosen": {
257
+ "compile_ok": true,
258
+ "error": "",
259
+ "failures": 0,
260
+ "format_ok": true,
261
+ "parse_ok": true,
262
+ "pass": true,
263
+ "static_failures": [],
264
+ "static_ok": true,
265
+ "timeout": false,
266
+ "total": 1,
267
+ "warning_count": 0,
268
+ "warning_free": true,
269
+ "output_format_ok": true
270
+ },
271
+ "rejected": {
272
+ "compile_ok": false,
273
+ "error": "generated.ex: cannot compile module CatchKind03 (errors have been logged)",
274
+ "failures": 0,
275
+ "format_ok": true,
276
+ "parse_ok": true,
277
+ "pass": false,
278
+ "static_failures": [],
279
+ "static_ok": true,
280
+ "timeout": false,
281
+ "total": 0,
282
+ "warning_count": 0,
283
+ "warning_free": false,
284
+ "output_format_ok": true
285
+ }
286
+ },
287
+ {
288
+ "id": "dpo.errors.mapresults.err-swallow",
289
+ "chosen": {
290
+ "compile_ok": true,
291
+ "error": "",
292
+ "failures": 0,
293
+ "format_ok": true,
294
+ "parse_ok": true,
295
+ "pass": true,
296
+ "static_failures": [],
297
+ "static_ok": true,
298
+ "timeout": false,
299
+ "total": 1,
300
+ "warning_count": 0,
301
+ "warning_free": true,
302
+ "output_format_ok": true
303
+ },
304
+ "rejected": {
305
+ "compile_ok": true,
306
+ "error": "",
307
+ "failures": 1,
308
+ "format_ok": true,
309
+ "parse_ok": true,
310
+ "pass": false,
311
+ "static_failures": [],
312
+ "static_ok": true,
313
+ "timeout": false,
314
+ "total": 1,
315
+ "warning_count": 0,
316
+ "warning_free": true,
317
+ "output_format_ok": true
318
+ }
319
+ },
320
+ {
321
+ "id": "dpo.binaries.mpxframe.v2.err-swallow",
322
+ "chosen": {
323
+ "compile_ok": true,
324
+ "error": "",
325
+ "failures": 0,
326
+ "format_ok": true,
327
+ "parse_ok": true,
328
+ "pass": true,
329
+ "static_failures": [],
330
+ "static_ok": true,
331
+ "timeout": false,
332
+ "total": 1,
333
+ "warning_count": 0,
334
+ "warning_free": true,
335
+ "output_format_ok": true
336
+ },
337
+ "rejected": {
338
+ "compile_ok": true,
339
+ "error": "",
340
+ "failures": 1,
341
+ "format_ok": true,
342
+ "parse_ok": true,
343
+ "pass": false,
344
+ "static_failures": [],
345
+ "static_ok": true,
346
+ "timeout": false,
347
+ "total": 1,
348
+ "warning_count": 0,
349
+ "warning_free": true,
350
+ "output_format_ok": true
351
+ }
352
+ },
353
+ {
354
+ "id": "dpo.errors.safecleanup.v3.err-with-else",
355
+ "chosen": {
356
+ "compile_ok": true,
357
+ "error": "",
358
+ "failures": 0,
359
+ "format_ok": true,
360
+ "parse_ok": true,
361
+ "pass": true,
362
+ "static_failures": [],
363
+ "static_ok": true,
364
+ "timeout": false,
365
+ "total": 1,
366
+ "warning_count": 0,
367
+ "warning_free": true,
368
+ "output_format_ok": true
369
+ },
370
+ "rejected": {
371
+ "compile_ok": true,
372
+ "error": "",
373
+ "failures": 1,
374
+ "format_ok": true,
375
+ "parse_ok": true,
376
+ "pass": false,
377
+ "static_failures": [],
378
+ "static_ok": true,
379
+ "timeout": false,
380
+ "total": 1,
381
+ "warning_count": 0,
382
+ "warning_free": true,
383
+ "output_format_ok": true
384
+ }
385
+ },
386
+ {
387
+ "id": "dpo.errors.gradeof.err-with-else",
388
+ "chosen": {
389
+ "compile_ok": true,
390
+ "error": "",
391
+ "failures": 0,
392
+ "format_ok": true,
393
+ "parse_ok": true,
394
+ "pass": true,
395
+ "static_failures": [],
396
+ "static_ok": true,
397
+ "timeout": false,
398
+ "total": 1,
399
+ "warning_count": 0,
400
+ "warning_free": true,
401
+ "output_format_ok": true
402
+ },
403
+ "rejected": {
404
+ "compile_ok": true,
405
+ "error": "",
406
+ "failures": 1,
407
+ "format_ok": true,
408
+ "parse_ok": true,
409
+ "pass": false,
410
+ "static_failures": [],
411
+ "static_ok": true,
412
+ "timeout": false,
413
+ "total": 1,
414
+ "warning_count": 0,
415
+ "warning_free": true,
416
+ "output_format_ok": true
417
+ }
418
+ },
419
+ {
420
+ "id": "dpo.binaries.lenboxle.v3.bin-size-guard",
421
+ "chosen": {
422
+ "compile_ok": true,
423
+ "error": "",
424
+ "failures": 0,
425
+ "format_ok": true,
426
+ "parse_ok": true,
427
+ "pass": true,
428
+ "static_failures": [],
429
+ "static_ok": true,
430
+ "timeout": false,
431
+ "total": 1,
432
+ "warning_count": 0,
433
+ "warning_free": true,
434
+ "output_format_ok": true
435
+ },
436
+ "rejected": {
437
+ "compile_ok": true,
438
+ "error": "",
439
+ "failures": 1,
440
+ "format_ok": true,
441
+ "parse_ok": true,
442
+ "pass": false,
443
+ "static_failures": [],
444
+ "static_ok": true,
445
+ "timeout": false,
446
+ "total": 1,
447
+ "warning_count": 0,
448
+ "warning_free": true,
449
+ "output_format_ok": true
450
+ }
451
+ },
452
+ {
453
+ "id": "dpo.binaries.lenbox.v3.bin-size-guard",
454
+ "chosen": {
455
+ "compile_ok": true,
456
+ "error": "",
457
+ "failures": 0,
458
+ "format_ok": true,
459
+ "parse_ok": true,
460
+ "pass": true,
461
+ "static_failures": [],
462
+ "static_ok": true,
463
+ "timeout": false,
464
+ "total": 1,
465
+ "warning_count": 0,
466
+ "warning_free": true,
467
+ "output_format_ok": true
468
+ },
469
+ "rejected": {
470
+ "compile_ok": true,
471
+ "error": "",
472
+ "failures": 1,
473
+ "format_ok": true,
474
+ "parse_ok": true,
475
+ "pass": false,
476
+ "static_failures": [],
477
+ "static_ok": true,
478
+ "timeout": false,
479
+ "total": 1,
480
+ "warning_count": 0,
481
+ "warning_free": true,
482
+ "output_format_ok": true
483
+ }
484
+ },
485
+ {
486
+ "id": "dpo.binaries.bitflags.v2.bin-size-guard",
487
+ "chosen": {
488
+ "compile_ok": true,
489
+ "error": "",
490
+ "failures": 0,
491
+ "format_ok": true,
492
+ "parse_ok": true,
493
+ "pass": true,
494
+ "static_failures": [],
495
+ "static_ok": true,
496
+ "timeout": false,
497
+ "total": 1,
498
+ "warning_count": 0,
499
+ "warning_free": true,
500
+ "output_format_ok": true
501
+ },
502
+ "rejected": {
503
+ "compile_ok": true,
504
+ "error": "",
505
+ "failures": 1,
506
+ "format_ok": true,
507
+ "parse_ok": true,
508
+ "pass": false,
509
+ "static_failures": [],
510
+ "static_ok": true,
511
+ "timeout": false,
512
+ "total": 1,
513
+ "warning_count": 0,
514
+ "warning_free": true,
515
+ "output_format_ok": true
516
+ }
517
+ },
518
+ {
519
+ "id": "dpo.otp.asyncuniqcount.fn-guard",
520
+ "chosen": {
521
+ "compile_ok": true,
522
+ "error": "",
523
+ "failures": 0,
524
+ "format_ok": true,
525
+ "parse_ok": true,
526
+ "pass": true,
527
+ "static_failures": [],
528
+ "static_ok": true,
529
+ "timeout": false,
530
+ "total": 1,
531
+ "warning_count": 0,
532
+ "warning_free": true,
533
+ "output_format_ok": true
534
+ },
535
+ "rejected": {
536
+ "compile_ok": true,
537
+ "error": "",
538
+ "failures": 1,
539
+ "format_ok": true,
540
+ "parse_ok": true,
541
+ "pass": false,
542
+ "static_failures": [],
543
+ "static_ok": true,
544
+ "timeout": false,
545
+ "total": 1,
546
+ "warning_count": 1,
547
+ "warning_free": false,
548
+ "output_format_ok": true
549
+ }
550
+ },
551
+ {
552
+ "id": "dpo.beam.appflag.persistent-term",
553
+ "chosen": {
554
+ "compile_ok": true,
555
+ "error": "",
556
+ "failures": 0,
557
+ "format_ok": true,
558
+ "parse_ok": true,
559
+ "pass": true,
560
+ "static_failures": [],
561
+ "static_ok": true,
562
+ "timeout": false,
563
+ "total": 1,
564
+ "warning_count": 0,
565
+ "warning_free": true,
566
+ "output_format_ok": true
567
+ },
568
+ "rejected": {
569
+ "compile_ok": true,
570
+ "error": "",
571
+ "failures": 1,
572
+ "format_ok": true,
573
+ "parse_ok": true,
574
+ "pass": false,
575
+ "static_failures": [],
576
+ "static_ok": true,
577
+ "timeout": false,
578
+ "total": 1,
579
+ "warning_count": 0,
580
+ "warning_free": true,
581
+ "output_format_ok": true
582
+ }
583
+ },
584
+ {
585
+ "id": "dpo.otp.stampstore.v2.otp-cast-call",
586
+ "chosen": {
587
+ "compile_ok": true,
588
+ "error": "",
589
+ "failures": 0,
590
+ "format_ok": true,
591
+ "parse_ok": true,
592
+ "pass": true,
593
+ "static_failures": [],
594
+ "static_ok": true,
595
+ "timeout": false,
596
+ "total": 1,
597
+ "warning_count": 0,
598
+ "warning_free": true,
599
+ "output_format_ok": true
600
+ },
601
+ "rejected": {
602
+ "compile_ok": true,
603
+ "error": "",
604
+ "failures": 1,
605
+ "format_ok": true,
606
+ "parse_ok": true,
607
+ "pass": false,
608
+ "static_failures": [],
609
+ "static_ok": true,
610
+ "timeout": false,
611
+ "total": 1,
612
+ "warning_count": 1,
613
+ "warning_free": false,
614
+ "output_format_ok": true
615
+ }
616
+ },
617
+ {
618
+ "id": "dpo.otp.rategate.otp-cast-call",
619
+ "chosen": {
620
+ "compile_ok": true,
621
+ "error": "",
622
+ "failures": 0,
623
+ "format_ok": true,
624
+ "parse_ok": true,
625
+ "pass": true,
626
+ "static_failures": [],
627
+ "static_ok": true,
628
+ "timeout": false,
629
+ "total": 1,
630
+ "warning_count": 0,
631
+ "warning_free": true,
632
+ "output_format_ok": true
633
+ },
634
+ "rejected": {
635
+ "compile_ok": true,
636
+ "error": "",
637
+ "failures": 1,
638
+ "format_ok": true,
639
+ "parse_ok": true,
640
+ "pass": false,
641
+ "static_failures": [
642
+ "missing call: GenServer.call/3"
643
+ ],
644
+ "static_ok": false,
645
+ "timeout": false,
646
+ "total": 1,
647
+ "warning_count": 1,
648
+ "warning_free": false,
649
+ "output_format_ok": true
650
+ }
651
+ },
652
+ {
653
+ "id": "dpo.otp.tapecell.otp-cast-call",
654
+ "chosen": {
655
+ "compile_ok": true,
656
+ "error": "",
657
+ "failures": 0,
658
+ "format_ok": true,
659
+ "parse_ok": true,
660
+ "pass": true,
661
+ "static_failures": [],
662
+ "static_ok": true,
663
+ "timeout": false,
664
+ "total": 1,
665
+ "warning_count": 0,
666
+ "warning_free": true,
667
+ "output_format_ok": true
668
+ },
669
+ "rejected": {
670
+ "compile_ok": true,
671
+ "error": "",
672
+ "failures": 1,
673
+ "format_ok": true,
674
+ "parse_ok": true,
675
+ "pass": false,
676
+ "static_failures": [],
677
+ "static_ok": true,
678
+ "timeout": false,
679
+ "total": 1,
680
+ "warning_count": 0,
681
+ "warning_free": true,
682
+ "output_format_ok": true
683
+ }
684
+ },
685
+ {
686
+ "id": "dpo.otp.suprun.v3.otp-task-await",
687
+ "chosen": {
688
+ "compile_ok": true,
689
+ "error": "",
690
+ "failures": 0,
691
+ "format_ok": true,
692
+ "parse_ok": true,
693
+ "pass": true,
694
+ "static_failures": [],
695
+ "static_ok": true,
696
+ "timeout": false,
697
+ "total": 1,
698
+ "warning_count": 0,
699
+ "warning_free": true,
700
+ "output_format_ok": true
701
+ },
702
+ "rejected": {
703
+ "compile_ok": true,
704
+ "error": "",
705
+ "failures": 1,
706
+ "format_ok": true,
707
+ "parse_ok": true,
708
+ "pass": false,
709
+ "static_failures": [],
710
+ "static_ok": true,
711
+ "timeout": false,
712
+ "total": 1,
713
+ "warning_count": 0,
714
+ "warning_free": true,
715
+ "output_format_ok": true
716
+ }
717
+ },
718
+ {
719
+ "id": "dpo.otp.stoplater.v3.otp-timeout",
720
+ "chosen": {
721
+ "compile_ok": true,
722
+ "error": "",
723
+ "failures": 0,
724
+ "format_ok": true,
725
+ "parse_ok": true,
726
+ "pass": true,
727
+ "static_failures": [],
728
+ "static_ok": true,
729
+ "timeout": false,
730
+ "total": 1,
731
+ "warning_count": 0,
732
+ "warning_free": true,
733
+ "output_format_ok": true
734
+ },
735
+ "rejected": {
736
+ "compile_ok": true,
737
+ "error": "",
738
+ "failures": 0,
739
+ "format_ok": true,
740
+ "parse_ok": true,
741
+ "pass": false,
742
+ "static_failures": [
743
+ "missing call: GenServer.call/3"
744
+ ],
745
+ "static_ok": false,
746
+ "timeout": false,
747
+ "total": 1,
748
+ "warning_count": 0,
749
+ "warning_free": true,
750
+ "output_format_ok": true
751
+ }
752
+ },
753
+ {
754
+ "id": "dpo.beam.linktrap.otp-supervision",
755
+ "chosen": {
756
+ "compile_ok": true,
757
+ "error": "",
758
+ "failures": 0,
759
+ "format_ok": true,
760
+ "parse_ok": true,
761
+ "pass": true,
762
+ "static_failures": [],
763
+ "static_ok": true,
764
+ "timeout": false,
765
+ "total": 1,
766
+ "warning_count": 0,
767
+ "warning_free": true,
768
+ "output_format_ok": true
769
+ },
770
+ "rejected": {
771
+ "compile_ok": true,
772
+ "error": "",
773
+ "failures": 1,
774
+ "format_ok": true,
775
+ "parse_ok": true,
776
+ "pass": false,
777
+ "static_failures": [],
778
+ "static_ok": true,
779
+ "timeout": false,
780
+ "total": 1,
781
+ "warning_count": 0,
782
+ "warning_free": true,
783
+ "output_format_ok": true
784
+ }
785
+ },
786
+ {
787
+ "id": "dpo.beam.atomicvec.v3.otp-supervision",
788
+ "chosen": {
789
+ "compile_ok": true,
790
+ "error": "",
791
+ "failures": 0,
792
+ "format_ok": true,
793
+ "parse_ok": true,
794
+ "pass": true,
795
+ "static_failures": [],
796
+ "static_ok": true,
797
+ "timeout": false,
798
+ "total": 1,
799
+ "warning_count": 0,
800
+ "warning_free": true,
801
+ "output_format_ok": true
802
+ },
803
+ "rejected": {
804
+ "compile_ok": true,
805
+ "error": "",
806
+ "failures": 0,
807
+ "format_ok": true,
808
+ "parse_ok": true,
809
+ "pass": false,
810
+ "static_failures": [
811
+ "missing call: :atomics.new/2"
812
+ ],
813
+ "static_ok": false,
814
+ "timeout": false,
815
+ "total": 1,
816
+ "warning_count": 0,
817
+ "warning_free": true,
818
+ "output_format_ok": true
819
+ }
820
+ },
821
+ {
822
+ "id": "dpo.abstractions.areacalc.protocol-behaviour.1",
823
+ "chosen": {
824
+ "compile_ok": true,
825
+ "error": "",
826
+ "failures": 0,
827
+ "format_ok": true,
828
+ "parse_ok": true,
829
+ "pass": true,
830
+ "static_failures": [],
831
+ "static_ok": true,
832
+ "timeout": false,
833
+ "total": 1,
834
+ "warning_count": 0,
835
+ "warning_free": true,
836
+ "output_format_ok": true
837
+ },
838
+ "rejected": {
839
+ "compile_ok": true,
840
+ "error": "",
841
+ "failures": 1,
842
+ "format_ok": true,
843
+ "parse_ok": true,
844
+ "pass": false,
845
+ "static_failures": [
846
+ "missing source fragment: defprotocol AreaCalc",
847
+ "missing source fragment: defimpl AreaCalc"
848
+ ],
849
+ "static_ok": false,
850
+ "timeout": false,
851
+ "total": 1,
852
+ "warning_count": 0,
853
+ "warning_free": true,
854
+ "output_format_ok": true
855
+ }
856
+ },
857
+ {
858
+ "id": "dpo.stdlib.uribuild.stdlib-misuse",
859
+ "chosen": {
860
+ "compile_ok": true,
861
+ "error": "",
862
+ "failures": 0,
863
+ "format_ok": true,
864
+ "parse_ok": true,
865
+ "pass": true,
866
+ "static_failures": [],
867
+ "static_ok": true,
868
+ "timeout": false,
869
+ "total": 1,
870
+ "warning_count": 0,
871
+ "warning_free": true,
872
+ "output_format_ok": true
873
+ },
874
+ "rejected": {
875
+ "compile_ok": true,
876
+ "error": "",
877
+ "failures": 1,
878
+ "format_ok": true,
879
+ "parse_ok": true,
880
+ "pass": false,
881
+ "static_failures": [],
882
+ "static_ok": true,
883
+ "timeout": false,
884
+ "total": 1,
885
+ "warning_count": 0,
886
+ "warning_free": true,
887
+ "output_format_ok": true
888
+ }
889
+ }
890
+ ]
891
+ }
892
+ },
893
+ "sha256": {
894
+ "sft_source": "9b1a79cfda41e9ac59270c8b45693ae0cc641e961ed44e92a2e610090c2772df",
895
+ "dpo_source": "f27eb2c2ffcbea068ef03ad4c1c116e2b91cd5f5c60d01e107cd00e188ddc043",
896
+ "previous_dpo": "07568a3a77ba0a9e9f2b1d434f373a10d7d953d0f2f13531037fe86a8221c83f"
897
+ }
898
+ }
metadata/manifests/qwen25c3b_micro_round3.manifest.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "recipe": "qwen25c3b_micro_round3_kto",
3
+ "backend": "unsloth",
4
+ "base_checkpoint": "outputs/continue/qwen25c3b-micro-v1-dpo/qwen25c3b-targeted-dpo-final",
5
+ "phases": [
6
+ "kto"
7
+ ],
8
+ "no_cpt": true,
9
+ "selection": "all semantic correctness pairs from KTO v0; format-only pair excluded",
10
+ "source": "kto/elixir_kto_v0.jsonl",
11
+ "frozen_pack": "eval/pack/elixir_eval_v1.jsonl",
12
+ "validation": {
13
+ "rows": 34,
14
+ "pairs": 17,
15
+ "labels": {
16
+ "true": 17,
17
+ "false": 17
18
+ },
19
+ "families": {
20
+ "otp": 12,
21
+ "binaries": 10,
22
+ "core": 2,
23
+ "protocol": 4,
24
+ "errors": 2,
25
+ "stdlib": 4
26
+ },
27
+ "weaknesses": {
28
+ "otp-cast-call": 2,
29
+ "bin-size-guard": 2,
30
+ "otp-task-await": 2,
31
+ "otp-supervision": 2,
32
+ "fn-guard": 2,
33
+ "protocol-behaviour": 4,
34
+ "bin-bitwise": 2,
35
+ "err-with-else": 2,
36
+ "stdlib-byte-vs-grapheme": 2,
37
+ "stdlib-safe-deserialization": 2,
38
+ "edge-nil-result": 2,
39
+ "bin-signed": 2,
40
+ "edge-empty": 2,
41
+ "enum-state": 2,
42
+ "otp-timeout": 2,
43
+ "otp-handle-info": 2
44
+ },
45
+ "pack_prompt_collisions": 0,
46
+ "pack_module_collisions": 0
47
+ },
48
+ "sha256": {
49
+ "source": "35737e168213360fb79cca7c1d577fba6b86a460919f4cfe898b642da7b7ee98"
50
+ }
51
+ }
metadata/manifests/qwen25c3b_micro_round4.manifest.json ADDED
@@ -0,0 +1,436 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "recipe": "qwen25c3b_micro_round4_dpo",
3
+ "backend": "unsloth",
4
+ "base_checkpoint": "outputs/continue/qwen25c3b-micro-v1-dpo/qwen25c3b-targeted-dpo-final",
5
+ "phases": [
6
+ "dpo"
7
+ ],
8
+ "no_cpt": true,
9
+ "selection": {
10
+ "semantic": "two fresh scorer-gated pairs for enum-state and edge-empty, one for err-swallow",
11
+ "functional": "two fresh scorer-gated pairs for three disjoint functional construction weaknesses",
12
+ "format": "chosen and rejected re-fenced so format is not the preference signal",
13
+ "benchmark_rows": "never selected; prompt and module collisions rejected"
14
+ },
15
+ "source": "sft/elixir_dpo_failv0.jsonl",
16
+ "previous_data": [
17
+ "sft/qwen25c3b_micro_dpo_v1.jsonl",
18
+ "sft/qwen25c3b_micro_round2_dpo.jsonl",
19
+ "kto/qwen25c3b_micro_round3_kto.jsonl"
20
+ ],
21
+ "frozen_pack": "eval/pack/elixir_eval_v1.jsonl",
22
+ "counts": {
23
+ "rows": 11,
24
+ "by_weakness": {
25
+ "enum-state": 2,
26
+ "edge-empty": 2,
27
+ "err-swallow": 1,
28
+ "functional-style-process-state": 2,
29
+ "functional-style-agent-state": 2,
30
+ "functional-style-append-accumulator": 2
31
+ },
32
+ "by_family": {
33
+ "stdlib": 1,
34
+ "collections": 1,
35
+ "binaries": 1,
36
+ "otp": 1,
37
+ "errors": 1,
38
+ "functional": 6
39
+ }
40
+ },
41
+ "validation": {
42
+ "pack_prompt_collisions": 0,
43
+ "pack_module_collisions": 0,
44
+ "dpo": {
45
+ "rows": 11,
46
+ "scorer_checks": [
47
+ {
48
+ "id": "dpo.stdlib.multisort.v2.enum-state.0",
49
+ "chosen": {
50
+ "compile_ok": true,
51
+ "error": "",
52
+ "failures": 0,
53
+ "format_ok": true,
54
+ "parse_ok": true,
55
+ "pass": true,
56
+ "static_failures": [],
57
+ "static_ok": true,
58
+ "timeout": false,
59
+ "total": 1,
60
+ "warning_count": 0,
61
+ "warning_free": true,
62
+ "output_format_ok": true
63
+ },
64
+ "rejected": {
65
+ "compile_ok": true,
66
+ "error": "",
67
+ "failures": 1,
68
+ "format_ok": true,
69
+ "parse_ok": true,
70
+ "pass": false,
71
+ "static_failures": [],
72
+ "static_ok": true,
73
+ "timeout": false,
74
+ "total": 1,
75
+ "warning_count": 0,
76
+ "warning_free": true,
77
+ "output_format_ok": true
78
+ }
79
+ },
80
+ {
81
+ "id": "dpo.collections.cartpair.v2.enum-state.0",
82
+ "chosen": {
83
+ "compile_ok": true,
84
+ "error": "",
85
+ "failures": 0,
86
+ "format_ok": true,
87
+ "parse_ok": true,
88
+ "pass": true,
89
+ "static_failures": [],
90
+ "static_ok": true,
91
+ "timeout": false,
92
+ "total": 1,
93
+ "warning_count": 0,
94
+ "warning_free": true,
95
+ "output_format_ok": true
96
+ },
97
+ "rejected": {
98
+ "compile_ok": true,
99
+ "error": "",
100
+ "failures": 1,
101
+ "format_ok": true,
102
+ "parse_ok": true,
103
+ "pass": false,
104
+ "static_failures": [],
105
+ "static_ok": true,
106
+ "timeout": false,
107
+ "total": 1,
108
+ "warning_count": 0,
109
+ "warning_free": true,
110
+ "output_format_ok": true
111
+ }
112
+ },
113
+ {
114
+ "id": "dpo.binaries.checksum8.v3.edge-empty",
115
+ "chosen": {
116
+ "compile_ok": true,
117
+ "error": "",
118
+ "failures": 0,
119
+ "format_ok": true,
120
+ "parse_ok": true,
121
+ "pass": true,
122
+ "static_failures": [],
123
+ "static_ok": true,
124
+ "timeout": false,
125
+ "total": 1,
126
+ "warning_count": 0,
127
+ "warning_free": true,
128
+ "output_format_ok": true
129
+ },
130
+ "rejected": {
131
+ "compile_ok": true,
132
+ "error": "",
133
+ "failures": 1,
134
+ "format_ok": true,
135
+ "parse_ok": true,
136
+ "pass": false,
137
+ "static_failures": [],
138
+ "static_ok": true,
139
+ "timeout": false,
140
+ "total": 1,
141
+ "warning_count": 0,
142
+ "warning_free": true,
143
+ "output_format_ok": true
144
+ }
145
+ },
146
+ {
147
+ "id": "dpo.otp.freqlog.edge-empty",
148
+ "chosen": {
149
+ "compile_ok": true,
150
+ "error": "",
151
+ "failures": 0,
152
+ "format_ok": true,
153
+ "parse_ok": true,
154
+ "pass": true,
155
+ "static_failures": [],
156
+ "static_ok": true,
157
+ "timeout": false,
158
+ "total": 1,
159
+ "warning_count": 0,
160
+ "warning_free": true,
161
+ "output_format_ok": true
162
+ },
163
+ "rejected": {
164
+ "compile_ok": true,
165
+ "error": "",
166
+ "failures": 1,
167
+ "format_ok": true,
168
+ "parse_ok": true,
169
+ "pass": false,
170
+ "static_failures": [],
171
+ "static_ok": true,
172
+ "timeout": false,
173
+ "total": 1,
174
+ "warning_count": 0,
175
+ "warning_free": true,
176
+ "output_format_ok": true
177
+ }
178
+ },
179
+ {
180
+ "id": "dpo.errors.validatefields.v3.err-swallow",
181
+ "chosen": {
182
+ "compile_ok": true,
183
+ "error": "",
184
+ "failures": 0,
185
+ "format_ok": true,
186
+ "parse_ok": true,
187
+ "pass": true,
188
+ "static_failures": [],
189
+ "static_ok": true,
190
+ "timeout": false,
191
+ "total": 1,
192
+ "warning_count": 0,
193
+ "warning_free": true,
194
+ "output_format_ok": true
195
+ },
196
+ "rejected": {
197
+ "compile_ok": true,
198
+ "error": "",
199
+ "failures": 1,
200
+ "format_ok": true,
201
+ "parse_ok": true,
202
+ "pass": false,
203
+ "static_failures": [],
204
+ "static_ok": true,
205
+ "timeout": false,
206
+ "total": 1,
207
+ "warning_count": 0,
208
+ "warning_free": true,
209
+ "output_format_ok": true
210
+ }
211
+ },
212
+ {
213
+ "id": "dpo.functional_style.transition_02.functional-style-process-state",
214
+ "chosen": {
215
+ "compile_ok": true,
216
+ "error": "",
217
+ "failures": 0,
218
+ "format_ok": true,
219
+ "parse_ok": true,
220
+ "pass": true,
221
+ "static_failures": [],
222
+ "static_ok": true,
223
+ "timeout": false,
224
+ "total": 1,
225
+ "warning_count": 0,
226
+ "warning_free": true,
227
+ "output_format_ok": true
228
+ },
229
+ "rejected": {
230
+ "compile_ok": true,
231
+ "error": "",
232
+ "failures": 0,
233
+ "format_ok": true,
234
+ "parse_ok": true,
235
+ "pass": false,
236
+ "static_failures": [
237
+ "forbidden call: Process.put/2",
238
+ "missing source fragment: def step(state, {:add, value})",
239
+ "missing source fragment: def step(_state, :reset)"
240
+ ],
241
+ "static_ok": false,
242
+ "timeout": false,
243
+ "total": 1,
244
+ "warning_count": 0,
245
+ "warning_free": true,
246
+ "output_format_ok": true
247
+ }
248
+ },
249
+ {
250
+ "id": "dpo.functional_style.transition_03.functional-style-process-state",
251
+ "chosen": {
252
+ "compile_ok": true,
253
+ "error": "",
254
+ "failures": 0,
255
+ "format_ok": true,
256
+ "parse_ok": true,
257
+ "pass": true,
258
+ "static_failures": [],
259
+ "static_ok": true,
260
+ "timeout": false,
261
+ "total": 1,
262
+ "warning_count": 0,
263
+ "warning_free": true,
264
+ "output_format_ok": true
265
+ },
266
+ "rejected": {
267
+ "compile_ok": true,
268
+ "error": "",
269
+ "failures": 0,
270
+ "format_ok": true,
271
+ "parse_ok": true,
272
+ "pass": false,
273
+ "static_failures": [
274
+ "forbidden call: Process.put/2",
275
+ "missing source fragment: def step(state, {:add, value})",
276
+ "missing source fragment: def step(_state, :reset)"
277
+ ],
278
+ "static_ok": false,
279
+ "timeout": false,
280
+ "total": 1,
281
+ "warning_count": 0,
282
+ "warning_free": true,
283
+ "output_format_ok": true
284
+ }
285
+ },
286
+ {
287
+ "id": "dpo.functional_style.reduce_07.functional-style-agent-state",
288
+ "chosen": {
289
+ "compile_ok": true,
290
+ "error": "",
291
+ "failures": 0,
292
+ "format_ok": true,
293
+ "parse_ok": true,
294
+ "pass": true,
295
+ "static_failures": [],
296
+ "static_ok": true,
297
+ "timeout": false,
298
+ "total": 1,
299
+ "warning_count": 0,
300
+ "warning_free": true,
301
+ "output_format_ok": true
302
+ },
303
+ "rejected": {
304
+ "compile_ok": true,
305
+ "error": "",
306
+ "failures": 0,
307
+ "format_ok": true,
308
+ "parse_ok": true,
309
+ "pass": false,
310
+ "static_failures": [
311
+ "missing call: Enum.reduce/3",
312
+ "forbidden call: Agent.start_link/1"
313
+ ],
314
+ "static_ok": false,
315
+ "timeout": false,
316
+ "total": 1,
317
+ "warning_count": 0,
318
+ "warning_free": true,
319
+ "output_format_ok": true
320
+ }
321
+ },
322
+ {
323
+ "id": "dpo.functional_style.reduce_06.functional-style-agent-state",
324
+ "chosen": {
325
+ "compile_ok": true,
326
+ "error": "",
327
+ "failures": 0,
328
+ "format_ok": true,
329
+ "parse_ok": true,
330
+ "pass": true,
331
+ "static_failures": [],
332
+ "static_ok": true,
333
+ "timeout": false,
334
+ "total": 1,
335
+ "warning_count": 0,
336
+ "warning_free": true,
337
+ "output_format_ok": true
338
+ },
339
+ "rejected": {
340
+ "compile_ok": true,
341
+ "error": "",
342
+ "failures": 0,
343
+ "format_ok": true,
344
+ "parse_ok": true,
345
+ "pass": false,
346
+ "static_failures": [
347
+ "missing call: Enum.reduce/3",
348
+ "forbidden call: Agent.start_link/1"
349
+ ],
350
+ "static_ok": false,
351
+ "timeout": false,
352
+ "total": 1,
353
+ "warning_count": 0,
354
+ "warning_free": true,
355
+ "output_format_ok": true
356
+ }
357
+ },
358
+ {
359
+ "id": "dpo.functional_style.stable_unique_10.functional-style-append-accumulator",
360
+ "chosen": {
361
+ "compile_ok": true,
362
+ "error": "",
363
+ "failures": 0,
364
+ "format_ok": true,
365
+ "parse_ok": true,
366
+ "pass": true,
367
+ "static_failures": [],
368
+ "static_ok": true,
369
+ "timeout": false,
370
+ "total": 1,
371
+ "warning_count": 0,
372
+ "warning_free": true,
373
+ "output_format_ok": true
374
+ },
375
+ "rejected": {
376
+ "compile_ok": true,
377
+ "error": "",
378
+ "failures": 0,
379
+ "format_ok": true,
380
+ "parse_ok": true,
381
+ "pass": false,
382
+ "static_failures": [
383
+ "missing call: Enum.reverse/1",
384
+ "forbidden source fragment: ++"
385
+ ],
386
+ "static_ok": false,
387
+ "timeout": false,
388
+ "total": 1,
389
+ "warning_count": 0,
390
+ "warning_free": true,
391
+ "output_format_ok": true
392
+ }
393
+ },
394
+ {
395
+ "id": "dpo.functional_style.stable_unique_04.functional-style-append-accumulator",
396
+ "chosen": {
397
+ "compile_ok": true,
398
+ "error": "",
399
+ "failures": 0,
400
+ "format_ok": true,
401
+ "parse_ok": true,
402
+ "pass": true,
403
+ "static_failures": [],
404
+ "static_ok": true,
405
+ "timeout": false,
406
+ "total": 1,
407
+ "warning_count": 0,
408
+ "warning_free": true,
409
+ "output_format_ok": true
410
+ },
411
+ "rejected": {
412
+ "compile_ok": true,
413
+ "error": "",
414
+ "failures": 0,
415
+ "format_ok": true,
416
+ "parse_ok": true,
417
+ "pass": false,
418
+ "static_failures": [
419
+ "missing call: Enum.reverse/1",
420
+ "forbidden source fragment: ++"
421
+ ],
422
+ "static_ok": false,
423
+ "timeout": false,
424
+ "total": 1,
425
+ "warning_count": 0,
426
+ "warning_free": true,
427
+ "output_format_ok": true
428
+ }
429
+ }
430
+ ]
431
+ }
432
+ },
433
+ "sha256": {
434
+ "source": "f27eb2c2ffcbea068ef03ad4c1c116e2b91cd5f5c60d01e107cd00e188ddc043"
435
+ }
436
+ }
metadata/manifests/qwen25c3b_micro_round6.manifest.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "recipe": "qwen25c3b_micro_round6_kto",
3
+ "backend": "unsloth",
4
+ "base_checkpoint": "outputs/continue/qwen25c3b-micro-round3-kto/qwen25c3b-targeted-kto-final",
5
+ "phases": [
6
+ "kto"
7
+ ],
8
+ "no_cpt": true,
9
+ "selection": {
10
+ "source": "the 11 fresh round4 DPO pairs, preserving both labels",
11
+ "quality": "chosen and rejected completions inherited the round4 scorer gate",
12
+ "benchmark_rows": "never selected; prompt and module collisions rejected"
13
+ },
14
+ "source": "sft/qwen25c3b_micro_round4_dpo.jsonl",
15
+ "source_manifest": "sft/qwen25c3b_micro_round4.manifest.json",
16
+ "frozen_pack": "eval/pack/elixir_eval_v1.jsonl",
17
+ "counts": {
18
+ "rows": 22,
19
+ "pairs": 11,
20
+ "labels": {
21
+ "true": 11,
22
+ "false": 11
23
+ },
24
+ "by_family": {
25
+ "stdlib": 2,
26
+ "collections": 2,
27
+ "binaries": 2,
28
+ "otp": 2,
29
+ "errors": 2,
30
+ "functional": 12
31
+ },
32
+ "by_weakness": {
33
+ "enum-state": 4,
34
+ "edge-empty": 4,
35
+ "err-swallow": 2,
36
+ "functional-style-process-state": 4,
37
+ "functional-style-agent-state": 4,
38
+ "functional-style-append-accumulator": 4
39
+ }
40
+ },
41
+ "validation": {
42
+ "pack_prompt_collisions": 0,
43
+ "pack_module_collisions": 0,
44
+ "chosen_rows": 11,
45
+ "rejected_rows": 11,
46
+ "source_sha256": "6f55c1192573313eb315e238e7f0e25f83f2581dd7aecc63833222c2aa6b6532"
47
+ },
48
+ "sha256": {
49
+ "output": "dba0ce8fe08a964af7f9e56b90731229e5359bbca44be299879a9cb159e111b4"
50
+ }
51
+ }
metadata/provenance.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "repo": "jmarceno/elixir-preference",
3
+ "source_repository": "model-training",
4
+ "source_commit": "708d0d52ee564a1a4e5656ce6afc67505e33938b",
5
+ "built_at_utc": "2026-10-26T11:50:21Z",
6
+ "license": "Apache-2.0",
7
+ "excluded_by_design": [
8
+ "all CPT corpora (elixir_cpt_v0, fp_cpt_v1, mini_elixir_cpt_v0, minicpm5 CPT batches)",
9
+ "elixir_sft_v0.jsonl (frozen ShareGPT dump kept as a negative example)",
10
+ "dataset originals under domains/elixir/sft/originals/",
11
+ "the frozen eval packs under domains/elixir/eval/pack/"
12
+ ],
13
+ "row_schema_note": "Files are copied byte-for-byte from the source paths listed in metadata/dataset_stats.json; no row was rewritten, reordered, or filtered."
14
+ }
metadata/sha256sums.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ f27eb2c2ffcbea068ef03ad4c1c116e2b91cd5f5c60d01e107cd00e188ddc043 data/dpo/dpo_failv0.jsonl
2
+ 35737e168213360fb79cca7c1d577fba6b86a460919f4cfe898b642da7b7ee98 data/kto/kto_v0.jsonl
3
+ 07568a3a77ba0a9e9f2b1d434f373a10d7d953d0f2f13531037fe86a8221c83f data/onpolicy/qwen25c3b_micro_dpo_v1.jsonl
4
+ f119688017c19d217f5a009fac20f59b6a4da9905457b16d7190b02498a82cd8 data/onpolicy/qwen25c3b_micro_round2_dpo.jsonl
5
+ 6f55c1192573313eb315e238e7f0e25f83f2581dd7aecc63833222c2aa6b6532 data/onpolicy/qwen25c3b_micro_round4_dpo.jsonl
6
+ 36e22759596a2ea7dc39e5b8f92bf0a9cdbac628cd233535782e70c0630a8bd2 data/onpolicy/qwen25c3b_micro_round13_dpo.jsonl
7
+ 17642df15cc328fdf789f8491c73b4a3e0618920d967d1cc06c3cb6a8b59158c data/onpolicy/qwen25c3b_micro_round3_kto.jsonl
8
+ dba0ce8fe08a964af7f9e56b90731229e5359bbca44be299879a9cb159e111b4 data/onpolicy/qwen25c3b_micro_round6_kto.jsonl
9
+ 7c844c0e7107ba608bca9e2e92b5e010c3bdd8e15327f64437f437b1472f40d5 data/onpolicy/qwen25c3b_micro_round11_kto.jsonl