samuki-hf commited on
Commit
f015360
·
verified ·
1 Parent(s): 563b56c

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +107 -0
  2. errata/data.parquet +3 -0
  3. references/data.parquet +3 -0
README.md ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ configs:
3
+ - config_name: references
4
+ data_files: references/*.parquet
5
+ - config_name: errata
6
+ data_files: errata/*.parquet
7
+ language:
8
+ - en
9
+ tags:
10
+ - code
11
+ - ocaml
12
+ - livecodebench
13
+ ---
14
+
15
+ # OCaml reference solutions for LiveCodeBench
16
+
17
+ A reference solution in OCaml for every problem in the multilingual-LiveCodeBench OCaml
18
+ universe that can be scored at all, plus the list of problems that cannot be.
19
+
20
+ - **436** problems in the universe
21
+ - **415** are scoreable, and every one of them has a verified reference
22
+ - **21** are excluded as unscoreable (see the `errata` config)
23
+
24
+
25
+ ## Configs
26
+
27
+ `references` is one row per problem. `errata` is the subset no correct program can pass,
28
+ with the evidence for each.
29
+
30
+ ```python
31
+ from datasets import load_dataset
32
+ refs = load_dataset("samuki-hf/ocaml-reference-solutions", "references", split="train")
33
+ errata = load_dataset("samuki-hf/ocaml-reference-solutions", "errata", split="train")
34
+ ```
35
+
36
+ ## What `verification` means
37
+
38
+ Every solution was compiled with `ocamlopt` and run against the real hidden tests.
39
+
40
+ | value | meaning | count |
41
+ |---|---|---|
42
+ | `exact-match` | passes every official test byte for byte | 410 |
43
+ | `float-tolerance` | correct; differs only in float formatting | 5 |
44
+ | `validated-not-exact` | proven correct; the problem accepts several answers | 12 |
45
+ | `unverified` | on LiveCodeBench's errata list, not re-derived here | 8 |
46
+
47
+ The `float-tolerance` rows are not a defect in the solutions. Those problems state an accepted
48
+ error of "absolute **or** relative at most 1e-6", and no comparator in the LiveCodeBench
49
+ lineage implements that rule: the original grades per line under `Decimal` equality, Multi-LCB
50
+ adds bool aliasing and `math.isclose(abs_tol=1e-5, rel_tol=0)`, and Agnostics compares whole
51
+ outputs under `rstrip()`.
52
+
53
+ ## Why problems are excluded
54
+
55
+ | problem | reason | source | evidence |
56
+ |---|---|---|---|
57
+ | `abc337_e` | interactive | livecodebench | documented in LiveCodeBench's own ERRATA.md |
58
+ | `abc343_a` | multiple-solutions | livecodebench | documented in LiveCodeBench's own ERRATA.md |
59
+ | `abc343_e` | multiple-solutions | livecodebench | documented in LiveCodeBench's own ERRATA.md |
60
+ | `abc350_c` | erroneous-tests | livecodebench | documented in LiveCodeBench's own ERRATA.md |
61
+ | `abc355_e` | interactive | livecodebench | documented in LiveCodeBench's own ERRATA.md |
62
+ | `abc362_c` | multiple-solutions | livecodebench | documented in LiveCodeBench's own ERRATA.md |
63
+ | `abc363_f` | multiple-solutions | this-work | palindromic product string; 3000/3000 consistent |
64
+ | `abc366_g` | multiple-solutions | this-work | XOR labelling; 300/300 valid on random graphs |
65
+ | `abc373_g` | multiple-solutions | this-work | non-crossing matching; 300/300 valid matchings |
66
+ | `abc392_f` | erroneous-tests | this-work | 2 of 42 hidden tests violate the stated 1 <= P_i <= i (P_1 = 3 and P_1 = 5) and their expected outputs contain zeros, though the answer is a permutation of 1..N. |
67
+ | `abc396_e` | multiple-solutions | this-work | ties in the per-bit choice; 400/400 minimum sums |
68
+ | `abc397_d` | multiple-solutions | this-work | x^3-y^3=N can admit several pairs; 0 wrong over N<=200000 |
69
+ | `arc181_c` | multiple-solutions | this-work | 0/1 grid; 200/200 valid on random P,Q |
70
+ | `arc183_d` | multiple-solutions | this-work | asks for any maximum-score removal order, and the two vertices of an operation may be printed in either order, so even the N=4 test with a unique optimal procedure has four correct printings. Exact match accepts one. |
71
+ | `arc185_c` | multiple-solutions | livecodebench | documented in LiveCodeBench's own ERRATA.md |
72
+ | `arc188_c` | multiple-solutions | this-work | any valid confused set; 250/250 (170 valid, 80 correct -1) |
73
+ | `arc189_a` | erroneous-tests | livecodebench | documented in LiveCodeBench's own ERRATA.md |
74
+ | `arc190_a` | multiple-solutions | this-work | any minimum-cost operation list is accepted; ours is a valid optimum on 43 of 44 hidden tests but byte-identical on only 13. Test 14 is also wrong: it contains the interval [1,10] with N=10, so the minimum cost is 1 not 2. |
75
+ | `arc191_c` | multiple-solutions | this-work | (A,M) with multiplicative order N; 59/59 verified |
76
+ | `arc192_b` | erroneous-tests | this-work | 1 of 43 hidden tests is wrong: test 20 (N=10, A=[7,16,3,3,9,8,16,12,8,3]) expects Snuke but the true answer is Fennec. Exhaustive game search agrees with the expected output on all 25 other searchable tests. |
77
+ | `arc195_c` | multiple-solutions | this-work | asks for any valid cyclic placement. Our construction is valid on every case checked and its Yes/No agrees with exhaustive search for R+B <= 5, yet it fails all 5 hidden tests because it prints a different valid placement. |
78
+
79
+ `livecodebench` entries are the ones LiveCodeBench documents in its own `ERRATA.md`, which the
80
+ code never reads, so every downstream consumer inherits them. `this-work` entries were found
81
+ here by running a verified reference against the official tests.
82
+
83
+ Solutions are still shipped for excluded problems so the set is complete, except `arc183_d`,
84
+ which has none. Their `verification` says how far each was checked. The two interactive
85
+ problems keep a solution only for completeness; nothing can validate it offline.
86
+
87
+ ## Feeding stdin
88
+
89
+ Append a trailing newline to each test input if it lacks one, as the vendored Multi-LCB
90
+ executor does. Without it, OCaml `Scanf` formats ending in a newline raise `End_of_file` on the
91
+ last line and correct programs look broken.
92
+
93
+ ## Provenance
94
+
95
+ | provenance | model | solutions |
96
+ |---|---|---|
97
+ | model-sample | qwen3-8b-think | 239 |
98
+ | agent | sonnet | 153 |
99
+ | agent | opus | 17 |
100
+ | model-sample | qwen3-14b-think | 17 |
101
+ | agent | fable | 4 |
102
+ | model-sample | qwen3-14b-nothink | 3 |
103
+ | model-sample | llama31-8b-instruct-nothink | 1 |
104
+ | model-sample | qwen3-8b-nothink | 1 |
105
+
106
+ Solutions were produced by language models and then verified, not written by hand. The
107
+ `origin_model` column records which model produced each one.
errata/data.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a050d48f0cbd6826a2a792264b1137a7f5d87ad9746c0737c688101e3aa72d3
3
+ size 5730
references/data.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:717f842e2f6809bf8fed1b5a53d31875b4ff7ee5fb4931a4179733806fc57e00
3
+ size 540182