Manuscript Offprint
arXiv:2610.02902LUMOS: Tracing Parametric Knowledge from Training Data to Behavioral Outputs in LLMs
Seoyeon Ye
Ewha Womans University
Gayoung Kim
Ewha Womans University
Jiyoung Hong
Ewha Womans University
Sookyung Kim
Ewha Womans University
Hyunsoo Cho
Ewha Womans University
Abstract
Current analyses of LLMs’ parametric knowledge are largely output-centric, drawing conclusions about what a model knows without verifying what it was actually trained on. This leaves fundamental questions, such as whether a correct response reflects genuine generalization or rote memorization, grounded in speculation rather than evidence. To resolve these ambiguities, we introduce LUMOS , a diagnostic framework that traces knowledge along the causal chain from training-data exposure to behavioral output, leveraging OLMo 2 with its fully transparent training corpus. By grounding analysis in verified exposure, we reveal that models internally encode rare facts with high separability (84%) yet fail to express them behaviorally (54%), though this retrieval gap narrows with scale. Furthermore, when models are asked to self-reflect on their own answers, they perform reliably on trained content (83%) but drop to random-baseline levels (49%) on unseen content. This collapse persists even under chain-of-thought prompting, which inflates confidence signals rather than improving calibration. Collectively, these findings demonstrate that incorporating the training-data axis into LLM evaluation transforms speculative diagnoses into verifiable claims, and we advocate that this axis should be a standard component of knowledge assessment in LLMs.
1 Introduction
LLMs are now the world’s largest repositories of parametric knowledge. This knowledge, unlike traditional databases, is not explicitly retrieved but is implicitly reconstructed through complex neural interactions during inference [1]. This implicit and high-dimensional encoding, coupled with the stochastic nature of decoding, creates a fundamental ‘interpretability gap’: while we can observe a model’s fluent output, we remain blind to whether that output stems from a robust internal understanding or a lucky stochastic coincidence [2–4]. Consequently, the inability to map a model’s output back to its training origins represents a fundamental challenge to reliably assessing what LLMs actually know [5–7].
To bridge this gap, the research community has developed several probing techniques: the most common approach, behavioral probing, assesses knowledge through observable outputs (y) such as benchmark accuracy [8, 9] or logit-level probability distributions [10, 11]. To look beyond outputs, internal probing examines hidden representations (h) and probabilistic preferences (p) using diagnostic classifiers [12–15]. More recently, mechanistic probing utilizes techniques such as activation
Equal contribution
The code is available at: https://github.com/agilumos/lumos
40th Conference on Neural Information Processing Systems (NeurIPS 2026). Track on Evaluations and Datasets.
patching [16–18] or model editing [19–23] to isolate the specific parameters responsible for factual recall. Together, these approaches probe different stages of knowledge manifestation, from internal encoding (h, p) to final output (y), yet they all omit a critical preceding stage: the training data (D) that shaped these representations in the first place. Without this grounding, we cannot distinguish memorization from generalization, separate knowledge absence from retrieval failure, or tell whether model confidence reflects genuine understanding or frequency artifacts.
In this work, we introduce LUMOS, a diagnostic framework that completes this chain by grounding evaluation in what the model was actually trained on. As illustrated in Figure 1, LUMOS traces knowledge along the full path and organizes analysis along two axes: Training Exposure (Seen vs. Unseen) and Behavioral Accuracy (Correct vs. Incorrect). We instantiate this framework on OLMo 2 (7B–32B) with its fully transparent training corpus, constructing paired seen/unseen benchmarks across factual and reasoning domains. To ensure a fine-grained diagnosis, we stratify factual knowledge by training-time frequency (head vs. tail entities), vary prompting strategies (zero-shot, few-shot, and chain-of-thought), and evaluate models through both behavioral metrics and multiple internal probing methods and activation-based prediction. For reasoning, we compare RLVR and SFT variants across mathematical and code domains to isolate the effect of training methodology on generalization. This multi-dimensional analysis reveals the following findings:
First, models internally encode rare facts with high probe accuracy yet fail to express them in their outputs, revealing a retrieval gap in the transition. Second, when models are asked to judge whether their own answers are correct, they perform reliably on trained content but collapse to random-baseline levels on unseen content. Chain-of-thought prompting does not resolve this failure; instead, it inflates confidence signals without improving calibration. Third, factual reliability is fundamentally anchored in training exposure rather than model scale: even at 32B, accuracy on unseen content remains below 50%, while seen content consistently exceeds 80%. Few-shot prompting narrows this gap only for already-encoded knowledge, confirming that the exposure boundary represents a structural limit that neither scaling nor prompting strategies can overcome. Finally, an exposure-grounded comparison of RLVR and SFT reveals that their generalization behaviors differ qualitatively across scales: RLVR builds genuine reasoning capability at smaller scales, while at larger scales its advantage reduces to sampling efficiency. Moreover, this pattern is domain-dependent, as RLVR's gains diminish in code generation where reward-task alignment is weaker.
To summarize, we introduce LUMOS, a framework and benchmark suite that grounds LLM knowledge evaluation in training exposure, turning previously conjectured phenomena into empirically verifiable claims and uncovering failure modes that output-centric evaluation alone cannot detect.
Internal Probing (hidden vector h or logits p) examines knowledge by accessing model internals, primarily through output distribution analysis or latent representation probing. The former uses token-level logits to measure calibration and epistemic uncertainty, showing that probabilities assigned to correct answers (e.g., ) correlate more reliably with factual accuracy than surface-form text [10, 30]. To disentangle uncertainty from linguistic variability, later work focuses on semantic entropy across answer clusters [31]. Alternatively, researchers investigate latent representations via diagnostic classifiers trained on hidden states [12, 32]. Such studies consistently reveal an “expression gap,” where models encode internal information that fails to manifest in final outputs [33, 34].
Despite their differences, these lines of work share a critical blind spot: they rarely ground their conclusions in what the model actually saw during training.
3 LUMOS Taxonomy
We formalize parametric knowledge as a causal knowledge state traceable along a sequential chain:

