A prompt for in-context learning (ICL) can describe a task in addition to, or instead of, demonstrating it through examples. Yet how task descriptions work remains poorly understood theoretically. Through the Bayesian view of ICL, we model descriptions as informative priors characterized by their specificity and reliability. We adapt the effective sample size (ESS) from Bayesian statistics, quantifying a description's predictive value as an equivalent number of demonstrations. For in-context linear regression, we show that a reliable description's ESS grows with its specificity and with the task's dimension. A description that may be irrelevant, however, gains little from its specificity unless demonstrations are given. In practice, do in-context learners use descriptions as a Bayes-optimal predictor would? Our experiments show that meta-trained Transformers come close to the Bayes-optimal ESS when tested on their training distribution. Pretrained language models, however, make too little use of highly specific descriptions when answering without reasoning; most of them closely match the Bayes-optimal predictor only when reasoning is enabled. These results extend the Bayesian analysis of ICL from demonstrations to descriptions.
Figures & tables
Figure 1: Measuring a task description in demonstrations. (a) A description’s ESS is the number of demonstrations that lower the error as much as it does. (b) The prior on the task w under three descriptions, and each description’s Bayes-optimal ESS at n=0 , with d=5 and baseline prior variance τ02=10 (dashed); τ is the standard deviation of the task around the description’s prior mean m . The curves are sketches and the quoted instructions are illustrations; dots mark the true task, and the pink curve is the prior when the description is about the wrong task.
Figure 2: Without demonstrations, reliability limits the benefit of specificity; demonstrations recover much of it. Bayes-optimal ESS with d=5 and τ02=10 . (a) ESS0 versus the description’s standard deviation τ , for p=1 and p=0.9 ; a smaller τ means a more specific description. The dotted line is the finite ceiling as τ→0 at p=0.9 , about 4.7 here; it tends to p2d=4.05 as τ0→∞ . (b) ESSn versus the number of demonstrations n for three descriptions with τ=0.1 : reliable, unreliable ( p=0.9 ), and a reliable partial description, which constrains k=3 of the 5 coordinates of the task. Values are Monte Carlo estimates (Appendix A.2 ).
Figure 3: Meta-trained Transformers approach Bayes-optimal ESS and act on the reliability seen in training. Results use c=10 , d=5 , τ02=10 , and no demonstrations. (a) Training and test reliability match. Network ESS uses each network’s own baseline curve; bars show the mean and one standard deviation across three training seeds. The Bayes-optimal bars use the same prompts as the networks, so that sampling noise is common to both; Table 5 gives larger-sample values. (b) Networks trained at each reliability, evaluated at each test reliability. Cells show network ESS as a share of the Bayes-optimal ESS under the test distribution, estimated on 200,000 prompts; outlined cells have matching reliabilities. Table 5 includes c=1 .
Figure 4: Language models use the precision and the reliability that a prompt states mainly with reasoning enabled. Median ESS over n=1 , 2 , and 4 , from error averaged over 200 tasks at σ=60 ; 95% bootstrap intervals resample tasks and are clipped to the display. The reference’s ESS in (a) and (b) is close to c . (a) Descriptions generated and stated with standard deviation 30 , so c=4 . (b) With standard deviation 10 , so c=36 . (c) GPT-6 Sol, Opus 4.6, and Haiku 5.5 on the descriptions of (b) at reliability p=0.9 , which the prompt states. Squares in (b) mark two models whose own baseline curves never reach their error with the description; their ESS is measured on the reference’s baseline curve and is not comparable with the other points.
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
Demonstrations
Description
none
many
Reliable
c+d+1
c−c0
Unreliable, p<1
p2d
p(c−c0)−Cd/d
Partial, k of d coordinates
k
k(c−c0)/d
Appendix
Table 1: The Bayes-optimal value of a description, in demonstrations. Limits of the ESS of a description with precision c=τ−2 : without demonstrations, for a vague baseline prior ( τ0→∞ with τ fixed), and after many demonstrations ( n→∞ with τ0 fixed, c0=τ0−2 ). The constant Cd>0 is defined in Proposition 2 (iii). The limits are proved in Propositions 1 , 2 , and 5 .
d
c
p
p(c−c0)
Cd/d
n2Vn/d , n=400
limit
16
100
0.9
89.91
<0.0001
<0.0001
89.91
16
1
0.9
0.81
<0.0001
<0.0001
0.81
5
10
0.9
8.91
0.0020(0.0001)
0.0024(0.0007)
8.91
5
1
0.9
0.81
0.0099(<0.0001)
0.0104(0.0005)
0.80
5
1
0.5
0.45
0.0232(0.0001)
0.0237(0.0007)
0.43
1
36
0.9
32.31
1.302(0.005)
1.310(0.049)
31.01
Appendix
Table 2: After many demonstrations, an unreliable description’s ESS is within 0.03 demonstrations of p(c−c0) at d≥5 and further below it at d=1 . The two terms of the limit in Proposition 2 (iii) and the limit itself, at τ02=10 . The term Cd/d is a Monte Carlo estimate of its defining expectation from two million draws of (m,w) . The next column estimates the same quantity by simulating n2Vn/d at n=400 , on 20,000 prompts ( 4,000 at d=16 ). Standard errors are in parentheses.
d
τ02
ESS0 , p=1
c+d+1
ESS0 , p=0.9
p2d
5
1
105.0
106
8.7
4.05
5
10
105.8
106
4.7
4.05
5
100
105.9
106
4.2
4.05
16
1
115.8
117
17.3
12.96
16
10
116.9
117
13.5
12.96
16
100
117.0
117
13.0
12.96
Appendix
Table 3: The cost of unreliability at other dimensions and baseline variances. Bayes-optimal zero-shot ESS of a c=100 description at p=1 and p=0.9 , with the limits of Propositions 1 and 2 . The baseline curve is estimated from 4,000 sets of demonstration inputs per count ( 1,500 at d=50 ). At d=5 and τ02=10 , Figure 2 uses more prompts and gives 105.9 .
c=1
c=100
k
n=0
n=10
n=100
n=400
n→∞
n=0
n=10
n=100
n=400
n→∞
1
0.9
0.4
0.2
0.2
0.2
1.0
2.2
11.4
16.9
20.0
2
1.9
0.8
0.4
0.4
0.4
2.1
5.6
25.6
35.2
40.0
3
2.9
1.2
0.6
0.5
0.5
3.2
11.8
44.0
55.1
59.9
4
4.0
1.6
0.8
0.7
0.7
4.6
26.4
68.5
77.0
79.9
5
5.9
1.9
1.0
0.9
0.9
106
105
103
101
99.9
Appendix
Table 4: Demonstrations can increase the value of a specific partial description. Bayes-optimal ESS for a reliable description of k of d=5 coordinates, with τ02=10 and precision c=τ−2 . The case k=5 is a complete description. Each block reports ESS after n demonstrations and its large-sample limit (c−c0)k/d . Estimates use eight batches of 2,000 prompts; standard errors are at most 0.14 .
ESS
c
ptrain
ptest
Seeds
Network
Bayes ptrain
Bayes ptest
Weight q
1
1
1
2
5.85±0.03
5.89
—
0.964
1
1
0.99
1
5.65±0.06
5.66
5.61
0.991
1
1
0.9
2
4.02±0.03
3.98
4.10
0.964
10
1
1
3
14.26±0.48
15.91
—
1.008
10
1
0.99
2
9.38±0.16
9.54
8.96
1.015
Appendix
Table 5: Transformer ESS and fitted description weights under matched and shifted reliability. Results use d=5 , τ02=10 , and no demonstrations, with 20,000 test prompts per network. Rows are grouped by training reliability. Network reports mean ESS and standard deviation across the indicated training seeds; for a single seed, the uncertainty is the standard error over prompts. The two Bayesian predictors use ptrain and ptest , respectively; the latter is Bayes-optimal under the test distribution. We show one reference value when they coincide. At n=0 , a network’s prediction depends only on m and x , whose distribution does not change with the test reliability, so its fitted weight is the same at every ptest ; the ptest=0.99 rows for training reliabilities 1 and 0.9 differ only because they average one seed fewer. The values using ptest , and those using ptrain where the two reliabilities coincide, use 200,000 prompts, with standard errors at most 0.1 . The other values using ptrain use the networks’ 20,000 test prompts and can differ from a large-sample value by up to 0.6 , which is why some exceed the Bayes-optimal value beside them. Weight is the fitted description weight q in y^≈qm⊤x , averaged across the available seeds. This coefficient is unrestricted and need not be a relevance probability.
Figure 5: Transformer ESS as a function of demonstration count. Each line represents a training seed; the Bayes-optimal predictor is evaluated on the same prompts. Training and test reliability are matched. Results cover c=10 and c=1 at d=5 , using 20,000 prompts. A curve ends when its crossing exceeds the maximum of 20 demonstrations. The dotted line, 20−n , marks the largest ESS identifiable on this grid.
ESS, median over n=1 , 2 , 4
weight, n=1
relevant
c=36
relevant
Model
c=1
c=4
c=36
irrelevant
stated p=0.9
stated p=0.5
c=1
c=4
c=36
Reference
1.3
4.4
36
≤− 1.0
22
5.8
0.50
0.80
0.97
gpt-oss-20b
0.9 [0.7, 1.0]
2.0 [1.7, 2.3]
2.8 [2.6, 3.1]
≤− 0.4
2.4 [1.9, 2.6]
2.3 [1.9, 2.7]
0.53
0.48
0.49
Phi-4
0.7 [0.4, 0.9]
4.1 [3.5, 4.6]
7.6 [6.5, 8.6]
≤− 1.0
8.7 [7.8, 9.8]
9.7 [8.7, 11]
0.82
0.76
0.74
OLMo 2 32B
1.9 [1.7, 2.1]
3.4 [3.2, 3.9]
5.3 [4.5, 6.3]
≤− 0.6
6.0 [5.6, 7.1]
5.4 [5.0, 6.0]
0.72
0.70
0.70
Appendix
Table 6: Description ESS and weights in the 2,000 -task run without reasoning. Left: median ESS over n=1 , 2 , and 4 , for relevant descriptions with c=1 , 4 , and 36 , and for the c=36 description when irrelevant or given a stated reliability of p=0.9 or p=0.5 . The stated-reliability columns come from the open-alternative design of Appendix C.6 , in which every description is relevant and the prompt says only that the mean is otherwise unknown; they are not the mixed-reliability design of Section 5.2 . Brackets give 95% bootstrap intervals. The marker ≤ shows that a median is only an upper bound, because at one of its three counts a single demonstration already gives lower error than the description (Appendix C.2 ); such a median is rounded up so that the printed bound holds, and so can be 0.1 above the same value as rounded in Tables 15 and 16 . Right: the coefficient on the prior mean at n=1 ; the Bayesian reference weight is c/(c+n) . All results use σ=60 . “Written” denotes the written readout.
Figure 6: Learning curves used to estimate language-model ESS. Root-mean-square error versus demonstration count for the reference and six models in the 2,000 -task run without reasoning, at σ=60 . Blue curves omit the description; green curves use relevant descriptions, with darker shades indicating higher c . Replies without a number are excluded. ESS is the horizontal distance from the point with the description at n to the baseline curve at the same error. For Phi-4, OLMo 2 32B, Qwen3.5 9B, and Gemma 4 31B, error with c=36 increases between one and two demonstrations because the models shift toward the demonstrations more than the reference does; Table 17 shows this for the first two.
c=1
c=4
c=36
Predictor
log n
linear
monotone
fit
log n
linear
monotone
fit
log n
linear
monotone
fit
Reference
1.3
1.4
1.3
1.0
4.4
4.7
4.4
4.0
36
38
36
35
gpt-oss-20b
0.9
1.0
0.9
0.9
2.0
2.4
2.0
2.4
2.8
2.9
2.8
3.4
Phi-4
0.7
0.8
0.7
0.4
4.1
4.4
4.1
3.6
7.6
8.1
7.6
7.1
OLMo 2 32B
1.9
2.1
1.9
1.4
3.4
3.7
3.4
3.3
5.3
5.8
5.3
5.5
Qwen3.5 9B (written)
0.2
0.3
0.2
− 0.1
2.7
2.9
2.7
1.3
4.0
4.3
4.0
2.8
Appendix
Table 7: Sensitivity of median ESS to baseline-curve estimation. Median ESS over n=1 , 2 , and 4 for relevant descriptions, using the 2,000 -task run without reasoning at σ=60 . “Log n ” is the primary estimator; “linear” interpolates in n ; “monotone” applies a nonincreasing fit; and “fit” uses A/(n+n0)+B . The reference’s idealized ESS values are 1 , 4 , and 36 .
weight, n=1
weight, n=4
Model
Wording of the description
number
c=1
c=4
c=36
c=1
c=4
c=36
Gemma 4 12B
normal, mean m , sd τ (ours)
1.00
0.34
0.24
0.59
0.19
0.24
0.31
about m , give or take τ
1.00
1.00
1.00
1.00
0.87
0.76
0.82
Mean: m±τ
1.00
1.00
1.00
1.00
0.60
0.66
0.74
earlier estimate m , s.e. τ
1.00
1.00
1.00
1.00
0.45
0.54
0.67
Gemma 4 31B
normal, mean m , sd τ (ours)
1.00
0.48
0.49
0.72
0.02
0.04
0.18
Appendix
Table 8: Description weights under four wordings without reasoning. Weights are reported for the three relevant descriptions at n=1 and 4 , using written readouts on the tasks of the 2,000 -task run. “Number” denotes the numeric response rate averaged over demonstration counts; a weight is italicized when the response rate at that count is below three quarters. The reference weights are 0.50 , 0.80 , and 0.97 at n=1 , and 0.20 , 0.50 , and 0.90 at n=4 . A fitted weight above 1 means that, holding the sample mean fixed in the regression, a unit change in the prior mean corresponds to more than a unit change in the prediction. Wording changes overall reliance on the description, but the observed change with stated precision remains smaller than the reference change.
Stated reliability
Run
c=1
c=4
c=36
Irrelevant
p=0.9
p=0.5
Stated c=4 Generated c=36
Reference
1.0
3.5
34.6
≤−1.0
27.5
5.7
13.7
GPT-6 Sol, without reasoning
0.9
1.9
10
≤−1.0
3.3
0.9
2.4
GPT-6 Sol, with reasoning (low)
0.9
3.3
35(34)
≤−1.0
30(29)
4.2
11
Opus 4.6, without reasoning
0.9
2.0
5.8(5.9)
≤−1.0
6.1(6.0)
3.8
3.0
Opus 4.6, with reasoning (high)
1.0
3.5
35
≤−1.0
29
3.8
13
Appendix
Table 9: Description ESS across reasoning settings. Results use the first 200 tasks at σ=60 . Median ESS uses each run’s own baseline curve; parentheses report the value computed using the reference baseline where it differs. “Stated reliability” gives the reliability that the prompt states for a description generated at c=36 , in the open-alternative design of Appendix C.6 : every description is in fact relevant, and the prompt says only that the mean is otherwise unknown. These columns therefore differ from the mixed-reliability design of Section 5.2 , whose results are in Table 11 . The last column fixes the generating precision at 36 and states it as 4 . Each run names the mode and, in parentheses, the provider’s effort setting. An upper bound, ≤ , indicates that one demonstration alone gives lower error; >60 means that the error with the description lies below the model’s entire baseline curve, through n=64 , so no crossing exists on the grid. Reference values use the same tasks and estimator. The open-weight rows without reasoning take these 200 tasks from the 2,000 -task run, whose results on all its tasks are in Table 6 . The runs also include three further conditions in which the stated precision differs from the generating one, not shown.
c=4
c=36
Run
n=1
2
4
1
2
4
Reference
26.7
24.0
19.9
9.5
9.3
9.3
GPT-6 Sol, without reasoning
32.1
28.6
24.2
15.2
16.3
18.4
GPT-6 Sol, with reasoning (low)
26.7
26.7
20.1
9.5
9.4
9.6
Opus 4.6, without reasoning
29.4
28.1
23.7
13.6
18.9
18.1
Opus 4.6, with reasoning (high)
26.7
24.0
19.8
9.5
9.3
9.3
Appendix
Table 10: Absolute error with a description. Root-mean-square error against the latent mean, for descriptions generated and stated at c=4 and c=36 , on the first 200 tasks at σ=60 . Rows are the runs of Table 9 , whose ESS compares each run with its own baseline curve; this table reports the error itself. Replies without a number are excluded.
p=0.9
p=0.5
ESS
rel.
irr.
ESS
rel.
irr.
Reference
5.0[3.9,6.2]
0.9[0.5,1.2]
Fixed weights
0.3[−0.2,1.0]
−0.7[−1.0,−0.4]
Ignores the warning
−0.1[−0.6,0.6]
≤−1.0
GPT-6 Sol, low effort
4.8[3.8,6.3]
89%
92%
0.8[0.5,1.2]
90%
92%
Opus 4.6, high effort
5.0[3.9,6.9]
100%
96%
0.9[0.5,1.3]
98%
96%
Appendix
Table 11: Unreliable descriptions with stated reliability. Median ESS in the mixed-reliability design, with 95% bootstrap intervals over tasks, and the share of replies within 2 of the reference’s prediction when the description is relevant (rel.) and irrelevant (irr.), pooled over n=1 , 2 , and 4 . A value of ≤−1.0 is censored: at n=2 the description does worse than one demonstration alone.
Stated p=0.5
Stated p=0.9
n=1
2
4
1
2
4
Reference
0.58
0.61
0.64
0.88
0.87
0.84
Fixed weights
0.49
0.47
0.45
0.88
0.85
0.81
GPT-6 Sol
0.49
0.46
0.40
0.90
0.86
0.71
Opus 4.6
0.56
0.43
0.40
0.93
0.86
0.77
Gemma 4 31B
0.49
0.46
0.45
0.89
0.68
0.76
Appendix
Table 12: Description weights under stated unreliability. Fitted coefficients on the c=36 prior mean for the first 200 tasks, with stated reliability p . All model rows use reasoning. “Fixed weights” uses weight p36/(36+n) ; the reference updates the relevance probability using a uniform baseline prior over 100 to 999 . Bootstrap standard errors are at most 0.03 at n=4 at the stated p=0.5 and at most 0.06 overall, except for gpt-oss-20b, whose maximum is 0.09 . At the stated p=0.5 , several reasoning configurations closely track fixed-weight averaging.
Stated p=0.5
Stated p=0.9
n=1
2
4
1
2
4
Reference
0.58
0.61
0.64
0.88
0.87
0.84
Fixed weights
0.49
0.47
0.45
0.88
0.85
0.81
GPT-6 Sol, unstated
0.49
0.46
0.40
0.90
0.86
0.71
GPT-6 Sol, stated
0.58
0.59
0.59
0.88
0.83
0.80
Haiku 5.5, unstated
0.55
0.56
0.46
0.79
0.93
0.89
Appendix
Table 13: Stating the baseline prior changes description weights. Fitted coefficients on the c=36 prior mean for the first 200 tasks, as in Table 12 . “Unstated” denotes the open-alternative design’s warning, “the mean is unknown”; “stated” specifies that the mean is otherwise uniform over 100 to 999 , as the reference assumes. GPT-6 Sol uses low effort, Haiku 5.5 medium effort, and Opus 4.6 high effort.
Note
n
Reference
Haiku 5.5 medium
GPT-6 Sol low
GPT-6 Sol no reasoning
Broad
0
0.0
0.0
≤0
≤0
2
1.4
1.3
1.3
0.7
4
1.8
1.6
1.7
8.6
Specific
0
3.7
3.6
3.3
3.7
2
11.4
9.9
9.5
13.5
4
14.8
14.5
26.1
>28
Appendix
Table 14: ESS of notes in the message-sorting experiment. Results use 200 tasks and each model’s own baseline curve, measured without a note. “ ≤0 ” means that the note did not lower loss; “ >28 ” means that the baseline curve does not reach the loss with the note by n=32 . On 6,000 simulated tasks, the reference ESS is 9.6 and 13.2 for the specific note at n=2 and 4 , and 2.5 and 2.9 for the unreliable note. Models are compared with the reference on the same 200 tasks. Paired 95% bootstrap intervals over tasks ( 1,000 replicates) for the specific note at n=2 are: reference [ 9.7 , 12.9 ], Haiku 5.5 [ 8.7 , 11.5 ], GPT-6 Sol at low effort [ 7.8 , 12.7 ], and GPT-6 Sol without reasoning [ 3.7 , 21.9 ].
Predictor
Description
number
n=1
n=2
n=4
n=8
n=16
n=32
n=64
Reference
σ=60 , c=1 , relevant
1.2
1.3
1.3
1.3
1.2
1.5
>0
σ=60 , c=1 , irrelevant
≤ 0.0
− 0.5
− 0.8
− 1.2
− 1.7
− 1.5
− 1.7
σ=60 , c=4 , relevant
4.5
4.4
3.9
4.6
4.6
5.2
>0
σ=60 , c=4 , irrelevant
≤ 0.0
≤− 1.0
≤− 3.0
− 6.2
− 12
− 20
− 32
σ=60 , c=36 , relevant
36
36
37
38
39
>32
>0
σ=60 , c=36 , irrelevant
≤ 0.0
≤− 1.0
≤− 3.0
≤− 7.0
≤− 15
≤− 31
− 62
Appendix
Table 15: ESS by description condition and demonstration count: distribution readout. Results cover the Bayesian reference and the three distribution-readout models in the 2,000 -task run without reasoning. “Number” is the numeric response rate averaged over n . “Stated p ” is the reliability that the prompt states. The censoring marker ≤ marks error above the first baseline point; >64−n means that the error with the description lies below the entire baseline curve through 64 demonstrations.
Predictor
Description
number
n=1
n=2
n=4
n=8
n=16
n=32
n=64
Qwen3.5 9B (written)
σ=60 , c=1 , relevant
1.00
0.2
0.3
− 0.9
− 2.8
− 9.3
− 24
− 51
σ=60 , c=1 , irrelevant
1.00
≤ 0.0
≤− 1.0
− 2.7
− 4.8
− 9.7
− 23
− 49
σ=60 , c=4 , relevant
1.00
3.9
2.7
1.3
− 0.7
− 6.2
− 18
− 44
σ=60 , c=4 , irrelevant
1.00
≤ 0.0
≤− 1.0
− 1.7
− 3.8
− 9.4
− 24
− 49
σ=60 , c=36 , relevant
1.00
6.5
4.0
2.8
6.9
17
>32
>0
σ=60 , c=36 , irrelevant
1.00
≤ 0.0
≤− 1.0
− 2.8
− 5.1
− 10
− 24
− 51
Appendix
Table 16: ESS by description condition and demonstration count: written readout. Results cover the three written-readout models in the 2,000 -task run without reasoning. Replies without a qualifying number are excluded. Columns and reference values follow Table 15 .
Predictor
Description
number
n=0
n=1
n=2
n=4
n=8
n=16
n=32
n=64
Reference
σ=60 , c=1 , relevant
1.00
0.50
0.33
0.20
0.11
0.06
0.03
0.02
σ=60 , c=1 , irrelevant
1.00
0.50
0.33
0.20
0.11
0.06
0.03
0.02
σ=60 , c=4 , relevant
1.00
0.80
0.67
0.50
0.33
0.20
0.11
0.06
σ=60 , c=4 , irrelevant
1.00
0.80
0.67
0.50
0.33
0.20
0.11
0.06
σ=60 , c=36 , relevant
1.00
0.97
0.95
0.90
0.82
0.69
0.53
0.36
σ=60 , c=36 , irrelevant
1.00
0.97
0.95
0.90
0.82
0.69
0.53
0.36
Appendix
Table 17: Description weights by demonstration count: distribution readout. Results cover the Bayesian reference and the three distribution-readout models in the 2,000 -task run without reasoning. “Number” is defined as in Table 15 ; cells are italicized when the numeric response rate is below three quarters at the corresponding n .