Stoichiometry and Unit Handling: Error Modes in Chemistry LLM Outputs
Stoichiometry and Unit Handling: Error Modes in Chemistry LLM Outputs
Frontier language models can recite the ideal gas law, balance redox equations, and describe Le Chatelier's principle with textbook fluency. What they fail at, reliably and in ways that matter, is the procedural arithmetic that connects chemical knowledge to a correct answer. Stoichiometry and unit handling in chemistry LLM outputs expose a class of failure that aggregate benchmark scores obscure: models that are right about the concept and wrong about the number. For post-training researchers and evals engineers designing chemistry tasks, understanding the specific error modes is the prerequisite for building verifiable, high-signal evaluations.
Answer Capsule: Chemistry LLM outputs fail at stoichiometry and unit handling through five primary mechanisms: mole ratio inversion, dimensional analysis chain breaks, unit conflation across SI prefixes, missing or incorrect state-condition assumptions, and significant-figure propagation errors. These failures are distinct from factual errors. They require programmatic or expert-verified numerical checking, not surface-level text matching, to detect reliably.
Why Stoichiometry Errors Are Structurally Different From Factual Errors
A factual error in chemistry is recoverable from context. A stoichiometric error is silent. The model produces a number, the number looks plausible, and no surface-level fluency check catches it. This is the core evaluation problem.
Stoichiometry tasks require a model to maintain a consistent unit-tracking chain across multiple transformation steps: mass to moles, moles through a ratio, moles back to mass or volume, then adjusted for purity, yield, or state conditions. Each step is a potential failure point. The model's language generation objective does not penalize a broken chain if the final sentence is grammatically coherent and chemically plausible in isolation.
The failure mode is structurally identical to what appears in financial LLM outputs, where numeric precision and unit errors in financial LLM outputs follow the same pattern: correct vocabulary, incorrect arithmetic, silent propagation of the mistake through subsequent steps.
The Five Primary Error Modes in Chemistry LLM Stoichiometry
1. Mole Ratio Inversion
The model applies a stoichiometric coefficient in the wrong direction. Given a balanced equation where 2 mol A produces 1 mol B, the model divides by 2 when it should multiply, or vice versa. Detection requires comparing the model's stated ratio to the balanced equation it either cited or was given. This error is most frequent when the target species appears on the left side of the equation or when the question asks for a limiting reagent calculation across more than two species.
2. Dimensional Analysis Chain Breaks
The model drops a unit mid-calculation. A common pattern: the model correctly converts grams to moles in step one, then treats the mole value as a gram value in step two without acknowledgment. The final answer carries the wrong unit, or the model applies a molar mass a second time when it should not. These breaks are invisible in natural language output because the model rarely writes out unit labels at each step unless explicitly prompted to do so.
3. SI Prefix Conflation
The model conflates millimoles with moles, milliliters with liters, or milligrams with grams. This is particularly common in solution chemistry tasks involving molarity calculations, where concentrations are frequently expressed in mmol/L in laboratory contexts but the model defaults to mol/L without adjusting the magnitude. A factor-of-1000 error results. The model's answer is internally consistent at the wrong scale.
4. Missing or Incorrect State-Condition Assumptions
Gas-law stoichiometry requires a stated temperature and pressure. Models frequently assume STP (0 degrees C, 101.325 kPa) when the problem implies SATP (25 degrees C, 100 kPa), or they apply the molar volume of an ideal gas at STP (22.414 L/mol) to a problem set at a different condition. The error is not in the law applied but in the condition assumed. Tasks that do not explicitly state conditions are particularly prone to this failure, and models rarely flag the assumption they are making.
5. Significant Figure Propagation Errors
Models either over-report precision (giving six significant figures when the least precise input has two) or round intermediate values prematurely, compounding rounding error across a multi-step problem. Neither failure is catastrophic in isolation, but both indicate that the model is not tracking precision as a property of the calculation, only of the final formatting step.
How to Detect These Errors: A Verification Protocol
Text-match grading does not catch stoichiometric errors. A model that writes "the answer is 4.5 grams" when the correct answer is "4.5 g" passes a string match but that same model writing "the answer is 45 grams" also passes if the grader is not numerically aware. Verification requires a three-layer approach.
Programmatic numerical check: Extract the final numerical answer and unit from the model output using a parser. Compare to the verified correct answer within a defined tolerance (typically 0.5-1% for well-conditioned problems, wider for problems with stated significant-figure constraints). Flag unit mismatches as a separate error category from magnitude errors.
Step-level trace check: For chain-of-thought outputs, extract each intermediate numerical value and verify it against the expected value at that step. This identifies where in the chain the error originates. The approach mirrors error localization and labeling at the first wrong step, which is more informative for post-training signal than end-answer grading alone.
Expert rubric review: For tasks where the model's approach is non-standard but potentially valid (alternative balanced equations, different but equivalent unit paths), a domain expert reviews the trace. Programmatic checks cannot handle this case without a complete symbolic solver, which introduces its own failure modes.
Building verifiers for chemistry tasks requires the same discipline described in verifier test suites and unit testing for reward functions: the verifier itself must be tested against known-correct and known-incorrect outputs before it is trusted as a training or eval signal.
Illustrative Example: Limiting Reagent Task With Unit Conflation
Illustrative example: numbers are constructed to demonstrate the failure mode, not drawn from a specific model evaluation.
Task: 500 mg of sodium hydroxide (NaOH, molar mass 40.00 g/mol) reacts with excess hydrochloric acid. Calculate the mass of sodium chloride (NaCl, molar mass 58.44 g/mol) produced. Balanced equation: NaOH + HCl to give NaCl + H2O (1:1:1:1 molar ratio).
Correct solution:
Convert mass to moles: 500 mg = 0.500 g. Moles of NaOH = 0.500 g / 40.00 g/mol = 0.01250 mol.
Apply mole ratio (1:1): moles of NaCl = 0.01250 mol.
Convert to mass: 0.01250 mol x 58.44 g/mol = 0.7305 g = 730.5 mg.
Model error pattern (SI prefix conflation): The model reads "500 mg" and treats it as "500 g" in the mole conversion step, producing moles of NaOH = 12.50 mol, then a final mass of 730.5 g. The answer is internally consistent, the unit label "g" appears correctly in the output, and the calculation logic is stated correctly. Only the magnitude is wrong, by a factor of 1000. A grader checking for the presence of "730.5" in the output would incorrectly pass this response.
Detection: A numerical parser extracting the final value (730.5) and comparing to the expected value (0.7305 g) catches the error immediately. Step-level tracing identifies the failure at step one.
Common Failure Modes in Chemistry Eval Design
The errors above live in the model. The following failures live in the evaluation itself, and they are equally damaging to post-training signal quality.
Underspecified conditions: Tasks that omit temperature, pressure, or solution concentration invite the model to assume, and different assumptions produce different correct answers. Detection: review every gas-law and solution task for explicit condition statements. Fix: add condition constraints to the task stem, or specify that the model must state its assumptions and those assumptions must match a rubric-defined acceptable set.
Ambiguous unit expectations: Tasks that accept any equivalent unit without specifying the expected form (grams vs. kilograms, liters vs. cubic decimeters) create grading ambiguity. Fix: specify the required unit in the task, or build a unit-equivalence check into the verifier.
Single-step tasks that do not stress the chain: A task requiring only one conversion step will not surface chain-break errors. Fix: require at least three conversion steps, including a unit change at each step, for tasks targeting stoichiometric reasoning.
Tolerance bands that are too wide: A 10% tolerance on a stoichiometry answer masks the factor-of-1000 SI prefix error described above. Fix: set tolerance to 1% or less for well-conditioned problems; document the tolerance in the task specification so it can be adjusted as needed.
No step-level ground truth: Without intermediate expected values, a verifier can only check the final answer. A model that gets the right answer via an incorrect path (two errors that cancel) passes incorrectly. Fix: author step-level expected values for every multi-step task. This is operationally expensive but necessary for process reward model training data. The design principles for this kind of structured rubric are discussed in the context of domain-specific RLHF failure modes and style overfitting.
Conflating error types in defect taxonomy: Logging "wrong answer" without distinguishing mole ratio inversion from SI prefix conflation collapses diagnostic information. Fix: implement a defect taxonomy at the point of review. A structured approach to defect taxonomies for expert data and root-cause classification produces training signal that is actionable for targeted fine-tuning.
Where This Approach Breaks Down
Programmatic numerical verification works well for closed-form stoichiometry. It does not generalize cleanly to tasks involving equilibrium calculations with multiple valid solution branches, tasks where the balanced equation itself is part of the answer, or open-ended synthesis planning where the route determines the stoichiometry. For those task classes, expert rubric review is not optional. The verifier can check whether the model's proposed equation is balanced, but it cannot determine whether the proposed route is chemically reasonable without domain expertise encoded in the rubric. Difficulty calibration also drifts: a task that frontier models fail at 70% pass rate today may be solved reliably by the next model generation. Difficulty is a property measured per model and per date, not a fixed attribute of the task.
Frequently Asked Questions
What is the most common stoichiometry error mode in frontier LLM outputs?
SI prefix conflation (treating milligrams as grams, millimoles as moles) is the most diagnostically clean error mode because it produces a factor-of-1000 magnitude error that is easy to detect programmatically. Mole ratio inversion is more frequent in multi-reagent problems but harder to detect without step-level tracing. Both error types appear across frontier model families and do not correlate reliably with model size alone.
Can chain-of-thought prompting eliminate stoichiometric errors?
Chain-of-thought prompting reduces the frequency of some error modes by making the unit-tracking chain explicit, but it does not eliminate them. Models can write out a correct-looking chain and still produce an incorrect intermediate value. Step-level verification against authored ground truth is required to confirm correctness. CoT also introduces new failure modes: the model can generate a plausible-looking but incorrect intermediate step that passes casual review.
How should tolerance bands be set for stoichiometry verifiers?
Set tolerance at 1% or less for problems with exact molar masses and well-defined conditions. Widen to 2-3% only when the problem involves measured quantities with stated uncertainty. Document the tolerance in the task specification. A tolerance wider than 5% on a closed-form stoichiometry problem will mask SI prefix errors and should not be used for training or eval signal.
Are these error modes unique to chemistry, or do they appear in other STEM domains?
The underlying mechanism, silent magnitude error from unit mishandling, appears across physics, engineering, and finance tasks. The specific failure patterns (mole ratio inversion, state-condition assumption errors) are chemistry-specific. The verification approach, programmatic numerical extraction plus step-level tracing plus expert rubric review, generalizes to any domain where the answer is a quantity with a unit and the derivation involves a multi-step transformation chain.
What makes a chemistry stoichiometry task suitable for RL training versus evaluation only?
A task is suitable for RL training when it has a reliable programmatic verifier for the final answer, authored step-level ground truth for process reward, and a difficulty calibration showing the target model fails it at a meaningful rate (roughly 30-70% pass rate at the task level). Tasks where the correct answer is ambiguous due to underspecified conditions, or where the verifier error rate is above 5%, should be held for evaluation only until the verifier is improved.
What This Means in Practice
Stoichiometry and unit handling errors in chemistry LLM outputs are not edge cases. They are a structural consequence of training objectives that reward fluent text over numerically consistent derivation chains. Evaluations that check only final answers miss the majority of failure signal. Evaluations that do not specify conditions, units, and tolerance bands introduce ambiguity that contaminates both eval scores and training labels. The path to high-signal chemistry tasks runs through precise task authoring, step-level ground truth, and verifiers that are themselves tested and maintained as models improve.
Chiron Data Labs builds expert-authored chemistry tasks with programmatic verifiers and step-level rubrics, calibrated for difficulty against frontier models. If you are building evals or RL environments in chemistry or other expert domains, get in touch with Chiron Data Labs.
Have questions or want personalised guidance? Contact us and we'll be happy to help.
Frontier language models can recite the ideal gas law, balance redox equations, and describe Le Chatelier's principle with textbook fluency. What they fail at, reliably and in ways that matter, is the procedural arithmetic that connects chemical knowledge to a correct answer. Stoichiometry and unit handling in chemistry LLM outputs expose a class of failure that aggregate benchmark scores obscure: models that are right about the concept and wrong about the number. For post-training researchers and evals engineers designing chemistry tasks, understanding the specific error modes is the prerequisite for building verifiable, high-signal evaluations.
Answer Capsule: Chemistry LLM outputs fail at stoichiometry and unit handling through five primary mechanisms: mole ratio inversion, dimensional analysis chain breaks, unit conflation across SI prefixes, missing or incorrect state-condition assumptions, and significant-figure propagation errors. These failures are distinct from factual errors. They require programmatic or expert-verified numerical checking, not surface-level text matching, to detect reliably.
Why Stoichiometry Errors Are Structurally Different From Factual Errors
A factual error in chemistry is recoverable from context. A stoichiometric error is silent. The model produces a number, the number looks plausible, and no surface-level fluency check catches it. This is the core evaluation problem.
Stoichiometry tasks require a model to maintain a consistent unit-tracking chain across multiple transformation steps: mass to moles, moles through a ratio, moles back to mass or volume, then adjusted for purity, yield, or state conditions. Each step is a potential failure point. The model's language generation objective does not penalize a broken chain if the final sentence is grammatically coherent and chemically plausible in isolation.
The failure mode is structurally identical to what appears in financial LLM outputs, where numeric precision and unit errors in financial LLM outputs follow the same pattern: correct vocabulary, incorrect arithmetic, silent propagation of the mistake through subsequent steps.
The Five Primary Error Modes in Chemistry LLM Stoichiometry
1. Mole Ratio Inversion
The model applies a stoichiometric coefficient in the wrong direction. Given a balanced equation where 2 mol A produces 1 mol B, the model divides by 2 when it should multiply, or vice versa. Detection requires comparing the model's stated ratio to the balanced equation it either cited or was given. This error is most frequent when the target species appears on the left side of the equation or when the question asks for a limiting reagent calculation across more than two species.
2. Dimensional Analysis Chain Breaks
The model drops a unit mid-calculation. A common pattern: the model correctly converts grams to moles in step one, then treats the mole value as a gram value in step two without acknowledgment. The final answer carries the wrong unit, or the model applies a molar mass a second time when it should not. These breaks are invisible in natural language output because the model rarely writes out unit labels at each step unless explicitly prompted to do so.
3. SI Prefix Conflation
The model conflates millimoles with moles, milliliters with liters, or milligrams with grams. This is particularly common in solution chemistry tasks involving molarity calculations, where concentrations are frequently expressed in mmol/L in laboratory contexts but the model defaults to mol/L without adjusting the magnitude. A factor-of-1000 error results. The model's answer is internally consistent at the wrong scale.
4. Missing or Incorrect State-Condition Assumptions
Gas-law stoichiometry requires a stated temperature and pressure. Models frequently assume STP (0 degrees C, 101.325 kPa) when the problem implies SATP (25 degrees C, 100 kPa), or they apply the molar volume of an ideal gas at STP (22.414 L/mol) to a problem set at a different condition. The error is not in the law applied but in the condition assumed. Tasks that do not explicitly state conditions are particularly prone to this failure, and models rarely flag the assumption they are making.
5. Significant Figure Propagation Errors
Models either over-report precision (giving six significant figures when the least precise input has two) or round intermediate values prematurely, compounding rounding error across a multi-step problem. Neither failure is catastrophic in isolation, but both indicate that the model is not tracking precision as a property of the calculation, only of the final formatting step.
How to Detect These Errors: A Verification Protocol
Text-match grading does not catch stoichiometric errors. A model that writes "the answer is 4.5 grams" when the correct answer is "4.5 g" passes a string match but that same model writing "the answer is 45 grams" also passes if the grader is not numerically aware. Verification requires a three-layer approach.
Programmatic numerical check: Extract the final numerical answer and unit from the model output using a parser. Compare to the verified correct answer within a defined tolerance (typically 0.5-1% for well-conditioned problems, wider for problems with stated significant-figure constraints). Flag unit mismatches as a separate error category from magnitude errors.
Step-level trace check: For chain-of-thought outputs, extract each intermediate numerical value and verify it against the expected value at that step. This identifies where in the chain the error originates. The approach mirrors error localization and labeling at the first wrong step, which is more informative for post-training signal than end-answer grading alone.
Expert rubric review: For tasks where the model's approach is non-standard but potentially valid (alternative balanced equations, different but equivalent unit paths), a domain expert reviews the trace. Programmatic checks cannot handle this case without a complete symbolic solver, which introduces its own failure modes.
Building verifiers for chemistry tasks requires the same discipline described in verifier test suites and unit testing for reward functions: the verifier itself must be tested against known-correct and known-incorrect outputs before it is trusted as a training or eval signal.
Illustrative Example: Limiting Reagent Task With Unit Conflation
Illustrative example: numbers are constructed to demonstrate the failure mode, not drawn from a specific model evaluation.
Task: 500 mg of sodium hydroxide (NaOH, molar mass 40.00 g/mol) reacts with excess hydrochloric acid. Calculate the mass of sodium chloride (NaCl, molar mass 58.44 g/mol) produced. Balanced equation: NaOH + HCl to give NaCl + H2O (1:1:1:1 molar ratio).
Correct solution:
Convert mass to moles: 500 mg = 0.500 g. Moles of NaOH = 0.500 g / 40.00 g/mol = 0.01250 mol.
Apply mole ratio (1:1): moles of NaCl = 0.01250 mol.
Convert to mass: 0.01250 mol x 58.44 g/mol = 0.7305 g = 730.5 mg.
Model error pattern (SI prefix conflation): The model reads "500 mg" and treats it as "500 g" in the mole conversion step, producing moles of NaOH = 12.50 mol, then a final mass of 730.5 g. The answer is internally consistent, the unit label "g" appears correctly in the output, and the calculation logic is stated correctly. Only the magnitude is wrong, by a factor of 1000. A grader checking for the presence of "730.5" in the output would incorrectly pass this response.
Detection: A numerical parser extracting the final value (730.5) and comparing to the expected value (0.7305 g) catches the error immediately. Step-level tracing identifies the failure at step one.
Common Failure Modes in Chemistry Eval Design
The errors above live in the model. The following failures live in the evaluation itself, and they are equally damaging to post-training signal quality.
Underspecified conditions: Tasks that omit temperature, pressure, or solution concentration invite the model to assume, and different assumptions produce different correct answers. Detection: review every gas-law and solution task for explicit condition statements. Fix: add condition constraints to the task stem, or specify that the model must state its assumptions and those assumptions must match a rubric-defined acceptable set.
Ambiguous unit expectations: Tasks that accept any equivalent unit without specifying the expected form (grams vs. kilograms, liters vs. cubic decimeters) create grading ambiguity. Fix: specify the required unit in the task, or build a unit-equivalence check into the verifier.
Single-step tasks that do not stress the chain: A task requiring only one conversion step will not surface chain-break errors. Fix: require at least three conversion steps, including a unit change at each step, for tasks targeting stoichiometric reasoning.
Tolerance bands that are too wide: A 10% tolerance on a stoichiometry answer masks the factor-of-1000 SI prefix error described above. Fix: set tolerance to 1% or less for well-conditioned problems; document the tolerance in the task specification so it can be adjusted as needed.
No step-level ground truth: Without intermediate expected values, a verifier can only check the final answer. A model that gets the right answer via an incorrect path (two errors that cancel) passes incorrectly. Fix: author step-level expected values for every multi-step task. This is operationally expensive but necessary for process reward model training data. The design principles for this kind of structured rubric are discussed in the context of domain-specific RLHF failure modes and style overfitting.
Conflating error types in defect taxonomy: Logging "wrong answer" without distinguishing mole ratio inversion from SI prefix conflation collapses diagnostic information. Fix: implement a defect taxonomy at the point of review. A structured approach to defect taxonomies for expert data and root-cause classification produces training signal that is actionable for targeted fine-tuning.
Where This Approach Breaks Down
Programmatic numerical verification works well for closed-form stoichiometry. It does not generalize cleanly to tasks involving equilibrium calculations with multiple valid solution branches, tasks where the balanced equation itself is part of the answer, or open-ended synthesis planning where the route determines the stoichiometry. For those task classes, expert rubric review is not optional. The verifier can check whether the model's proposed equation is balanced, but it cannot determine whether the proposed route is chemically reasonable without domain expertise encoded in the rubric. Difficulty calibration also drifts: a task that frontier models fail at 70% pass rate today may be solved reliably by the next model generation. Difficulty is a property measured per model and per date, not a fixed attribute of the task.
Frequently Asked Questions
What is the most common stoichiometry error mode in frontier LLM outputs?
SI prefix conflation (treating milligrams as grams, millimoles as moles) is the most diagnostically clean error mode because it produces a factor-of-1000 magnitude error that is easy to detect programmatically. Mole ratio inversion is more frequent in multi-reagent problems but harder to detect without step-level tracing. Both error types appear across frontier model families and do not correlate reliably with model size alone.
Can chain-of-thought prompting eliminate stoichiometric errors?
Chain-of-thought prompting reduces the frequency of some error modes by making the unit-tracking chain explicit, but it does not eliminate them. Models can write out a correct-looking chain and still produce an incorrect intermediate value. Step-level verification against authored ground truth is required to confirm correctness. CoT also introduces new failure modes: the model can generate a plausible-looking but incorrect intermediate step that passes casual review.
How should tolerance bands be set for stoichiometry verifiers?
Set tolerance at 1% or less for problems with exact molar masses and well-defined conditions. Widen to 2-3% only when the problem involves measured quantities with stated uncertainty. Document the tolerance in the task specification. A tolerance wider than 5% on a closed-form stoichiometry problem will mask SI prefix errors and should not be used for training or eval signal.
Are these error modes unique to chemistry, or do they appear in other STEM domains?
The underlying mechanism, silent magnitude error from unit mishandling, appears across physics, engineering, and finance tasks. The specific failure patterns (mole ratio inversion, state-condition assumption errors) are chemistry-specific. The verification approach, programmatic numerical extraction plus step-level tracing plus expert rubric review, generalizes to any domain where the answer is a quantity with a unit and the derivation involves a multi-step transformation chain.
What makes a chemistry stoichiometry task suitable for RL training versus evaluation only?
A task is suitable for RL training when it has a reliable programmatic verifier for the final answer, authored step-level ground truth for process reward, and a difficulty calibration showing the target model fails it at a meaningful rate (roughly 30-70% pass rate at the task level). Tasks where the correct answer is ambiguous due to underspecified conditions, or where the verifier error rate is above 5%, should be held for evaluation only until the verifier is improved.
What This Means in Practice
Stoichiometry and unit handling errors in chemistry LLM outputs are not edge cases. They are a structural consequence of training objectives that reward fluent text over numerically consistent derivation chains. Evaluations that check only final answers miss the majority of failure signal. Evaluations that do not specify conditions, units, and tolerance bands introduce ambiguity that contaminates both eval scores and training labels. The path to high-signal chemistry tasks runs through precise task authoring, step-level ground truth, and verifiers that are themselves tested and maintained as models improve.
Chiron Data Labs builds expert-authored chemistry tasks with programmatic verifiers and step-level rubrics, calibrated for difficulty against frontier models. If you are building evals or RL environments in chemistry or other expert domains, get in touch with Chiron Data Labs.
Have questions or want personalised guidance? Contact us and we'll be happy to help.