Behavioral Accuracy
Correct
Incorrect
Training Exposure
Figure 1: A 2×2 taxonomy of model knowledge states defined by data exposure (D) and behavioral accuracy (A), enriched with parametric and decoding depth (Probabilistic Confidence (PC), Decisional Consistency (DC)).
where D denotes the training corpus (and its measurable exposure statistics), h the model's internal representations (hidden states), p the resulting probabilistic preference (logits), and y the final behavioral output.
Our central principle is training-data alignment: a model knows a unit of knowledge only to the extent that (i) the unit is supported by evidence of exposure in D, (ii) the model can reliably express it in y, and (iii) its internal uncertainty signals are calibrated to that exposure.
3.1 Dual-Axis: Exposure vs. Performance
To systematically analyze the origins of model behavior, we introduce two independent axes: Training Exposure (D) and Behavioral Accuracy (A), where denotes binary correctness against the ground-truth. As illustrated in Figure 1, their intersection yields four quadrants:
Type I: Robust Memorization ( ): Facts present in D and correctly recalled.
Type II: Knowledge Attrition ( ): Facts present in D but failing in y.
Type III: Systematic Generalization ( ): Correct responses for facts absent from D.
Type IV: Epistemic Void ( ): Expected failures defining the model's true boundaries.
3.2 Depth Axis: Quantifying Epistemic Grounding
While the dual-axis framework categorizes knowledge states, a binary is insufficient to distinguish between robust internal understanding or lucky coincidence. Since LLM decoding is inherently non-deterministic, the same query can yield various outputs, even when the underlying parametric knowledge is unchanged. To quantify the continuous spectrum ranging from robust, low-variance knowledge to fragile, high-variance behavior within each quadrant, we introduce a third axis—Epistemic Depth—which analyzes the transition stability along the causal chain from internal states (h, p) to the final output y. Specifically, for each query q, we execute N stochastic forward passes to extract the corresponding internal states and behavioral outputs:
Here, each is sampled from the probabilistic preference induced by the latent representation . This triplet allows us to measure the alignment and variance at each stage of the causal chain.
Decisional Consistency (DC) Probing : DC evaluates the robustness of the final decoding stage by measuring how consistently the model's probabilistic preferences converge to the same behavioral outcome:
where is a normalized frequency of the option for question . Intuitively, a high DC indicates that the model consistently produces the same output across multiple samples, regardless of its correctness, reflecting a stable mapping from preferences to final decisions.
Probabilistic Confidence (PC) Probing : PC quantifies the epistemic grounding of internal states. We define an uncertainty operator that analyzes the quality of the mapping from latent activations (h) to probabilistic preferences (p):
Here, U can be instantiated as either Predictive Uncertainty (e.g., logit entropy) or Latent Uncertainty (e.g., diagnostic probing scores of h). This allows us to identify whether the internal causal chain is well-grounded with high-confidence representations or remains in a fragile state despite achieving behavioral success. In particular, we employ four complementary quantification metrics (introduced in Section 4.4) to operationalize . We additionally collect self-reported confidence via prompting, and use it as auxiliary behavioral metadata.
3.3 Multidimensional Knowledge Diagnostics
We synthesize the four-quadrant framework with the epistemic depth axis (PC, DC) to define the model's internal knowledge states. This multidimensional mapping allows us to distinguish between grounded parametric knowledge and superficial behavioral patterns.
Type I (Robust Memorization, , ): High PC and DC indicates Robust Parametric Encoding, where knowledge is deeply embedded and stable. Low depth metrics instead reveal Brittle Pattern Matching via linguistic shortcuts.
Type II (Knowledge Attrition, , ): High PC identifies Latent Knowledge, where the parametric representation is preserved in the hidden states but fails to manifest during the decoding transition. Low PC confirms Weight-level Erasure, signifying that the information has been fundamentally purged from the model's parameters during the optimization process.
Type III (Systematic Generalization, , ): High depth metrics validate OOD Generalization, confirming that the model has synthesized invariant logical rules from unseen data. Low metrics indicate Spurious Generalization, where correct outputs arise from accidental alignment rather than grounded reasoning.
Type IV (Epistemic Void, , ): Low PC reflects Calibrated Uncertainty, where the model's internal signals accurately reflect its lack of knowledge. High PC, by contrast, flags Overconfident Hallucination—a critical failure mode where false outputs are generated with unwarranted internal confidence.
Our empirical analysis focuses particularly on Type II and Type IV, where the interplay between training exposure and epistemic depth reveals actionable failure modes such as retrieval bottlenecks and miscalibrated self-assessment
4 LUMOS Dataset
Our analysis requires full access to both model internals and the pretraining corpus. We therefore use the OLMo 2-Instruct family, whose fully transparent training data enables precise verification of training exposure and exposure-grounded analysis of model behavior.
4.1 Evaluation Domains: Factual vs. Reasoning
To conduct a granular diagnostic across our four epistemic quadrants (Type I–IV), we partition our evaluation into two primary domains: Factual and Reasoning. This categorical split is essential for
Table 1: Datasets used for factual and reasoning QA evaluation. Seen datasets are drawn from corpora explicitly used during training, while unseen datasets are excluded from training.
(a) Seen
| Knowledge | Domain | Dataset | # Sample |
|---|---|---|---|
| Factual | Web | DCLMWikipedia | 1,387 |
| Academic | peS2o | 366 | |
| Reasoning | Math | GSM8K (Train)MetaMath-Owmfilter | 1,3191,000 |
(b) Unseen
| Knowledge | Domain | Dataset | # Sample |
|---|---|---|---|
| Factual | Web | RealTime QA | 220 |
| Current events | 524 | ||
| Reasoning | Math | GSM8K (Test) | 1,319 |
| GSM1K | 1,205 | ||
| GSM-Symbolic | 1,000 |
isolating distinct learning mechanisms in LLMs. The Factual domain, containing knowledge such as “The capital of the U.S. is Washington D.C.,” serves to measure the stability of parametric memory. In this domain, success on unseen data is often attributable to accidental exposure or spurious guessing rather than logical deduction. In contrast, the Reasoning domain—encompassing mathematics, logic and programmatic reasoning—allows for a meaningful assessment of systematic generalization. To further analyze model behavior within this setting, we additionally include the OLMo 2-SFT family alongside OLMo 2-Instruct for comparative evaluation. This setup enables us to isolate how reasoning behavior differs across models that share the same pretraining corpus but adopt different post-training paradigms, namely supervised fine-tuning versus reinforcement-based alignment. By reporting results independently for each domain, we aim to provide a more rigorous and nuanced analysis of model behavior. To operationalize our framework, we construct a paired QA dataset consisting of Seen and Unseen QA pairs from the OLMo 2 pretraining corpus (summarized in Table 1 Seen split).
4.2 Factual Domain Construction
Seen Dataset: Web and Academic Subsets We further stratify the factual domain into Web and Academic subsets, as they exhibit different structural properties. For the Web domain, we use a 10% stratified sample chunk of the DCLM [35] and the Wikipedia subset of Dolma 1.7. [36] For the Academic domain, we utilize the peS2o [37] dataset. From the sampled chunks, we extract entities and their associated frequencies through the following pipeline. We organize queries around entity-centric questions, using DBpedia [38] for the Web domain and OpenAlex Concepts [39] for Academic. We employ an Aho–Corasick automaton [40] to perform exact-string matching across the entire pretraining mix to calculate precise exposure counts. To analyze how frequency affects knowledge stability, we rank entities by their evidence volume. Following the definition in [41], high-frequency (Head) entities are defined as those whose cumulative relationships account for the top one-third of all entities when sorted by frequency. Low-frequency (Tail) entities are then sampled from those appearing exactly once in the entire pretraining corpus, matched in size to the Head group. This grouping enables us to contrast model behavior across distinct regions of the frequency distribution (The full histogram is shown in Appendix Fig. 2). For each selected segment, we generate an entity-grounded Multiple-Choice Question (MCQ) using Qwen 2.5 32B following the CRAFT framework [42]. We apply a Cross-Encoder (ms-marco-MiniLM-L12-v2) to filter for high-density, factually substantive chunks.
Unseen Dataset: Temporal Sources To ensure a true “Epistemic Void,” we curate temporally novel queries from two sources: [43] and Wikipedia articles covering recent and ongoing current events. All queries are restricted to events occurring strictly after the OLMo 2 release cutoff (March 25, 2025). To prevent contamination from memorized knowledge, each multiple-choice query is reformulated as an open-ended question. Queries are removed if the model produces the correct answer in any of the N = 11 sampling trials, leaving only instances that remain consistently inaccessible to the model. The exact prompting template used for this filtering procedure is provided in Appendix E.1.
4.3 Reasoning Domain Construction
To cover a broad spectrum of reasoning, we structure our evaluation across two domains: mathematical and code-based reasoning. We focus on mathematical reasoning in this section; code-based reasoning, where reward-task alignment differs qualitatively, serves a complementary role and is presented in Appendix D.2.1.
Table 2: Factual evaluation across Seen/Unseen splits under standard prompting (zero-shot and few-shot). Self-verify denotes the accuracy computed based on the corresponding confusion matrix. Numbers in parentheses denote relative ranks (lower is better).
| OLMo 2 Types | Zero-shot | Few-shot (5) | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Seen | Unseen | Seen | Unseen | |||||||
| Academic | Web | RealTime QA | Current events | Academic | Web | RealTime QA | Current events | |||
| 7B | Behavioral | Accuracy | 75.53 (17) | 70.09 (23) | 33.88 (45) | 32.92 (46) | 78.99 (11) | 76.04 (14) | 35.70 (41) | 36.62 (39) |
| DC | 86.75 (17) | 83.36 (22) | 74.49 (36) | 73.01 (41) | 91.47 (5) | 88.96 (14) | 79.28 (30) | 78.78 (31) | ||
| Self-Verify | 28.00 (46) | 34.29 (42) | 61.27 (15) | 66.30 (10) | 26.52 (47) | 29.77 (45) | 59.94 (19) | 63.61 (11) | ||
| Internal (PC) | Norm. P | 63.19 (15) | 57.49 (19) | 28.18 (41) | 24.81 (43) | 63.44 (14) | 56.82 (21) | 27.27 (42) | 23.42 (44) | |
| MARS | 58.73 (24) | 60.00 (18) | 51.61 (45) | 50.34 (46) | 58.45 (27) | 62.20 (13) | 52.73 (43) | 58.46 (26) | ||
| Linear Probing | 80.23 (10) | 83.31 (5) | 60.94 (31) | 64.34 (29) | 75.42 (18) | 81.50 (7) | 54.74 (40) | 59.80 (32) | ||
| SAPLMA | 75.72 (6) | 83.24 (3) | 34.55 (11) | 52.93 (8) | - | - | - | - | ||
| 13B | Behavioral | Accuracy | 79.78 (7) | 74.33 (19) | 38.18 (36) | 36.36 (40) | 79.02 (10) | 75.06 (18) | 36.64 (38) | 35.14 (43) |
| DC | 91.07 (7) | 85.19 (21) | 71.85 (44) | 71.11 (45) | 89.89 (10) | 86.36 (19) | 72.95 (42) | 72.22 (43) | ||
| Self-Verify | 62.54 (12) | 55.70 (21) | 49.53 (32) | 48.42 (36) | 60.89 (17) | 57.18 (20) | 49.53 (32) | 48.02 (37) | ||
| Internal (PC) | Norm. P | 29.69 (37) | 29.54 (39) | 15.72 (47) | 17.04 (45) | 29.60 (38) | 29.36 (40) | 14.48 (48) | 16.55 (46) | |
| MARS | 64.84 (2) | 63.71 (4) | 49.99 (47) | 53.32 (41) | 64.17 (3) | 65.97 (1) | 58.17 (28) | 60.30 (16) | ||
| Linear Probing | 76.15 (17) | 82.53 (6) | 50.75 (46) | 59.51 (33) | 80.89 (8) | 83.55 (4) | 49.13 (48) | 55.13 (39) | ||
| SAPLMA | 82.97 (4) | 84.40 (2) | 27.88 (12) | 48.60 (9) | - | - | - | - | ||
| 32B | Behavioral | Accuracy | 82.97 (1) | 80.22 (5) | 43.64 (29) | 43.81 (28) | 82.41 (2) | 79.92 (6) | 43.20 (31) | 42.54 (32) |
| DC | 94.73 (1) | 89.72 (11) | 78.73 (32) | 79.81 (29) | 92.56 (4) | 87.90 (15) | 75.15 (34) | 73.75 (38) | ||
| Self-Verify | 83.76 (2) | 79.67 (7) | 54.77 (23) | 53.48 (26) | 83.83 (1) | 80.53 (5) | 53.88 (24) | 53.57 (25) | ||
| Internal (PC) | Norm. P | 57.06 (20) | 54.15 (24) | 30.17 (36) | 31.78 (34) | 57.52 (18) | 54.73 (23) | 30.54 (35) | 33.72 (33) | |
| MARS | 56.91 (33) | 62.45 (12) | 48.09 (48) | 52.34 (44) | 56.00 (38) | 62.86 (7) | 57.35 (30) | 60.06 (17) | ||
| Linear Probing | 71.32 (23) | 78.29 (15) | 50.55 (47) | 51.10 (44) | 75.41 (19) | 85.31 (2) | 52.78 (43) | 70.25 (25) | ||
| SAPLMA | 82.61 (5) | 86.19 (1) | 40.61 (10) | 59.54 (7) | - | - | - | - | ||
Seen Dataset We use the GSM8K [44] training split, which was explicitly included in the OLMo 2 training mix. We also include MetaMath-Owmfilter, a filtered MetaMathQA subset from OLMo 2's Dolmino-Mix-1124 math mixture [45, 46]. These datasets evaluate the reasoning patterns and numerical templates the model was directly exposed to during optimization.
Unseen Dataset To measure genuine generalization (Type III), we utilize the GSM8K test split along with GSM1K [47] and GSM-Symbolic [48]. These datasets are structurally aligned with the training templates but employ modified numerical values and entities. This ensures that success is contingent upon the internalization of logical rules rather than the memorization of specific answer tokens.
4.4 Evaluation Metrics
We utilize the following metrics to evaluate behavioral performance and internal epistemic trends. Detailed definitions and implementation specifications for each metric are provided in Appendix C.
Behavioral Metrics (Output y). These metrics evaluate observable performance and epistemic behavior from generated outputs, including Accuracy (fraction of correct answers in factual tasks), Pass@k (probability of obtaining at least one correct solution among k samples for reasoning tasks), Decisional Consistency (DC) (stability across N stochastic generations), and Self-Verify (the model's ability to assess its own correctness via prompting).
Probabilistic Confidence (PC). These metrics capture internal knowledge states through probabilistic preferences or hidden representations, including Normalized Probability (length-normalized conditional likelihood of answers), Linear Probing (linear separability of correctness from hidden states), MARS (semantic uncertainty via meaning-weighted token probabilities; we report AUROC of the combined score), and SAPLMA (activation-based prediction of latent correctness; reported for zero-shot only, as the method is prompt-invariant).
5 Results
Throughout our analysis, we prioritize same-metric, across-condition comparisons (e.g., Seen vs. Unseen Accuracy), which are directly interpretable. When cross-metric comparison is necessary, we rely on relative rankings within each condition (shown in parentheses; lower is better), as our claims concern the direction and consistency of the Seen/Unseen gap rather than absolute magnitudes.
Table 3: Self-Verify analysis results under standard prompting. (zero-shot and few-shot)
| OLMo 2 | Metrics | Zero-shot | Few-shot (5) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Seen | Unseen | Seen | Unseen | ||||||
| Academic | Web | RealTime QA | Current events | Academic | Web | RealTime QA | Current events | ||
| 7B | Accuracy | 28.00 | 34.29 | 61.27 | 66.30 | 26.52 | 29.77 | 59.94 | 63.61 |
| Precision | 14.13 | 14.62 | 9.70 | 15.65 | 12.68 | 13.30 | 7.88 | 13.74 | |
| Recall | 14.13 | 14.62 | 9.70 | 15.65 | 12.68 | 13.33 | 7.88 | 13.74 | |
| F1 | 14.13 | 14.62 | 9.70 | 15.65 | 12.68 | 13.31 | 7.88 | 13.74 | |
| 13B | Accuracy | 62.54 | 55.70 | 49.53 | 48.42 | 60.89 | 57.18 | 49.53 | 48.02 |
| Precision | 56.64 | 50.32 | 32.08 | 35.21 | 55.90 | 51.31 | 30.61 | 33.20 | |
| Recall | 61.45 | 57.38 | 43.64 | 48.85 | 61.81 | 56.81 | 41.21 | 45.80 | |
| F1 | 57.89 | 52.09 | 34.78 | 38.22 | 57.45 | 52.79 | 33.06 | 36.19 | |
| 32B | Accuracy | 83.76 | 79.67 | 54.77 | 53.48 | 83.83 | 80.53 | 53.88 | 53.57 |
| Precision | 79.69 | 76.12 | 39.15 | 42.38 | 79.55 | 76.58 | 37.66 | 41.61 | |
| Recall | 81.88 | 82.32 | 47.27 | 54.71 | 82.25 | 83.18 | 47.27 | 57.25 | |
| F1 | 80.22 | 77.80 | 41.11 | 45.07 | 80.34 | 78.45 | 39.98 | 45.21 | |
Table 4: Head vs. Tail evaluation (with Gap) under standard prompting (zero-shot and few-shot). Numbers in parentheses denote relative ranks (lower is better).
| OLMo 2 | Types | Metrics | Zero-shot | Few-shot (5) | ||||
|---|---|---|---|---|---|---|---|---|
| Head | Tail | Gap | Head | Tail | Gap | |||
| 7B | Behavioral | Accuracy | 86.54 (10) | 53.64 (23) | 32.90 (-13) | 88.80 (5) | 63.28 (18) | 25.52 (-13) |
| DC | 92.71 (11) | 74.01 (23) | 18.70 (-12) | 95.99 (5) | 81.92 (16) | 14.06 (-11) | ||
| Self-Verify | 25.42 (22) | 43.17 (16) | -17.75 (6) | 23.69 (24) | 35.84 (19) | -12.15 (5) | ||
| Internal (PC) | Norm. P | 72.84 (8) | 42.14 (19) | 30.71 (-11) | 71.85 (9) | 41.79 (20) | 30.06 (-11) | |
| MARS | 57.53 (23) | 62.46 (13) | -4.93 (10) | 61.39 (16) | 63.01 (12) | -1.62 (4) | ||
| Linear Probing | 82.33 (18) | 84.29 (9) | -1.96 (9) | 83.20 (13) | 79.80 (21) | 3.40 (-8) | ||
| SAPLMA | 90.78 (3) | 75.70 (6) | 15.09 (-3) | - | - | - | ||
| 13B | Behavioral | Accuracy | 87.73 (8) | 60.92 (20) | 16.44 (-12) | 85.80 (11) | 64.32 (17) | 13.22 (-6) |
| DC | 94.38 (7) | 76.00 (22) | 26.81 (-15) | 94.11 (8) | 78.61 (20) | 21.49 (-12) | ||
| Self-Verify | 63.66 (11) | 47.73 (14) | 15.93 (-3) | 64.75 (10) | 49.61 (13) | 15.15 (-3) | ||
| Internal (PC) | Norm. P | 32.46 (21) | 26.61 (23) | 5.85 (-2) | 32.32 (22) | 26.41 (24) | 5.91 (-2) | |
| MARS | 62.41 (14) | 65.00 (8) | -2.59 (6) | 65.32 (6) | 66.62 (3) | -1.30 (3) | ||
| Linear Probing | 82.84 (15) | 82.21 (19) | 0.63 (-4) | 86.82 (6) | 80.27 (20) | 6.55 (-14) | ||
| SAPLMA | 91.34 (2) | 77.45 (5) | 13.89 (-3) | - | - | - | ||
| 32B | Behavioral | Accuracy | 92.20 (1) | 68.23 (13) | 23.98 (-12) | 92.13 (2) | 67.71 (14) | 24.42 (-12) |
| DC | 96.98 (3) | 82.47 (15) | 14.51 (-12) | 96.44 (4) | 79.36 (18) | 17.09 (-14) | ||
| Self-Verify | 92.31 (2) | 67.04 (7) | 25.26 (-5) | 93.50 (1) | 67.56 (6) | 25.94 (-5) | ||
| Internal (PC) | Norm. P | 60.19 (15) | 48.11 (18) | 12.08 (-3) | 60.08 (16) | 49.37 (17) | 10.71 (-1) | |
| MARS | 58.11 (21) | 66.78 (2) | -8.67 (19) | 57.94 (22) | 67.78 (1) | -9.84 (21) | ||
| Linear Probing | 72.29 (24) | 84.29 (9) | -12.00 (15) | 86.98 (5) | 83.63 (12) | 3.35 (-7) | ||
| SAPLMA | 93.02 (1) | 79.36 (4) | 13.66 (-3) | - | - | - | ||
5.1 Results on Factual Domain
We evaluate under zero-shot and few-shot (5-shot) prompting; prompt templates in Appendix E.2.
Models internally encode knowledge they fail to express, but this gap narrows with scale. Table 2 confirms the expected exposure-driven pattern in Accuracy. However, internal metrics do not always follow the same ordering. At 7B zero-shot, Seen Web Linear Probing ranks 5th while Accuracy ranks 23rd, indicating that the latent space h encodes task-relevant information not reliably surfaced during decoding. This positive rank gap is consistently observed in Seen conditions at 7B and 13B but absent in Unseen conditions, revealing that the bottleneck arises from a failure to express already-encoded knowledge rather than from missing encoding—extending the expression gap of [33] with an exposure-aware diagnosis. This resolution is progressive: at 13B, the Seen Web rank gap narrows to +13 (Linear Probing rank 6, Accuracy rank 19 in zero-shot), intermediate between the 7B gap of +18 and the reversed gap at 32B, where Accuracy rank 1 surpasses Linear Probing rank 23 in Seen Academic zero-shot. The frequency dimension reinforces this finding. As shown in Table 4, Tail entities—appearing only once in the corpus—achieve Accuracy well above the 25% baseline across all scales (53.64% at 7B to 68.23% at 32B), yet with markedly lower DC than Head counterparts (74.01% vs. 92.71% at 7B). Linear Probing confirms this is a retrieval failure, not an encoding absence: Tail probe accuracy (rank 9) far exceeds behavioral Accuracy (rank 23) at 7B. This “recognition-over-recall” pattern—where the model retains enough parametric residue to recognize facts in MCQ format but cannot stably produce them—directly supports the retrieval bottleneck hypothesis for low-frequency knowledge. This pattern persists under Chain-of-Thought prompting, where the Head/Tail gap remains structurally consistent (Appendix Table D.1).
Table 5: Self-Verify analysis results under Chain-of-Thought prompting
| OLMo 2 | Metrics | CoT Zero-shot | CoT Few-shot (5) | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Seen | Unseen | Seen | Unseen | ||||||
| Academic | Web | RealTime QA | Current events | Academic | Web | RealTime QA | Current events | ||
| 7B | Accuracy | 31.95 | 36.79 | 62.09 | 66.41 | 26.09 | 29.94 | 55.21 | 61.35 |
| Precision | 12.70 | 15.69 | 13.21 | 18.24 | 18.57 | 22.02 | 18.90 | 22.03 | |
| Recall | 12.46 | 14.69 | 12.81 | 18.10 | 13.33 | 16.22 | 14.84 | 20.86 | |
| F1 | 12.47 | 14.70 | 12.81 | 17.68 | 14.13 | 16.95 | 15.89 | 21.04 | |
| 13B | Accuracy | 38.20 | 40.73 | 52.29 | 53.23 | 60.14 | 61.13 | 49.04 | 47.19 |
| Precision | 52.33 | 53.01 | 36.10 | 40.52 | 73.23 | 70.82 | 44.78 | 42.74 | |
| Recall | 32.68 | 38.54 | 41.30 | 48.30 | 62.63 | 69.63 | 65.15 | 61.05 | |
| F1 | 35.66 | 39.39 | 33.99 | 39.77 | 63.01 | 65.11 | 49.08 | 46.39 | |
| 32B | Accuracy | 83.56 | 79.12 | 48.98 | 49.87 | 82.28 | 79.81 | 50.91 | 50.27 |
| Precision | 82.62 | 79.01 | 45.71 | 45.67 | 82.73 | 79.63 | 43.64 | 45.05 | |
| Recall | 86.93 | 86.82 | 56.81 | 61.81 | 85.14 | 85.63 | 50.66 | 60.48 | |
| F1 | 83.37 | 80.29 | 46.73 | 48.12 | 82.44 | 80.17 | 44.11 | 47.38 | |
Table 6: Factual evaluation across Seen/Unseen splits under Chain-of-Thought prompting (zero-shot and few-shot).
| OLMo 2 | Types | Metrics | CoT Zero-shot | CoT Few-shot (5) | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Seen | Unseen | Seen | Unseen | |||||||
| Academic | Web | RealTime QA | Current events | Academic | Web | RealTime QA | Current events | |||
| 7B | Behavioral | Accuracy | 71.25 (22) | 66.34 (24) | 31.74 (48) | 32.01 (47) | 75.63 (15) | 74.10 (21) | 35.10 (44) | 35.58 (42) |
| DC | 83.09 (24) | 80.22 (28) | 66.62 (48) | 68.46 (47) | 89.47 (12) | 85.92 (20) | 73.10 (40) | 74.60 (35) | ||
| Self-Verify | 31.95 (43) | 36.79 (41) | 62.09 (13) | 66.41 (9) | 26.09 (48) | 29.94 (44) | 55.21 (22) | 61.35 (14) | ||
| Internal (PC) | Norm. P | 73.69 (4) | 73.53 (5) | 52.83 (27) | 47.88 (28) | 74.82 (3) | 69.37 (11) | 54.06 (25) | 53.45 (26) | |
| MARS | 59.84 (19) | 63.29 (5) | 56.37 (36) | 62.59 (8) | 59.00 (23) | 63.26 (6) | 57.23 (32) | 60.61 (15) | ||
| Linear Probing | 80.53 (9) | 86.45 (1) | 55.77 (36) | 69.88 (26) | 75.37 (20) | 79.58 (13) | 54.01 (42) | 70.42 (24) | ||
| 13B | Behavioral | Accuracy | 79.78 (7) | 75.63 (15) | 38.18 (36) | 38.40 (35) | 78.69 (13) | 74.11 (20) | 42.53 (33) | 42.01 (34) |
| DC | 89.41 (13) | 86.48 (18) | 68.84 (46) | 73.80 (37) | 91.32 (6) | 87.72 (16) | 73.50 (39) | 78.29 (33) | ||
| Self-Verify | 38.20 (40) | 40.73 (39) | 52.29 (28) | 53.23 (27) | 60.14 (18) | 61.13 (16) | 49.04 (34) | 47.19 (38) | ||
| Internal (PC) | Norm. P | 70.68 (8) | 73.40 (6) | 60.74 (17) | 55.46 (22) | 81.01 (2) | 83.46 (1) | 71.00 (7) | 63.02 (16) | |
| MARS | 59.41 (22) | 62.52 (9) | 57.90 (29) | 58.48 (25) | 57.24 (31) | 62.46 (11) | 56.74 (34) | 59.82 (20) | ||
| Linear Probing | 78.39 (14) | 85.04 (3) | 57.87 (35) | 59.06 (34) | 79.71 (12) | 71.71 (22) | 50.80 (45) | 63.99 (30) | ||
| 32B | Behavioral | Accuracy | 82.41 (2) | 78.93 (12) | 45.84 (25) | 44.32 (27) | 82.18 (4) | 79.30 (9) | 45.12 (26) | 43.58 (30) |
| DC | 94.41 (2) | 90.90 (9) | 83.19 (23) | 82.29 (25) | 93.97 (3) | 90.95 (8) | 81.40 (26) | 81.27 (27) | ||
| Self-Verify | 83.56 (3) | 79.12 (8) | 48.98 (35) | 49.87 (31) | 82.28 (4) | 79.81 (6) | 50.91 (29) | 50.27 (30) | ||
| Internal (PC) | Norm. P | 68.14 (12) | 67.27 (13) | 41.85 (32) | 44.45 (30) | 69.80 (10) | 70.02 (9) | 42.22 (31) | 47.20 (29) | |
| MARS | 56.19 (37) | 62.50 (10) | 52.83 (42) | 59.82 (20) | 54.84 (40) | 61.03 (14) | 55.78 (39) | 56.52 (35) | ||
| Linear Probing | 68.78 (27) | 77.80 (16) | 55.67 (37) | 68.66 (28) | 72.55 (21) | 79.88 (11) | 55.64 (38) | 54.39 (41) | ||
Meta-cognitive calibration collapses at the exposure boundary, and CoT does not resolve it. Self-Verify Accuracy rises from 28.00% (7B) to 83.76% (32B) on Seen Academic, suggesting a positive scaling trend consistent with [25]'s finding that verbalization-based confidence is only competitive for sufficiently capable models. However, a confusion matrix analysis (Table 3) reveals a more complex picture. At 7B, the model's seemingly higher Unseen accuracy (e.g., 66.30% on Current Events) is undermined by precision and recall both below 16%, confirming indiscriminate overconfidence. At 32B, Seen self-verify reaches 83.76% accuracy with F1 of 80.22, demonstrating genuine meta-cognitive ability—yet this ability collapses in Unseen domains, where accuracy hovers near the 50% baseline (binary-classification) and F1 drops to 41–45%. This collapse specifically emerges at the seen/unseen boundary rather than being a fixed property of model scale.
Chain-of-Thought prompting does not resolve this failure. As shown in Table 5, CoT leaves 32B Unseen Self-Verify at baseline levels (48.98% on RealTimeQA, 49.87% on Current Events) while Seen performance remains stable (83.56%). More critically, CoT inflates Normalized P without corresponding accuracy gains: at 7B, Unseen RealTimeQA Norm. P rises sharply from 28.18% to 52.83% under CoT (Table 6), yet Accuracy slightly decreases (33.88% to 31.74%). This dissociation between elevated confidence and stagnant performance indicates that CoT produces diagnostically misleading signals rather than genuine calibration improvement.
Training exposure, not model scale, determines factual reliability. Across all scales, a persistent 30–40 percentage point gap separates Seen and Unseen Accuracy, with Unseen performance remaining below 44% even at 32B. This gap persists regardless of prompting strategy: few-shot examples
Table 7: Reasoning evaluation across Seen/Unseen splits and model variants.
| Method | 7B | 13B | 32B | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Seen | Unseen | Seen | Unseen | Seen | Unseen | |||||||||||||
| G8K Train | MMath | G8K Test | G1K | G-Sym | G8K Train | MMath | G8K Test | G1K | G-Sym | G8K Train | MMath | G8K Test | G1K | G-Sym | ||||
| SFT | P@1 | 21.48 | 20.06 | 17.75 | 18.27 | 15.73 | 70.73 | 59.80 | 64.90 | 57.95 | 59.51 | 79.88 | 63.92 | 75.55 | 69.65 | 67.14 | ||
| P@2 | 37.10 | 34.14 | 31.22 | 31.48 | 27.84 | 86.43 | 74.84 | 81.30 | 74.50 | 75.97 | 91.86 | 78.18 | 88.51 | 83.22 | 81.36 | |||
| P@4 | 57.41 | 52.06 | 49.79 | 48.85 | 44.76 | 93.64 | 83.53 | 90.56 | 84.98 | 86.26 | 96.26 | 85.85 | 94.02 | 89.85 | 89.38 | |||
| P@8 | 77.33 | 69.40 | 69.07 | 66.14 | 62.80 | 96.59 | 88.40 | 95.15 | 90.62 | 91.50 | 97.65 | 89.70 | 96.29 | 93.44 | 93.40 | |||
| RLVR | P@1 | 80.18 | 66.56 | 74.27 | 66.56 | 65.74 | 85.73 | 72.86 | 81.02 | 74.85 | 76.46 | 90.12 | 71.98 | 87.64 | 82.38 | 83.37 | ||
| P@2 | 90.52 | 78.77 | 85.66 | 78.77 | 77.96 | 93.03 | 81.29 | 89.49 | 85.03 | 86.02 | 95.42 | 82.06 | 93.33 | 89.63 | 90.53 | |||
| P@4 | 94.70 | 85.38 | 91.33 | 85.78 | 85.13 | 95.96 | 85.74 | 93.41 | 90.47 | 90.83 | 96.94 | 87.35 | 95.28 | 93.04 | 93.55 | |||
| P@8 | 96.59 | 89.20 | 94.31 | 89.88 | 89.30 | 97.35 | 88.50 | 95.38 | 93.61 | 93.40 | 97.65 | 90.20 | 96.51 | 95.10 | 95.40 | |||
improve Seen Web Accuracy from 70.09% to 76.04% at 7B but yield negligible gains on Unseen RealTimeQA (33.88% to 35.70%), and this marginal benefit diminishes further at 32B. This confirms that in-context learning acts as a retrieval trigger for already-encoded knowledge—narrowing the gap—but cannot compensate for the absence of exposure in D. This exposure dominance extends beyond Accuracy to internal metrics: at 32B, DC maintains a persistent Seen/Unseen gap (94.73% vs. 78.73% in zero-shot), and Linear Probing similarly shows higher separability for Seen conditions (78.29% vs. 50.55% for Web/RealTimeQA), confirming that the exposure boundary constrains not only behavioral output but also the model's internal epistemic organization. The exposure boundary thus represents a structural limit that neither scaling nor prompting strategies can overcome.
5.2 Generalization in Reasoning
RLVR and SFT generalize through qualitatively different mechanisms, and their relative advantage shifts with scale.
Table 7 summarizes reasoning performance across scales and training methods. Unlike the factual domain, reasoning performance is governed by an interplay between task difficulty and learned representations. At 7B, SFT exhibits brittle pattern matching: Seen MetaMath (20.06% Pass@1) outperforms all Unseen datasets (GSM8K-Test 17.75%, GSM1K 18.27%, GSM-Symbolic 15.73%), suggesting a memorization buffer. This advantage collapses at 13B, where Unseen GSM8K-Test (64.90%) first surpasses Seen MetaMath (59.80%), and widens further at 32B (75.55% vs. 63.92%)—indicating that SFT overcomes its memorization bias only as model capacity grows. RLVR shows this pattern from the start: even at 7B, Unseen GSM8K-Test (74.27%) already outperforms Seen MetaMath (66.56%), because reinforcement learning optimizes for reward-aligned reasoning procedures rather than surface-level templates. GSM-Symbolic corroborates this: at 32B, RLVR maintains a narrow gap between GSM8K-Test and GSM-Symbolic (87.64% vs. 83.37%), whereas SFT shows greater sensitivity to numerical perturbation (75.55% vs. 67.14%). However, the RLVR advantage narrows substantially at 32B, suggesting that at smaller scales RLVR builds genuine reasoning capability, while at larger scales its advantage reduces to sampling efficiency. Moreover, this pattern is domain-dependent: as shown in Appendix D.2.1, RLVR's gains diminish in code generation, where reward-task alignment is weaker. Taken together, both methods converge on the same conclusion—task difficulty supersedes training exposure in reasoning—but via different mechanisms: SFT reaches it only as capacity overcomes memorization bias, while RLVR embeds it from the start.
6 Conclusion
We introduced LUMOS, a diagnostic framework that grounds LLM knowledge evaluation in verified training-data exposure. By tracing knowledge from pretraining corpus to behavioral output, we show that training exposure is the dominant determinant of factual reliability—a structural constraint that scaling, prompting, and Chain-of-Thought reasoning cannot overcome. We advocate for the training-data axis as a standard component of LLM knowledge assessment. Limitations are discussed in Appendix A.
References
[1] Fabio Petroni, Tim Rocktäschel, Sebastian Riedel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, and Alexander Miller. Language models as knowledge bases? In Proceedings of the 2019 conference on empirical methods in natural language processing and the 9th international joint conference on natural language processing (EMNLP-IJCNLP), pages 2463–2473, 2019.
[2] Lukas Berglund, Meg Tong, Max Kaufmann, Mikita Balesni, Asa Cooper Stickland, Tomasz Korbak, and Owain Evans. The reversal curse: Llms trained on "a is b" fail to learn "b is a". arXiv preprint arXiv:2309.12288, 2023.
[3] Zheng Zhang. Comprehension without competence: Architectural limits of llms in symbolic computation and reasoning. Transactions on Machine Learning Research.
[4] Alon Jacovi and Yoav Goldberg. Towards faithfully interpretable nlp systems: How should we define and evaluate faithfulness? In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4198–4205, 2020.
[5] Richard Ngo, Lawrence Chan, and Sören Mindermann. The alignment problem from a deep learning perspective. In The Twelfth International Conference on Learning Representations.
[6] Roger Grosse, Juhan Bae, Cem Anil, Nelson Elhage, Alex Tamkin, Amirhossein Tajdini, Benoit Steiner, Dustin Li, Esin Durmus, Ethan Perez, et al. Studying large language model generalization with influence functions. arXiv preprint arXiv:2308.03296, 2023.
[7] Kangxi Wu, Liang Pang, Huawei Shen, and Xueqi Cheng. Enhancing training data attribution for large language models with fitting error consideration. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 14131–14143, 2024.
[8] Jan Trienes, Jörg Schlötterer, Junyi Jessy Li, and Christin Seifert. Behavioral analysis of information salience in large language models. In Wanxiang Che, Joyce Nabende, Ekaterina Shutova, and Mohammad Taher Pilehvar, editors, Findings of the Association for Computational Linguistics: ACL 2025, pages 23428–23454, Vienna, Austria, July 2025. Association for Computational Linguistics. URL https://aclanthology.org/2025.findings-acl.1204.
[9] Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. Measuring massive multitask language understanding, 2021. URL https://arxiv.org/abs/2009.03300.
[10] Saurav Kadavath, Tom Conerly, Amanda Askell, Tom Henighan, Dawn Drain, Ethan Perez, Nicholas Schiefer, Zac Hatfield-Dodds, Nova DasSarma, Eli Tran-Johnson, et al. Language models (mostly) know what they know. CoRR, 2022.
[11] Zhengbao Jiang, Jun Araki, Haibo Ding, and Graham Neubig. How can we know when language models know? on the calibration of language models for question answering. Transactions of the Association for Computational Linguistics, 9:962–977, 2021.
[12] Yonatan Belinkov. Probing classifiers: Promises, shortcomings, and advances. Computational Linguistics, 48(1):207–219, 2022.
[13] Collin Burns, Haotian Ye, Dan Klein, and Jacob Steinhardt. Discovering latent knowledge in language models without supervision, 2024. URL https://arxiv.org/abs/2212.03827.
[14] Ian Tenney, Dipanjan Das, and Ellie Pavlick. Bert rediscovers the classical nlp pipeline. arXiv preprint arXiv:1905.05950, 2019.
[15] Guillaume Alain and Yoshua Bengio. Understanding intermediate layers using linear classifier probes. arXiv preprint arXiv:1610.01644, 2016.
[16] Jesse Vig, Sebastian Gehrmann, Yonatan Belinkov, Sharon Qian, Daniel Nevo, Yaron Singer, and Stuart Shieber. Investigating gender bias in language models using causal mediation analysis. Advances in neural information processing systems, 33:12388–12401, 2020.
[17] Jesse Vig, Sebastian Gehrmann, Yonatan Belinkov, Sharon Qian, Daniel Nevo, Simas Sakenis, Jason Huang, Yaron Singer, and Stuart Shieber. Causal mediation analysis for interpreting neural nlp: The case of gender bias. arXiv preprint arXiv:2004.12265, 2020.
[18] Hugh Zhang, Jeff Da, Dean Lee, Vaughn Robinson, Catherine Wu, Will Song, Tiffany Zhao, Pranav Raja, Charlotte Zhuang, Dylan Slack, Qin Lyu, Sean Hendryx, Russell Kaplan, Michele Lunati, and Summer Yue. A careful examination of large language model performance on grade school arithmetic, 2024. URL https://arxiv.org/abs/2405.00332.
[19] Evan Hernandez, Arnab Sen Sharma, Tal Haklay, Kevin Meng, Martin Wattenberg, Jacob Andreas, Yonatan Belinkov, and David Bau. Linearity of relation decoding in transformer language models. arXiv preprint arXiv:2308.09124, 2023.
[20] Damai Dai, Li Dong, Yaru Hao, Zhifang Sui, Baobao Chang, and Furu Wei. Knowledge neurons in pretrained transformers. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8493–8502, 2022.
[21] Kevin Meng, David Bau, Alex Andonian, and Yonatan Belinkov. Locating and editing factual associations in gpt. Advances in neural information processing systems, 35:17359–17372, 2022.
[22] Mor Geva, Roei Schuster, Jonathan Berant, and Omer Levy. Transformer feed-forward layers are key-value memories. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 5484–5495, 2021.
[23] David Bau, Bolei Zhou, Aditya Khosla, Aude Oliva, and Antonio Torralba. Network dissection: Quantifying interpretability of deep visual representations. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6541–6549, 2017.
[24] Jinyi Han, Tingyun Li, Shisong Chen, Jie Shi, Xinyi Wang, Guanglei Yue, Jiaqing Liang, Xin Lin, Liqian Wen, Zulong Chen, et al. Mind the generation process: Fine-grained confidence estimation during llm generation. arXiv preprint arXiv:2508.12040, 2025.
[25] Matéo Mahaut, Laura Aina, Paula Czarnowska, Momchil Hardalov, Thomas Mueller, and Lluís Márquez. Factual confidence of llms: on reliability and robustness of current estimators. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 4554–4570, 2024.
[26] Xin Zhao, Naoki Yoshinaga, and Daisuke Oba. What matters in memorizing and recalling facts? multifaceted benchmarks for knowledge probing in language models. In Findings of the Association for Computational Linguistics: EMNLP 2024. Association for Computational Linguistics, 2024.
[27] Youna Kim, Hyuhng Joon Kim, Minjoon Choi, Sungmin Cho, Hyunsoo Cho, Sang-goo Lee, and Taeuk Kim. Uniknow: A unified framework for reliable language model behavior across parametric and external knowledge. arXiv preprint arXiv:2502.13648, 2025.
[28] Qinyuan Wu, Mohammad Aflah Khan, Soumi Das, Vedant Nanda, Bishwamittra Ghosh, Camila Kolling, Till Speicher, Laurent Bindschaedler, Krishna P Gummadi, and Evimaria Terzi. Towards reliable latent knowledge estimation in llms: Zero-prompt many-shot based factual knowledge extraction. In Findings of the Association for Computational Linguistics: ACL 2024. Association for Computational Linguistics, 2024.
[29] Ernesto Quevedo, Jorge Yero, Rachel Koerner, Pablo Rivas, and Tomas Cerny. Detecting hallucinations in large language model generation: A token probability approach, 2024. URL https://arxiv.org/abs/2405.19648.
[30] Stephanie Lin, Jacob Hilton, and Owain Evans. Teaching models to express their uncertainty in words, 2022. URL https://arxiv.org/abs/2205.14334.
[31] Lorenz Kuhn, Yarin Gal, and Sebastian Farquhar. Semantic uncertainty: Linguistic invariances for uncertainty estimation in natural language generation, 2023. URL https://arxiv.org/abs/2302.09664.
[32] Amos Azaria and Tom Mitchell. The internal state of an llm knows when it’s lying. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 967–976, 2023.
[33] Zorik Gekhman, Eyal Ben David, Hadas Orgad, Eran Ofek, Yonatan Belinkov, Idan Szpektor, Jonathan Herzig, and Roi Reichart. Inside-out: Hidden factual knowledge in llms. In Proceedings of the Conference on Language Modeling (COLM), 2025.
[34] Hadas Orgad, Michael Toker, Zorik Gekhman, Roi Reichart, Idan Szpektor, Hadas Kotek, and Yonatan Belinkov. Llms know more than they show: On the intrinsic representation of llm hallucinations. In Proceedings of the International Conference on Learning Representations (ICLR), 2025.
[35] Jeffrey Li, Tim Dettmers, Ludwig Schmidt, et al. Datacomp-lm: In search of the next generation of training sets for language models. In Proceedings of the 38th Conference on Neural Information Processing Systems (NeurIPS) Datasets and Benchmarks Track, 2024. URL https://arxiv.org/abs/2406.11794.
[36] Luca Soldaini, Rodney Kinney, Akshita Bhagia, Dustin Schwenk, David Atkinson, Russell Author, Ben Bogin, Khyathi Chandu, Jennifer Dumas, Yanai Elazar, et al. Dolma: An open corpus of three trillion tokens for language model pretraining research. In Proceedings of the 62nd annual meeting of the association for computational linguistics (volume 1: long papers), pages 15725–15788, 2024.
[37] Luca Soldaini and Kyle Lo. pes2o (pretraining efficiently on s2orc) dataset. Allen Institute for AI, Tech. Rep, 2023.
[38] Jens Lehmann, Robert Isele, Max Jakob, Anja Jentzsch, Dimitris Kontokostas, Pablo N Mendes, Sebastian Hellmann, Mohamed Morsey, Patrick Van Kleef, Sören Auer, et al. Dbpedia—a large-scale, multilingual knowledge base extracted from wikipedia. Semantic web, 6(2):167–195, 2015.
[39] Jason Priem, Heather Piwowar, and Richard Orr. Openalex: A fully-open index of scholarly works, authors, venues, institutions, and concepts. arXiv preprint arXiv:2205.01833, 2022.
[40] Alfred V Aho and Margaret J Corasick. Efficient string matching: an aid to bibliographic search. Communications of the ACM, 18(6):333–340, 1975.
[41] Qing Zong, Zhaowei Wang, Tianshi Zheng, Xiyu Ren, and Yangqiu Song. Comparisonqa: Evaluating factuality robustness of llms through knowledge frequency control and uncertainty, 2025. URL https://arxiv.org/abs/2412.20251.
[42] Shehenaz Hossain and Haithem Afli. Craft: An explanation-based framework for evaluating cultural reasoning in multilingual language models. arXiv preprint arXiv:2510.14014, 2025.
[43] Jungo Kasai, Keisuke Sakaguchi, Ronan Le Bras, Akari Asai, Xinyan Yu, Dragomir Radev, Noah A Smith, Yejin Choi, Kentaro Inui, et al. Realtime qa: What's the answer right now? Advances in neural information processing systems, 36:49025–49043, 2023.
[44] Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021.
[45] Longhui Yu, Weisen Jiang, Han Shi, Jincheng Yu, Zhengying Liu, Yu Zhang, James T. Kwok, Zhenguo Li, Adrian Weller, and Weiyang Liu. Metamath: Bootstrap your own mathematical questions for large language models. In International Conference on Learning Representations, 2024.
[46] Allen Institute for AI. Olmo 2: The best fully open llm to date. In Proceedings of the Conference on Language Modeling (COLM), 2025. URL https://arxiv.org/abs/2501.00656. Extended version available on arXiv.
[47] Hugh Zhang, Jeff Da, Dean Lee, Vaughn Robinson, Catherine Wu, William Song, Tiffany Zhao, Pranav Raja, Charlotte Zhuang, Dylan Slack, et al. A careful examination of large language model performance on grade school arithmetic. Advances in Neural Information Processing Systems, 37:46819–46836, 2024.
[48] Iman Mirzadeh, Keivan Alizadeh, Hooman Shahrokhi, Oncel Tuzel, Samy Bengio, and Mehrdad Farajtabar. Gsm-symbolic: Understanding the limitations of mathematical reasoning in large language models, 2025. URL https://arxiv.org/abs/2410.05229.
[49] Yavuz Faruk Bakman, Duygu Nur Yaldiz, Baturalp Buyukates, Chenyang Tao, Dimitrios Dimitriadis, and Salman Avestimehr. Mars: Meaning-aware response scoring for uncertainty estimation in generative llms, 2024. URL https://arxiv.org/abs/2402.11756.
[50] Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021.
[51] Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, Misha Denil, Nal Sepassi, Luca Kassner, Charles Peng, Shauryasree Pierson, et al. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021.
A Limitations
Our study has several limitations. First, our analysis relies on models with fully accessible pretraining corpora, which limits the direct applicability of LUMOS to closed-source or proprietary LLMs. Second, our definition of training exposure is based on explicit string matching and frequency statistics, which may not fully capture implicit, paraphrased, or indirectly encoded knowledge present in the training data. In addition, our experiments focus on a specific model suite, and extending this analysis to other fully open-source LLMs remains an important direction for future work to further validate the generalizability of our findings.
B Experimental details
All experiments were conducted on a machine equipped with 4× NVIDIA RTX PRO 6000 GPUs (approximately 98GB total VRAM) running CUDA 13.0. For each question, we generate responses per query—one deterministic output via greedy decoding and ten stochastic samples at temperature 1.0—which are used uniformly across all behavioral and internal metrics.
Entity frequency by rank (descending, binned), #entities=232782

Figure 2: Entity frequency distribution under head–tail stratification.
C Evaluation Metrics
C.1 Accuracy
Accuracy measures the expected correctness of model outputs under stochastic decoding for a given multiple-choice question. Each generated answer is assigned a binary correctness indicator of 1 if it matches the ground-truth answer and 0 otherwise.
Since model generation is stochastic, we estimate accuracy by aggregating correctness over multiple generations per question. Specifically, for each question , we obtain one deterministic (greedy) output and ten additional responses sampled with temperature temp = 1, yielding a total of generated answers. We treat all generations uniformly when estimating accuracy.
Let denote the k-th generated answer for question , and let denote the ground-truth answer option. The per-question accuracy is defined as the fraction of correct responses among the K generations:
This formulation estimates the expected accuracy under the model’s output distribution and differs from majority-vote accuracy, as it evaluates all sampled responses rather than aggregating them into a single prediction.
Given the evaluation dataset , the dataset-level accuracy is computed by averaging the per-question accuracy across all questions:
C.2 Decisional Consistency (DC)
To measure how consistently a model selects the same answer across multiple stochastic generations, we define Decisional Consistency (DC) as the degree of agreement among predictions for a given question.
Specifically, for each question , we obtain one deterministic (greedy) output and ten additional responses sampled with temperature temp = 1, resulting in total predictions over the choice set . We treat all generations uniformly when computing consistency.
Let denote the number of times option is predicted for question . The per-question consistency is defined as the normalized frequency of the most frequently predicted answer:
This metric estimates the concentration of the model’s predictive distribution over answer choices and is independent of correctness: it measures agreement among predictions regardless of whether the chosen answer is correct.
Given the evaluation dataset , the dataset-level consistency is computed by averaging over questions:
C.3 Normalized Probability
Output probability score measures a length-normalized likelihood of a candidate answer given a question q, thereby capturing the model's relative preference for that answer. While accuracy evaluates only the binary correctness of the final output, this metric reflects how strongly the model favors a particular answer under its token-level distribution.
The conditional likelihood of an answer is defined as follows. To reduce bias toward shorter or longer answers, we employ a length-normalized probability:
All probabilities are computed using teacher forcing, where the question and answer are concatenated into a single sequence. For reasoning-based QA, the probability is computed over the concatenated sequence , where denotes the model-generated reasoning.
Given a dataset , we compute for each sample and report the average normalized probability across the dataset.
C.4 Linear Probing
We evaluate the extent to which a language model’s hidden states linearly encode information about answer correctness. This metric measures knowledge retention at the level of internal representations, independent of the model’s final output.
For each question, we construct exactly one positive and one negative example as follows.
• Positive: , where is a correct answer to q.
• Negative: , where is an incorrect answer sampled from the model's generations. If no incorrect generation is available, is sampled uniformly from the remaining answer choices.
Given the input sequence , we extract the hidden state of the last non-padding token from each layer of the model. For each layer, we train an independent linear classifier (logistic regression with standardized features) to predict answer correctness from the corresponding hidden representation.
We select the best-performing layer based on AUROC on the development set. Using the probe trained on this selected layer, we compute a probe score for each question–answer pair, where denotes the selected layer. We report the average probe score over the correct answers in the test set.
C.5 Meaning-Aware Response Scoring (MARS)
To more accurately quantify model uncertainty in generative settings beyond simple length-normalized likelihoods, we adopt the Meaning-Aware Response Scoring (MARS) framework proposed by [49]. Unlike conventional approaches that assign equal importance to all tokens, MARS incorporates the semantic contribution of each token to the overall meaning of the response in the context of the input question.
For a generated answer to a question , the MARS score is defined as
where denotes the model's conditional token probability, and is a weighting function that reflects both sequence length and semantic importance.
Specifically, the weight assigned to each token is defined as a convex combination of a uniform length-normalization term and a learned importance coefficient:
where represents the semantic importance of token in the context of the question and the full generated sequence, and satisfies .
The importance coefficients are computed by measuring the semantic impact of removing parts of the generated response. Concretely, MARS employs a BERT-based answer evaluation model that takes as input the question, the ground-truth answer, and the generated response, and predicts answer correctness. The importance of each token is estimated by evaluating the change in this correctness score when the token (or, in practice, a phrase containing the token) is masked. To account for dependencies between tokens, masking is performed at the phrase level rather than independently for each token. The resulting raw importance scores are then normalized (e.g., via softmax with temperature) to obtain .
MARS serves as a drop-in replacement for length-normalized scoring in probability-based uncertainty estimation methods, enabling these methods to better reflect the semantic relevance of generated tokens while preserving robustness to sequence length.
C.6 Statement Accuracy Prediction based on Language Model Activations (SAPLMA)
We adopt Statement Accuracy Prediction based on Language Model Activations (SAPLMA) [32], a representation-based approach that predicts the truthfulness of a statement from a model's internal hidden states.
Given an input statement, SAPLMA extracts hidden activations from a pretrained language model and feeds them into a lightweight classifier that outputs a scalar truthfulness score. Unlike probability-based metrics, this approach leverages internal representations that encode signals about factual correctness.
In our implementation, we perform a layer sweep and select the layer achieving the highest AUROC on a held-out development set, and train the classifier on the corresponding hidden representations.
We further adapt SAPLMA to the MCQ setting by evaluating all answer choices (A–D). For each question, we construct inputs of the form [question + choice_text] without additional prompting, in order to isolate representation-level signals of parametric knowledge. We extract the hidden state at the final token for each input, and the classifier assigns a score to each choice. The highest-scoring choice is selected as the prediction, and we report performance as rank accuracy.
C.7 Self-verify
Self-verify measures how accurately a language model assesses the correctness of a proposed answer, capturing its meta-cognitive ability to distinguish correct from incorrect responses. Given a question q, reasoning r and a candidate answer a, we prompt the model to explicitly judge whether the answer is correct, producing a binary decision (correct or incorrect). Under chain-of-thought prompting, the verification is conditioned on the triplet , where r denotes the generated reasoning.
Self-verify Evaluation Prompt
System:
Your job is to judge whether a proposed answer to a multiple-choice question is correct.
User:
Question: {question}
Choices: {choice_text}
Reasoning: {reasoning}
Proposed Answer: {answer_text}
Is the proposed answer:
A: CORRECT
B: INCORRECT
Just return the letter A or B, with no text around it.
Evaluation is performed by comparing the model’s judgment with the ground-truth correctness of the answer, yielding four possible outcomes: (i) answers that are correct and judged as correct, (ii) answers that are incorrect but judged as correct, (iii) answers that are correct but judged as incorrect, and (iv) answers that are incorrect and judged as incorrect. These outcomes together form a confusion matrix over all evaluated question–answer pairs.
Based on this confusion matrix, we compute standard classification metrics to quantify self-verify, including accuracy, precision, recall, and F1 score. In particular, self-verify accuracy is defined as the proportion of cases in which the model's judgment matches the ground truth, i.e., the sum of cases (i) and (iv), normalized by the total number of evaluations.
For consistency, self-verify is evaluated on the same data splits used for accuracy and output-based metrics, enabling direct comparison across different measures of model knowledge.
C.8 Pass@k
Pass@k is a standard metric for evaluating stochastic generation models in mathematical reasoning, measuring whether a correct answer appears among multiple sampled responses. Unlike single-sample accuracy, Pass@k captures the model's ability to recover a correct solution given multiple independent generation attempts.
Formally, for a given question, suppose the model generates n responses in total, among which c are correct. Pass@k is defined as the expected probability that at least one correct response is observed when sampling k responses without replacement:
where the expectation is taken over the stochastic generation process.
At the dataset level, Pass@k is computed by averaging this quantity across all questions. While Pass@k effectively measures coverage of correctness under sampling, it does not account for the diversity of correct solutions or the distribution of probability mass across responses.
D Additional Experiments
D.1 Results under Chain-of-Thought Prompting
Table 8: Head vs. Tail evaluation (with Gap) under Chain-of-Thought prompting (zero-shot and few-shot) (%). Numbers in parentheses denote relative ranks (lower is better).
| OLMo 2 | Types | Metrics | CoT Zero-shot | CoT Few-shot (5) | ||||
|---|---|---|---|---|---|---|---|---|
| Head | Tail | Gap | Head | Tail | Gap | |||
| 7B | Behavioral | Accuracy | 82.40 (12) | 50.29 (24) | 32.12 (-12) | 87.94 (7) | 60.27 (22) | 27.67 (-15) |
| 90.32 (12) | 70.12 (24) | 20.20 (-12) | 94.09 (9) | 77.76 (21) | 16.33 (-12) | |||
| Self-Verify | 28.54 (21) | 45.03 (15) | -16.49 (6) | 24.38 (23) | 35.51 (20) | -11.13 (3) | ||
| Internal | Norm. | 81.31 (2) | 65.74 (11) | 15.57 (-9) | 76.45 (5) | 62.29 (13) | 14.16 (-8) | |
| MARS | 61.35 (17) | 65.22 (7) | -3.87 (10) | 61.59 (15) | 64.92 (9) | -3.33 (6) | ||
| Linear Probing | 84.61 (8) | 78.21 (23) | 6.40 (-15) | 95.35 (3) | 78.39 (22) | 16.96 (-19) | ||
| 13B | Behavioral | Accuracy | 88.67 (6) | 62.58 (19) | 26.09 (-13) | 87.53 (9) | 60.69 (21) | 26.84 (-12) |
| 93.98 (10) | 78.98 (19) | 15.01 (-9) | 94.61 (6) | 80.83 (17) | 13.78 (-11) | |||
| Self-Verify | 42.52 (17) | 38.95 (18) | 3.57 (-1) | 66.71 (8) | 55.54 (12) | 11.17 (-4) | ||
| Internal | Norm. | 77.63 (4) | 69.18 (10) | 8.45 (-6) | 86.44 (1) | 80.48 (3) | 5.97 (-2) | |
| MARS | 60.93 (19) | 64.11 (10) | -3.18 (9) | 61.12 (18) | 63.80 (11) | -2.68 (7) | ||
| Linear Probing | 93.69 (4) | 82.59 (16) | 11.10 (-12) | 83.83 (11) | 82.35 (17) | 1.48 (-6) | ||
| 32B | Behavioral | Accuracy | 91.87 (3) | 65.98 (16) | 25.90 (-13) | 91.44 (4) | 67.15 (15) | 24.29 (-11) |
| 97.02 (2) | 84.78 (13) | 12.24 (-11) | 97.75 (1) | 84.15 (14) | 13.61 (-13) | |||
| Self-Verify | 91.54 (4) | 66.70 (9) | 24.85 (-5) | 91.59 (3) | 68.03 (5) | 23.57 (-2) | ||
| Internal | Norm. | 73.85 (7) | 60.69 (14) | 13.15 (-7) | 75.41 (6) | 64.63 (12) | 10.78 (-6) | |
| MARS | 59.12 (20) | 65.88 (4) | -6.76 (16) | 56.52 (24) | 65.53 (5) | -9.01 (19) | ||
| Linear Probing | 96.79 (1) | 82.98 (14) | 13.81 (-13) | 96.23 (2) | 84.92 (7) | 11.31 (-5) | ||
D.2 Results in Code Dataset
D.2.1 Dataset
To evaluate code generation performance, we use two benchmarks from the unseen split: HumanEval [50] (164 problems) and MBPP [51] (500 problems). Both datasets are treated as out-of-distribution test sets, as neither was included in the OLMo 2 pretraining corpus.
D.2.2 Generalization in Code Dataset
RLVR Does Not Consistently Outperform SFT in Code Generation. The comprehensive evaluation results for code generation are presented in Table 9. Contrary to the consistent performance gains observed in math-based reasoning, RLVR exhibits limited advantages in code benchmarks. On HumanEval, while RLVR and SFT achieve comparable Pass@1 performance, SFT's lead becomes more evident as increases. This pattern is even more pronounced in MBPP, where SFT consistently surpasses RLVR across most settings, particularly in higher- regimes. Overall, these findings suggest that RLVR provides limited benefits in low- exploitation settings and lacks a clear advantage over SFT in high- exploration for code generation.
RLVR's performance gains depend on reward–task alignment. The observed performance disparity highlights the critical importance of reward–task alignment. While a significant RLVR–SFT gap exists in math benchmarks, this trend does not hold for code, where SFT may even outperform RLVR. This suggests that RLVR's efficacy is most pronounced when the reward signal aligns closely with well-structured reasoning processes. In contrast, for execution-dependent domains like code, these gains are diminished because correctness is less directly captured by the immediate reward signal. Overall, RLVR is best understood not as a universal performance booster, but as a post-training method tailored for reinforcing reward-aligned reasoning.
Table 9: Code Dataset evaluation
(a) SFT
| Model | Metric | HumanEval | MBPP |
|---|---|---|---|
| OLMo2 7B-SFT | Pass@1 | 41.96 | 28.29 |
| Pass@2 | 45.31 | 29.96 | |
| Pass@4 | 47.95 | 31.36 | |
| Pass@8 | 50.58 | 32.60 | |
| OLMo2 13B-SFT | Pass@1 | 44.78 | 35.27 |
| Pass@2 | 50.01 | 37.68 | |
| Pass@4 | 54.94 | 39.52 | |
| Pass@8 | 59.00 | 41.09 | |
| OLMo2 32B-SFT | Pass@1 | 53.43 | 39.83 |
| Pass@2 | 58.11 | 42.09 | |
| Pass@4 | 62.23 | 43.98 | |
| Pass@8 | 65.69 | 46.07 |
(b) RLVR
| Model | Metric | HumanEval | MBPP |
|---|---|---|---|
| OLMo2 7B | Pass@1 | 40.63 | 27.12 |
| Pass@2 | 44.99 | 28.37 | |
| Pass@4 | 48.76 | 29.40 | |
| Pass@8 | 51.86 | 30.46 | |
| OLMo2 13B | Pass@1 | 45.34 | 37.36 |
| Pass@2 | 48.78 | 39.18 | |
| Pass@4 | 51.77 | 40.69 | |
| Pass@8 | 54.35 | 41.84 | |
| OLMo2 32B | Pass@1 | 54.26 | 38.05 |
| Pass@2 | 58.19 | 39.86 | |
| Pass@4 | 61.64 | 41.02 | |
| Pass@8 | 64.54 | 41.97 |
E Prompts
E.1 Unseen Filtering Prompt
| Open-ended Short-answer Template |
|---|
| System:You are a concise assistant. Answer the question directly. |
| User:Question: {question} |
| Answer concisely using a single word, a number, or a short phrase.Do not answer in a complete sentence. |
E.2 Factual Domain Prompt
| Zero-shot Prompt |
|---|
| System:You are given a multiple-choice question.You must answer only one letter: A, B, C, or D.Do not output anything else. |
| User:Question: {question}Choices: {choice_text}Answer with only one letter (A, B, C, or D). |
| Few-shot Prompt (5-shot) |
|---|
| System:You are given a multiple-choice question.You must answer only one letter: A, B, C, or D.Do not output anything else. |
User:
Question: What is the relationship between Carmen Miranda and Amaro Miranda da Cunha?
Choices: A. Siblings, B. Aunt and nephew, C. Mother and son, D. Cousins
Answer: A
Question: In 2008, Martin Winter founded which significant research center at the University of Münster?
Choices: A. Paul Scherrer Institute, B. Institute of Chemical Technology of Inorganic Materials,
C. MEET Battery Research Center, D. Institute of Physical Chemistry
Answer: C
Question: What did William Lyon Mackenzie King famously say about Canada’s geography and history?
Choices: A. Canada has too much diversity, B. Canada has too much culture,
C. Canada has too much history, D. Canada has too much geography
Answer: D
Question: Who is the head chef of Gordon Ramsay au Trianon?
Choices: A. Frederic Larquemin, B. Joël Robuchon, C. Gordon Ramsay, D. Alain Ducasse
Answer: A
Question: What is the architectural style of St. John in the Wilderness in Nainital?
Choices: A. Modern, B. Gothic, C. Baroque, D. Renaissance
Answer: B
Question: {question}
Choices: {choice_text}
Answer with only one letter (A, B, C, or D).
CoT Zero-shot Prompt
System:
You are given a multiple-choice question (A, B, C, D).
First, reason step by step and explain your thinking clearly.
Then, provide your final answer as only one letter: A, B, C, or D.
Always write the final answer in the format '### FINAL ANSWER: X', where X is one of A, B, C, or D.
Do not include anything else after this line.
User:
Question: {question}
Choices: {choice_text}
Write out your reasoning step by step, and then write the final answer in this format:
FINAL ANSWER:
CoT Few-shot Prompt (5-shot)
System:
You are given a multiple-choice question (A, B, C, D).
First, reason step by step and explain your thinking clearly.
Then, provide your final answer as only one letter: A, B, C, or D.
Always write the final answer in the format '### FINAL ANSWER: X', where X is one of A, B, C, or D.
Do not include anything else after this line.
User:
Question: Which geographical feature is located to the east and northeast of Scottsdale, Arizona?
Choices: A. The Grand Canyon, B. The McDowell Mountain Range, C. The Sierra Madre Mountains, D. The Rocky Mountains
Reasoning: Scottsdale, Arizona is located in the Sonoran Desert. The Grand Canyon is to the northwest of Scottsdale. The Sierra Madre Mountains are located in Mexico, far to the south. The Rocky Mountains are much further to the northeast, in states like Colorado and Wyoming. The McDowell Mountain Range is a series of mountains located to the northeast of Scottsdale, Arizona. This range is a prominent geographical feature in the area and is known for its hiking trails and scenic views. Therefore, the correct answer is B. The McDowell Mountain Range.
FINAL ANSWER: B
Question: {question}
Choices: {choice_text}
E.3 Reasoning Domain Prompt
Reasoning Prompt for Factual Domain
System:
You are a helpful assistant that solves math word problems.
You must reason step by step and produce a correct numerical answer.
User:
Solve the following math problem.
Question: {question}
Write out your reasoning step by step in plain text.
Then, on a new line, write the final answer in the following format: