Sample an implementation and a test suite from a model under different instructions, without
letting either see the other, then execute one against the other. This page measures the construction on
DS-1000 — data-science code, where a test must predict a rich Python object (a DataFrame, an array, a
figure) rather than a stdout string, where the benchmark ships an official reference solution for every
problem (so suite faithfulness φ is exact everywhere), and where there are no public tests to compete
against. Companion to the OCaml joint coding and testing
page, whose symbols and layout this page follows.
Test suites: vxef/ds1000-test-rollouts (100 per problem, Qwen3 4B/8B/14B non-thinking,
t=0.6). Implementations: the ds1000 cells of samuki-hf/thinking-rollouts (100 per problem, same
models, same temperature; join on instance_id).
| A(c,t) | The agreement predicate (capital A): 1 iff implementation c passes every test in suite t. Lowercase a and α below are acceptance rates — probabilities of the event A=1 conditioned on one or two verdicts; the subscripts list the conditioned verdicts, implementation's first. |
| R(c) | Correctness verdict of an implementation c: 1 iff c passes the official DS-1000 harness (the passed label in samuki-hf/thinking-rollouts). The ground truth. |
| F(t) | Faithfulness verdict of a suite t: 1 iff the official reference solution passes every test in t. |
| β | Baseline correctness of the code model: P(R(C)=1) for one sampled program — its pass@1. A property of the code model alone; test suites cannot change it. |
| Ẑ | Agreement rate: fraction of (program, suite) pairs where the program passes every test in the suite. 1/Ẑ pairs must be sampled per accepted pair. |
| P(correct | agree) | Precision: given that a suite accepted a program, how often that program is actually correct. |
| LR = a₁/a₀ | Likelihood ratio of acceptance, with a_r = P(A=1 | R=r): a₁/a₀ = P(A=1 | correct) / P(A=1 | incorrect) — the factor observing agreement multiplies the prior odds of correctness. |
| φ | Suite faithfulness: P(the official reference passes a generated suite). Exact on all 1000 problems — DS-1000 ships an official reference, so nothing is harvested from passing samples. |
| αrf | Acceptance rate split by both verdicts, αrf = P(A=1 | R=r, F=f): α₁₁ (correct code, faithful suite) — should be 1, falls below it when a faithful suite asserts behavior the statement left open; α₁₀ (correct, unfaithful); α₀₁ (incorrect, faithful) — the weak-suite channel; α₀₀ (incorrect, unfaithful) — the shared-misreading channel. |
A rollout has to yield a parseable suite at all: the last ```json fence must
parse, match the {"tests": [{"setup", "check"}]} schema, and every snippet must be valid
Python. Invalid rows are kept in the dataset; everything below filters on parse_ok. The
distribution matters more than the average: the typical problem keeps its full 100 suites, and failures
concentrate on a handful of prompts — problems with zero usable suites drop out of their grid cell.
| test expert | rollouts | parsed | hit token limit | mean tests/suite | mean tokens | parseable/problem median / mean / min |
problems with <20 parseable suites | with none (drop out of the grid) |
|---|---|---|---|---|---|---|---|---|
| 4B nothink | 100,000 | 0.944 | 0.013 | 8.16 | 1,414 | 100 / 94.4 / 0 | 19 | 6 |
| 8B nothink | 100,000 | 0.961 | 0.016 | 9.96 | 1,588 | 100 / 96.1 / 0 | 10 | 4 |
| 14B nothink | 100,000 | 0.971 | 0.014 | 9.98 | 1,650 | 100 / 97.1 / 0 | 10 | 2 |
| 4B think | 100,000 | 0.945 | 0.010 | 7.40 | 6,327 | 98 / 94.5 / 2 | 2 | 0 |
| 8B think | 100,000 | 0.973 | 0.006 | 8.07 | 6,670 | 99 / 97.3 / 1 | 1 | 0 |
think rows sample with reasoning enabled (top_p 0.95, 24,576-token budget, suites extracted
from the post-</think> answer); nothink rows use top_p 0.8 and an 8,192-token budget.
Sections below include a think cell as soon as its reference verdicts finish computing.
Every test executed as setup + reference solution + check in the problem's official
exec_context frame (DS-1000 pinned environment). A suite is faithful iff all its tests pass.
| test expert | suites | per-assertion pass | φ (reference passes every test) | reference passes ≥1 test |
|---|---|---|---|---|
| 4B nothink | 94,358 | 0.281 | 0.120 | 0.453 |
| 8B nothink | 96,069 | 0.304 | 0.101 | 0.548 |
| 14B nothink | 97,113 | 0.407 | 0.176 | 0.633 |
| 4B think | 94,526 | 0.397 | 0.171 | 0.565 |
| 8B think | 97,295 | 0.465 | 0.215 | 0.660 |
The two suite-level columns bracket suite quality from both ends: φ counts suites the reference satisfies wholly; the ≥1 column counts suites that are not entirely off-base — a suite failing even it asserts a reading of the problem the reference contradicts on every single test. The gap between them is the mass of suites that are mostly right but spoiled by at least one bad assertion — the suites that shorter length or a more tolerant predicate could rescue.
All libraries pooled. The gap between the bars is the suite-size amplification: suites carry ~10 tests, so with independent errors φ would be the per-assertion rate to the 10th power (≈10⁻⁴ at 14B) — the observed φ is orders of magnitude higher, meaning errors cluster within suites: the model misreads a problem once and every assertion inherits it. The clustering is also why asking for fewer tests per suite would raise φ at unchanged per-assertion quality.
By library. The ordering tracks how feasible it is to hand-predict the expected value as an explicit literal: small Numpy arrays are computable in-head; Pandas pays an exactness tax on index/dtype/column structure; Matplotlib checks assert figure properties the statement never pinned; Sklearn is lowest because expected outputs are fitted-model artifacts that cannot be written down from the statement alone. Model size lifts every bar but never reorders the libraries. Caveat: verdicts score the checks exactly as written — some failures are over-strict assertions on behavior the statement left open rather than wrong values.
The lenient end of the bracket, by library. Where φ and the ≥1 rate are both low (Sklearn 0.06/0.38, Matplotlib 0.17/0.40 at 14B), suites aren't merely spoiled by a stray assertion — most contradict the reference on every test: a wholly wrong reading of the problem, or figure assertions the reference never satisfies. Where the ≥1 rate is high but φ low (Numpy 0.23/0.86, Pytorch, Scipy), suites are mostly right and die of one over-strict or miscomputed assertion — the population that shorter suites or a more tolerant predicate would rescue.
Errors cluster within suites. If assertions failed independently, φ would be the per-assertion rate to the ~10th power — 4B nothink: observed φ 0.120 vs 0.0000 under independence; 8B nothink: observed φ 0.101 vs 0.0000 under independence; 14B nothink: observed φ 0.176 vs 0.0001 under independence; 4B think: observed φ 0.171 vs 0.0006 under independence; 8B think: observed φ 0.215 vs 0.0015 under independence. A suite is either right or badly wrong: the model misreads the specification once and every assertion inherits it. The positional decay above is the other OCaml finding reproduced: the tail of a suite is worse than its head, an argument for asking for fewer tests.
Rendered verbatim. The problem statement fills the # Problem section; the
# Task section defines the setup / check contract and the JSON format. Matplotlib problems get
two phrase swaps (the solution "draws the figure" instead of assigning result; checks inspect
pyplot state). This single user message is the only thing the test expert sees — never an implementation.
# Problem
Problem:
I have the following DataFrame:
Col1 Col2 Col3 Type
0 1 2 3 1
1 4 5 6 1
2 7 8 9 2
3 10 11 12 2
4 13 14 15 3
5 16 17 18 3
The DataFrame is read from a CSV file. All rows which have Type 1 are on top, followed by the rows with Type 2, followed by the rows with Type 3, etc.
I would like to shuffle the order of the DataFrame's rows according to a list. \
For example, give a list [2, 4, 0, 3, 1, 5] and desired result should be:
Col1 Col2 Col3 Type
2 7 8 9 2
4 13 14 15 3
0 1 2 3 1
3 10 11 12 2
1 4 5 6 1
5 16 17 18 3
...
How can I achieve this?
A:
<code>
import pandas as pd
import numpy as np
df = pd.DataFrame({'Col1': [1, 4, 7, 10, 13, 16],
'Col2': [2, 5, 8, 11, 14, 17],
'Col3': [3, 6, 9, 12, 15, 18],
'Type': [1, 1, 2, 2, 3, 3]})
List = np.random.permutation(len(df))
</code>
result = ... # put solution in this variable
BEGIN SOLUTION
<code>
# Task
Provide a suite of test cases for the solution to the problem above.
Write tests only; do not provide an implementation.
The solution is a Python snippet that runs after the setup code shown in the problem
(the code between <code> and </code>) and stores its answer in the variable `result`.
A test case is a pair of Python snippets:
- "setup": code that re-creates, from scratch, every input variable the solution reads,
using the same variable names as the problem's setup, including all imports. Each
setup must be fully self-contained (it replaces the problem's setup entirely) and may
use different input values than the example in order to probe other cases.
- "check": code that runs in the same namespace immediately after the solution and must
raise an AssertionError (or any exception) exactly when the solution's answer is wrong
for that setup's inputs. The check inspects `result`. Prefer stating the expected answer as an explicit
literal that you computed yourself. Use type-appropriate exact comparisons
(pandas.testing.assert_frame_equal, numpy.testing.assert_array_equal / assert_allclose,
plain ==). Do not re-solve the problem inside check.
Give between 4 and 10 test cases as a single JSON object in a ```json code block:
```json
{"tests": [{"setup": "import pandas as pd\ndf = pd.DataFrame(...)", "check": "expected = ...\nassert result.equals(expected)"}]}
```
Every setup must be valid for the problem as stated (same variable names, same types,
values satisfying any stated constraints). Cover the boundaries and the cases the
statement leaves easy to get wrong. Use \n for line breaks inside the JSON strings.
# Problem
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
x = 10 * np.random.randn(10)
y = x
# plot x vs y, label them using "x-y" in the legend
# SOLUTION START
# Task
Provide a suite of test cases for the solution to the problem above.
Write tests only; do not provide an implementation.
The solution is a Python snippet that runs after the setup code shown in the problem
(the code between <code> and </code>) and draws the figure the problem asks for (there is no `result` variable; the solution's effect is matplotlib state).
A test case is a pair of Python snippets:
- "setup": code that re-creates, from scratch, every input variable the solution reads,
using the same variable names as the problem's setup, including all imports. Each
setup must be fully self-contained (it replaces the problem's setup entirely) and may
use different input values than the example in order to probe other cases.
- "check": code that runs in the same namespace immediately after the solution and must
raise an AssertionError (or any exception) exactly when the solution's answer is wrong
for that setup's inputs. The check inspects matplotlib state (e.g. plt.gca(), its lines, collections, labels). Prefer stating the expected answer as an explicit
literal that you computed yourself. Use type-appropriate exact comparisons
(pandas.testing.assert_frame_equal, numpy.testing.assert_array_equal / assert_allclose,
plain ==). Do not re-solve the problem inside check.
Give between 4 and 10 test cases as a single JSON object in a ```json code block:
```json
{"tests": [{"setup": "import pandas as pd\ndf = pd.DataFrame(...)", "check": "expected = ...\nassert result.equals(expected)"}]}
```
Every setup must be valid for the problem as stated (same variable names, same types,
values satisfying any stated constraints). Cover the boundaries and the cases the
statement leaves easy to get wrong. Use \n for line breaks inside the JSON strings.
One accepted and one rejected test per library, from the 14B cell, verdicts against the official reference.
Problem:
I have the following DataFrame:
Col1 Col2 Col3 Type
0 1 2 3 1
1 4 5 6 1
2 7 8 9 2
3 10 11 12 2
4 13 14 15 3
5 16 17 18 3
The DataFrame is read from a CSV file. All rows which have Type 1 are on top, followed by the rows with Type 2, followed by the rows with Type 3, etc.
I would like to shuffle the order of the DataFrame's rows according to a list. \
For example, give a list [2, 4, 0, 3, 1, 5] and desired result should be:
Col1 Col2 Col3 Type
2 7 8 9 2
4 13 14 15 3
0 1 2 3 1
3 10 11 12 2
1 4 5 6 1
5 16 17 18 3
...
How can I achieve this?
A:
<code>
import pandas as pd
import numpy as np
df = pd.DataFrame({'Col1': [1, 4, 7, 10, 13, 16],
'Col2': [2, 5, 8, 11, 14, 17],
'Col3': [3, 6, 9, 12, 15, 18],
'Type': [1, 1, 2, 2, 3, 3]})
List = np.random.permutation(len(df))
</code>
result = ... # put solution in this variable
BEGIN SOLUTION
<code>
def g(df, List):
return df.iloc[List]
result = g(df.copy(), List)
import pandas as pd
import numpy as np
df = pd.DataFrame({'Col1': [1, 4, 7, 10, 13, 16],
'Col2': [2, 5, 8, 11, 14, 17],
'Col3': [3, 6, 9, 12, 15, 18],
'Type': [1, 1, 2, 2, 3, 3]})
List = [2, 4, 0, 3, 1, 5]expected = pd.DataFrame({'Col1': [7, 13, 1, 10, 4, 16],
'Col2': [8, 14, 2, 11, 5, 17],
'Col3': [9, 15, 3, 12, 6, 18],
'Type': [2, 3, 1, 2, 1, 3]},
index=[2, 4, 0, 3, 1, 5])
assert result.equals(expected)Problem:
I have the following DataFrame:
Col1 Col2 Col3 Type
0 1 2 3 1
1 4 5 6 1
2 7 8 9 2
3 10 11 12 2
4 13 14 15 3
5 16 17 18 3
The DataFrame is read from a CSV file. All rows which have Type 1 are on top, followed by the rows with Type 2, followed by the rows with Type 3, etc.
I would like to shuffle the order of the DataFrame's rows according to a list.
For example, give a list [2, 4, 0, 3, 1, 5] and desired DataFrame should be:
Col1 Col2 Col3 Type
2 7 8 9 2
4 13 14 15 3
0 1 2 3 1
3 10 11 12 2
1 4 5 6 1
5 16 17 18 3
...
I want to know how many rows have different Type than the original DataFrame. In this case, 4 rows (0,1,2,4) have different Type than origin.
How can I achieve this?
A:
<code>
import pandas as pd
import numpy as np
df = pd.DataFrame({'Col1': [1, 4, 7, 10, 13, 16],
'Col2': [2, 5, 8, 11, 14, 17],
'Col3': [3, 6, 9, 12, 15, 18],
'Type': [1, 1, 2, 2, 3, 3]})
List = np.random.permutation(len(df))
</code>
result = ... # put solution in this variable
BEGIN SOLUTION
<code>
def g(df, List):
df2 = df.iloc[List].reindex().reset_index(drop=True)
return (df2.Type != df.Type).sum()
result = g(df.copy(), List)
import pandas as pd
import numpy as np
df = pd.DataFrame({'Col1': [1, 4, 7, 10, 13, 16], 'Col2': [2, 5, 8, 11, 14, 17], 'Col3': [3, 6, 9, 12, 15, 18], 'Type': [1, 1, 2, 2, 3, 3]})
List = [5, 4, 3, 2, 1, 0]expected = 6 assert result == expected
Problem: How do I get the dimensions of an array? For instance, this is (2, 2): a = np.array([[1,2],[3,4]]) A: <code> import numpy as np a = np.array([[1,2],[3,4]]) </code> result = ... # put solution in this variable BEGIN SOLUTION <code>
result = a.shape
import numpy as np a = np.array([[1, 2], [3, 4]])
expected = (2, 2) assert result == expected
Problem: I want to figure out how to replace nan values from my array with np.inf. For example, My array looks something like this: x = [1400, 1500, 1600, nan, nan, nan ,1700] #Not in this exact configuration How can I replace the nan values from x? A: <code> import numpy as np x = np.array([1400, 1500, 1600, np.nan, np.nan, np.nan ,1700]) </code> x = ... # put solution in this variable BEGIN SOLUTION <code>
x[np.isnan(x)] = np.inf
import numpy as np x = np.array([1, 2, 3, 4, 5])
expected = np.array([1, 2, 3, 4, 5]) np.testing.assert_array_equal(result, expected)
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns x = 10 * np.random.randn(10) y = x # plot x vs y, label them using "x-y" in the legend # SOLUTION START
plt.plot(x, y, label="x-y") plt.legend()
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns x = 10 * np.random.randn(10) y = x
ax = plt.gca() assert len(ax.lines) == 1 assert ax.lines[0].get_label() == 'x-y'
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns x = 10 * np.random.randn(10) y = x # plot x vs y, label them using "x-y" in the legend # SOLUTION START
plt.plot(x, y, label="x-y") plt.legend()
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns x = np.array([1, 2, 3]) y = x[::2]
ax = plt.gca() assert len(ax.lines) == 1 assert ax.lines[0].get_label() == 'x-y'
Problem: I have a set of data and I want to compare which line describes it best (polynomials of different orders, exponential or logarithmic). I use Python and Numpy and for polynomial fitting there is a function polyfit(). How do I fit y = Alogx + B using polyfit()? The result should be an np.array of [A, B] A: <code> import numpy as np import scipy x = np.array([1, 7, 20, 50, 79]) y = np.array([10, 19, 30, 35, 51]) </code> result = ... # put solution in this variable BEGIN SOLUTION <code>
result = np.polyfit(np.log(x), y, 1)
import numpy as np x = np.array([1, 2, 3, 4, 5]) y = np.array([0, 0, 0, 0, 0])
expected = np.array([0.0, 0.0]) np.testing.assert_allclose(result, expected, atol=0.01)
Problem: I have a set of data and I want to compare which line describes it best (polynomials of different orders, exponential or logarithmic). I use Python and Numpy and for polynomial fitting there is a function polyfit(). How do I fit y = Alogx + B using polyfit()? The result should be an np.array of [A, B] A: <code> import numpy as np import scipy x = np.array([1, 7, 20, 50, 79]) y = np.array([10, 19, 30, 35, 51]) </code> result = ... # put solution in this variable BEGIN SOLUTION <code>
result = np.polyfit(np.log(x), y, 1)
import numpy as np x = np.array([1, 7, 20, 50, 79]) y = np.array([10, 19, 30, 35, 51])
expected = np.array([5.123, 1.543]) np.testing.assert_allclose(result, expected, atol=0.1)
Problem: How do I convert data from a Scikit-learn Bunch object (from sklearn.datasets) to a Pandas DataFrame? from sklearn.datasets import load_iris import pandas as pd data = load_iris() print(type(data)) data1 = pd. # Is there a Pandas method to accomplish this? A: <code> import numpy as np from sklearn.datasets import load_iris import pandas as pd data = load_data() </code> data1 = ... # put solution in this variable BEGIN SOLUTION <code>
data1 = pd.DataFrame(data=np.c_[data['data'], data['target']], columns=data['feature_names'] + ['target'])
import numpy as np from sklearn.datasets import load_iris import pandas as pd data = load_iris() data.data = np.array([[1, 2, 3, 4], [5, 6, 7, 8]]) data.target = np.array([0, 1]) data.feature_names = ['f1', 'f2', 'f3', 'f4']
expected = pd.DataFrame(data.data, columns=data.feature_names) expected['target'] = data.target pd.testing.assert_frame_equal(result, expected)
Problem: How do I convert data from a Scikit-learn Bunch object (from sklearn.datasets) to a Pandas DataFrame? from sklearn.datasets import load_iris import pandas as pd data = load_iris() print(type(data)) data1 = pd. # Is there a Pandas method to accomplish this? A: <code> import numpy as np from sklearn.datasets import load_iris import pandas as pd data = load_data() </code> data1 = ... # put solution in this variable BEGIN SOLUTION <code>
data1 = pd.DataFrame(data=np.c_[data['data'], data['target']], columns=data['feature_names'] + ['target'])
from sklearn.datasets import load_iris import pandas as pd data = load_iris()
expected = pd.DataFrame(data.data, columns=data.feature_names) expected['target'] = data.target pd.testing.assert_frame_equal(result, expected)
Problem: I'm using tensorflow 2.10.0. I am trying to change a tensorflow variable to another value and get it as an integer in python and let result be the value of x. import tensorflow as tf x = tf.Variable(0) ### let the value of x be 1 So the value has not changed. How can I achieve it? A: <code> import tensorflow as tf x = tf.Variable(0) </code> # solve this question with example variable `x` BEGIN SOLUTION <code>
x.assign(1)
import tensorflow as tf x = tf.Variable(0)
expected = 1 assert result == expected
Problem: I'm using tensorflow 2.10.0. I am trying to change a tensorflow variable to another value and get it as an integer in python and let result be the value of x. import tensorflow as tf x = tf.Variable(0) ### let the value of x be 1 So the value has not changed. How can I achieve it? A: <code> import tensorflow as tf x = tf.Variable(0) </code> # solve this question with example variable `x` BEGIN SOLUTION <code>
x.assign(1)
import tensorflow as tf x = tf.Variable(5)
expected = 6 assert result == expected
Problem: Is it possible in PyTorch to change the learning rate of the optimizer in the middle of training dynamically (I don't want to define a learning rate schedule beforehand)? So let's say I have an optimizer: optim = torch.optim.SGD(..., lr=0.01) Now due to some tests which I perform during training, I realize my learning rate is too high so I want to change it to say 0.001. There doesn't seem to be a method optim.set_lr(0.001) but is there some way to do this? A: <code> import numpy as np import pandas as pd import torch optim = load_data() </code> BEGIN SOLUTION <code>
for param_group in optim.param_groups:
param_group['lr'] = 0.001
import torch optim = torch.optim.SGD(torch.nn.Linear(10, 10).parameters(), lr=0.01) optim.param_groups[0]['lr'] = 0.001 result = optim.param_groups[0]['lr']
assert result != 0.01
Problem: Is it possible in PyTorch to change the learning rate of the optimizer in the middle of training dynamically (I don't want to define a learning rate schedule beforehand)? So let's say I have an optimizer: optim = torch.optim.SGD(..., lr=0.01) Now due to some tests which I perform during training, I realize my learning rate is too high so I want to change it to say 0.001. There doesn't seem to be a method optim.set_lr(0.001) but is there some way to do this? A: <code> import numpy as np import pandas as pd import torch optim = load_data() </code> BEGIN SOLUTION <code>
for param_group in optim.param_groups:
param_group['lr'] = 0.001
import torch optim = torch.optim.SGD(torch.nn.Linear(10, 1).parameters(), lr=0.01) optim.param_groups[0]['lr'] = 0.001 result = optim.param_groups[0]['lr']
assert result == 0.001
The full grid: all 100 sampled implementations × all parseable suites per problem, matched cells (both experts from the same weights). Acceptance = the implementation passes every test in the suite; ground truth R(c) is the official DS-1000 verdict on each implementation.
| model (both sides) | grid cells | Ẑ | β | P(correct | agree) | gain | LR | α₁₁ / α₁₀ / α₀₁ / α₀₀ |
|---|---|---|---|---|---|---|---|
| 4B nothink | 9,435,800 | 0.0841 | 0.2928 | 0.7424 | +0.450 | 7.0 | 0.961 / 0.016 / 0.1445 / 0.0204 |
| 8B nothink | 9,606,900 | 0.0772 | 0.3568 | 0.8517 | +0.495 | 10.4 | 0.923 / 0.023 / 0.1174 / 0.0118 |
| 14B nothink | 9,711,300 | 0.1268 | 0.4300 | 0.8694 | +0.439 | 8.8 | 0.913 / 0.036 / 0.1240 / 0.0162 |
The question a user actually has, answered over all problems, not only those where the filter fires: sample programs and suites for the problem; if any pair agrees, ship one of the accepted programs at random; if nothing agrees, fall back to shipping a random program. The oracle ships a correct program whenever any of the 100 exists — unachievable, it only marks the room the filter had. Unlike the OCaml benchmark there is no free public-test filter to beat here; the natural cheap competitor (runs-without-error) is future work.
| model (both sides) | ship a random program | ship an accepted one | gain | oracle best-of-100 | headroom captured | problems where nothing agrees |
|---|---|---|---|---|---|---|
| 4B nothink | 0.292 | 0.305 | +0.012 | 0.351 | 21% | 784 / 994 |
| 8B nothink | 0.354 | 0.365 | +0.011 | 0.422 | 17% | 786 / 996 |
| 14B nothink | 0.429 | 0.450 | +0.021 | 0.494 | 32% | 701 / 998 |
One dot per problem: how often this model's programs are correct (β) against how often a sampled pair agrees (Ẑ), shaded by suite faithfulness φ — which, thanks to the official reference, is known even at β = 0. Bottom-left: the code expert has nothing correct and no filter could help. Top-left dark dots: correct code exists but suites are too wrong to accept it — what better tests would recover. Agreement without correctness (high Ẑ, low β, dark φ) costs precision.
The target is a product of experts, so conditioning on agreement reweights the suite exactly as much as the program. The code half is precision and gets reported everywhere; the test half is P(suite faithful | agreement).
| model | β prior | β tilted | Δ | φ prior | φ tilted | Δ |
|---|---|---|---|---|---|---|
| 4B nothink | 0.293 | 0.742 | +0.450 | 0.120 | 0.545 | +0.426 |
| 8B nothink | 0.357 | 0.852 | +0.495 | 0.101 | 0.527 | +0.426 |
| 14B nothink | 0.430 | 0.869 | +0.439 | 0.176 | 0.642 | +0.466 |
φ tilted = P(F=1 | A=1) = φ(β·α₁₁ + (1−β)·α₀₁)/Ẑ, from the pooled rates (the identity is exact per problem; pooled it is approximate). An accepted pair is strong evidence about the suite too: agreement is a way to harvest good suites, not only good code.
A test executes as setup + solution + check in the problem's official
exec_context frame (imports, test_input unpacking, def-wrapping for
function-completion problems, result assignment), in the DS-1000 pinned environment
(py3.10, numpy 1.26.4, pandas 1.5.3, sklearn 1.4.0, scipy 1.12.0, tf 2.16.1, torch 2.2.0); a crash or a
90s timeout is a rejection. The grid is never evaluated pair by pair: every distinct (setup, check,
candidate) triple executes once and the suites×codes grid is reconstructed by lookup — suites repeat tests
heavily and samplers repeat code, so this collapses ~100M pair-tests per model to a few million distinct
executions. Suites: vxef/ds1000-test-rollouts (with per-test faithfulness verdicts under
faithfulness/). Code + passed labels: samuki-hf/thinking-rollouts.
Symbols follow the OCaml joint-coding-and-testing page.