SciEvidence Papers

PAPERCommunity contribution

  • Article
  • Environmental science
  • Environmental Science & Technology

Patterns and Mitigation of Large Language Models’ Hallucinations on Environmental Regulatory Facts

Jinyue Jiang, Yanji Tian, Tiezheng Tong, Paul Westerhoff

Environmental Science & Technology10.1021/acs.est.6c06286View paper

Abstract

With increasing adoption of large language models (LLMs) in the environmental education, research, and policy domains, reducing hallucinations─where LLMs confidently produce wrong or fabricated results─remains a critical challenge toward trustworthy agentic AI. We evaluated hallucinations on 505 environmental water, air, and solids regulatory facts collected from U.S., China, the European Union (EU), and the World Health Organization (WHO). Across four open-weight and three commercial state-of-the-art LLMs evaluated in both English and Chinese, open-weight models hallucinated on 50–70% of facts, while commercial models hallucinated on only 7–15%. We discovered a deep geographic and linguistic imbalance, where LLMs hallucinate much less on U.S. facts, and when prompting in English. Although models were less confident on average when hallucinating, a non-trivial fraction of incorrect answers were still produced with high token-level confidence. Causal tracing identified layers where restoring the subject representation most strongly recovered correct answers, with patterns differing across models. Retrieval-augmented generation effectively mitigated hallucination, even for small open-weight models. Safe deployment of AI in high-stakes environmental workflows therefore requires both targeted mitigation of training biases and robust external knowledge grounding.

Introduction

Large language models (LLMs) have fundamentally transformed how we interact with information. By generating highly fluent, context-aware text, these models are increasingly integrated into daily workflows and scientific research and development. (1−3) However, a critical vulnerability persists even in state-of-the-art (SOTA) models: hallucinations. Hallucination occurs when an LLM confidently outputs factually incorrect information or fabricates entirely non-existent information, such as a “ghost” citation with an invalid DOI. Because LLMs are trained to optimize next-token predictions across vast training corpora, they are inherently prone to generating plausible but false assertions. (4) This architectural limitation is uniquely dangerous in the environmental sector, where false or fabricated information may directly harm public welfare. For instance, if an LLM integrated into an automated compliance workflow or a public-facing municipal question-answering system confidently hallucinates an overly relaxed threshold for a contaminant in drinking water, it could lead to improper waste discharge or misinformed community health decisions. Regulatory limits are where this risk concentrates, and being codified numbers, they are part of environmental knowledge whose correctness can be verified without expert judgment.

Much of the research to date has explored the integration of LLMs into environmental science and engineering, such as using LLMs for life cycle assessment, (5, 6) environmental question-answering systems, (7, 8) and automated literature synthesis. (9, 10) Evaluation resources for the environmental domain have also begun to appear, with existing ones focusing on capability rather than failure. (11−14) As large language models move from demonstration into environmental practice, we need more in-depth understanding of their failure modes. (15) However, such evaluation has not been carried out in the environmental field, despite the development of hallucination evaluations in other high-stakes domains such as medicine and law. (16, 17)

In this study, we established an evaluation dataset consisting of 505 regulatory facts from the U.S. EPA, Chinese National Standards (“Guo Biao” or GB), EU Directive, and Council Decisions, and WHO guidelines across the water, air, and solid waste sectors. We evaluated seven models (four open-weight models spanning from 8B to 70B parameter counts and three commercial SOTA models) regarding their hallucination rates on these environmental regulatory facts. Unlike closed commercial systems accessed via proprietary APIs, open-weight models release their trained parameters publicly, allowing researchers to run, inspect, and modify the underlying architecture locally. Because environmental regulations are dynamic and subject to frequent legislative updates or federal vs local jurisdictions, relying blindly on an LLM’s static parametric memory as a “black box” poses a continuous operational risk. For the open-weight models, we further utilized causal tracing to identify the specific architectural layers that contribute to successful recall of environmental knowledge.

Our evaluation reveals a stark performance gap: while commercial SOTA models maintained low hallucination rates (6.8% to 15%), open-weight base models struggled significantly (50% to 70%). Furthermore, we uncovered pronounced linguistic and geographic biases, where non-English prompts and non-U.S. regulations disproportionately triggered hallucinations. We then asked models to identify which limit applies to a described situation without naming the governing regulation, and found that models frequently recall a genuine regulatory value and attach it to the wrong regulatory entity. Using causal tracing, we identified that environmental regulatory knowledge is predominantly contributed by early-to-middle layers of the Transformer architecture, and by editing those layers directly, we show that a limit can be updated there, but doing so frequently rewrites the neighboring limits in the same regulation.

Finally, we demonstrated that retrieval-augmented generation (RAG) can effectively mitigate hallucination even for small models, but constructing a clean, structured vector database from unstructured environmental documents will be critical for RAG success. RAG, in which source documents are supplied to the model at the time of the question rather than relying on its trained weights, has become the principal mitigation strategy for factual errors and is already being adopted in environmental applications. (6, 8) Taken together, this study exposes the failure modes that are specific to environmental regulatory information: the same contaminant carries different legal limits across jurisdictions, media, and averaging periods; the limits can be revised and overwritten; and some of them are published in formats that pre-training pipelines ingest poorly. We envision that this work can help environmental researchers, educators, practitioners, and news reporters better understand when and how LLMs can be trusted and use LLMs in their environmental workflows more responsibly.

Materials and Methods

Evaluation Dataset

We specifically chose environmental regulatory facts as our evaluation dataset because they are unambiguous, legally codified numerical values that eliminate the subjectivity often present in open-ended language evaluation. Because each fact requires a precise alignment of the chemical entity, numeric threshold, and specific unit, they provide a rigorously objective ground truth for quantifying intrinsic hallucinations. A summary of the evaluation dataset’s jurisdiction and category is summarized in Table S1. For U.S. regulatory facts, we collected EPA standards from the National Primary Drinking Water Regulations (n = 81), (18) the National Secondary Drinking Water Regulations (n = 10), (19) the National Ambient Air Quality Standards (n = 12), and the Resource Conservation and Recovery Act (n = 40). (20, 21) For Chinese regulatory facts, we collected national standards from GB 5749 (drinking water, n = 91), GB 3095 (air quality, n = 46), and GB 5085.3 (hazardous waste, n = 49). For EU regulatory facts, we collected EU Directive 2020/2184 (drinking water, n = 41), EU Directive 2008/50/EC (air quality, n = 15), and EU Council Decision 2003/33/EC (hazardous waste, n = 16). For WHO regulatory facts, we collected WHO Guidelines for Drinking Water Quality 4th Edition (n = 89) and WHO Global Air Quality Guidelines (n = 15). This database covers 312 water regulatory facts, 88 air regulatory facts, and 105 solid regulatory facts. In total, 143 regulatory facts are from the U.S., 186 regulatory facts are from China, 72 regulatory facts are from the EU, and 104 regulatory facts are from WHO.

For each of these facts, we provided two prompts, one in English and one in Chinese, to test if prompting language would affect the hallucination rate. All standard values adopt the most up-to-date values, except for Chinese GB 3095, which has a 2026 version that went into effect on March 1, 2026. Because this version is likely not included in any of the models’ knowledge at the time of testing, we used the GB 3095-2012 version, the latest version before 2026 refreshment, as the reference standard.

To test whether hallucination changes when the applicable standard must be inferred, we constructed 50 additional scenario-based questions. Each question describes a realistic situation, and asks for the numerical limit that governs it without naming the specific regulation. For example, we asked what limit determines compliance for a municipal water treatment plant in Arizona that detects bromate in its finished water, and LLMs need to infer from the given context that the EPA Maximum Contaminant Level (MCL) for bromate applies in this case. The 50 questions are constructed from pollutants regulated by two or more entities in the same medium, and we retained only those facts whose limit differs by more than 5% from every other entity’s limit for the same pollutant. This design makes a wrong answer diagnosable in the case where the models recalled a real regulatory value but attributed it to the wrong regulatory entity, which we refer to as entity confusion. The 50 questions are distributed across the four regulatory entities and the three media. Each question is paired with its direct-format counterpart from the 505-fact dataset, so the two question types are compared on identical facts.

LLM Testing

We chose four leading open-weight models with parameter counts ranging from 8B to 70B: Llama-3.1-8B, Qwen-3.5-9B, Gemma-4-31B, and Llama-3.1-70B (Figure 1a). This covers a diverse cross-section of modern model architectures and linguistic training priors. By including models with predominantly English-centric lineages (Llama) alongside those explicitly optimized for robust Chinese and multilingual performance (Qwen), we can systematically investigate how both parameter scale and geographic training data distributions influence cross-lingual factual recall and hallucination rates. Notably, Llama-3.1-8B and Llama-3.1-70B belong to the same architectural family but differ significantly in parameter count, allowing us to systematically test whether scaling up a model mitigates its hallucination rate on regulatory facts.

Figure 1. (a) Schematic showing representative testing models and evaluation procedures with unit-aware factual recall, hallucinations, and abstention. Note that for instruction-tuned open-weight models and commercial SOTA models, we used system prompts to standardize their response to avoid verbosity (Text S1); (b) a simplified causal tracing illustration. We first corrupt the subject tokens associated with environmental regulatory facts (e.g., “b/rom/ate”), and then patch the clean state of the last subject token to each LLM layer to identify where restoring the subject representation recovers the correct answer. MLP: multilayer perceptron. Detailed description in Materials and Methods. (c) Schematic showing the Document RAG and Gold Context RAG and possible RAG failure modes.
Figure 1. (a) Schematic showing representative testing models and evaluation procedures with unit-aware factual recall, hallucinations, and abstention. Note that for instruction-tuned open-weight models and commercial SOTA models, we used system prompts to standardize their response to avoid verbosity (Text S1); (b) a simplified causal tracing illustration. We first corrupt the subject tokens associated with environmental regulatory facts (e.g., “b/rom/ate”), and then patch the clean state of the last subject token to each LLM layer to identify where restoring the subject representation recovers the correct answer. MLP: multilayer perceptron. Detailed description in Materials and Methods. (c) Schematic showing the Document RAG and Gold Context RAG and possible RAG failure modes.

For the open-weight models, inference was conducted on Arizona State University’s Sol Supercomputer. (22) A single NVIDIA A100 GPU with 80 GB of VRAM was utilized to deploy the models and execute inference across both the English and Chinese prompt sets. Because we specifically evaluated base models, which are trained strictly for autoregressive next-token prediction rather than instruction-following, the prompts were designed as direct continuations, formatted as: “The EPA Maximum Contaminant Level for Bromate in drinking water is”. To ensure deterministic and reproducible outputs, we employed greedy generation, which strictly selects the token with the highest probability at each step, eliminating temperature-based sampling variance. In natural language processing, a token represents the discrete computational unit of a sequence, which can range from a single character to a full word. The maximum generation length was capped at 15 tokens to isolate the numeric fact and prevent the model from generating extraneous text. Subject token counts were computed with each open-weight model’s own tokenizer, so that a given chemical name may carry a different count for different models, and the counts are aggregated within each model. Because the three commercial models do not all publish the tokenizers used in production, their subject lengths were estimated with the cl100k byte-pair encoding as a proxy. The different tokenizers segment these chemical names very similarly, so subject token count also serves as a measure of chemical-name complexity independent of any specific tokenizer.

To further test hallucination on commercial SOTA models, we chose flagship models from three leading LLM companies: GPT-5.4 from OpenAI, Gemini-3.1-Pro from Google and Claude Opus 4.6 from Anthropic (Figure 1a). Because commercial SOTA models are specifically fine-tuned for instruction-following and conversational alignment rather than simple autoregressive text completion, our prompting strategy required adaptation. Instead of utilizing the open-ended sentence continuations used for the base, open-weight models, prompts for the commercial APIs were structured as direct queries. We utilized system prompts to enforce strict formatting, requiring the models to output only the isolated numerical value and unit while suppressing conversational verbosity (Text S1). To ensure that the comparison between open-weight and commercial models was not driven by prompt format, we additionally evaluated the instruction-tuned version of each open-weight model under the same protocol used for commercial APIs.

All testing was conducted using “closed-book” settings (i.e., web-searching capability is disabled). This would allow us to accurately measure the environmental knowledge stored in models’ parametric memory. For outputs from both open-weight models and commercial SOTA models, a unit detection and matching algorithm was used to detect and standardize the unit in the generation and compare against the reference value. For example, if a water contaminant standard is 5 ppm in the evaluation dataset but the LLM outputs 5 mg/L or 5,000 μg/L, both will still be counted as correct.

Model Evaluation

We model the evaluation framework as a discrete classification problem over the evaluation dataset. Let Q denote the universal set of all regulatory fact queries in our dataset, where the total number of queries is N = |Q|. For each query Q in Q, the model generates a textual response r. We define a deterministic evaluation function E(r) that maps each response to exactly one of three mutually exclusive and exhaustive subsets: Factual Recall (C), Hallucination (H), and Abstention (A). Therefore, the response space is partitioned such that Q = C∪H∪A, and the intersection of any two subsets is the empty set e.g., (C∩H = Ø). The criteria for set inclusion are defined as follows: Factual Recall (C): the set of responses where the model accurately retrieves the correct numerical regulatory limit and a valid unit mapping (inclusive of acceptable alternative units); Hallucination (H): the set of responses containing intrinsic factual errors, where a response r ∈ H if the model confidently generates a numerical value that is false. For visualization and analysis, we further divide r ∈ H into two categories: “wrong but close” (the hallucinated values are within one order of magnitude of the ground truth value) , and “wrong by order of magnitude”; Abstention (A): the set of responses where the model fails to provide a confidently extractable numerical answer. The Factual Recall Rate (FRR) represents the proportion of accurately retrieved facts:

FRR=|C|N

(1)

The Hallucination Rate (HR) represents the proportion of queries resulting in fabricated or erroneous numerical confidence:

HR=|H|N

(2)

The Abstention Rate (AR) represents the proportion of safe refusals:

AR=|A|N

(3)

The Hallucination Rate Difference (ΔHR) measures the change in hallucination rate when prompting in Chinese versus English:

ΔHR=HRzh−HRen

(4)

Causal Tracing and Layer Editing

Causal tracing is conducted using National Deep Inference Fabric’s nnsight package. (23) The objective of causal tracing is to identify the layers that contribute the most to the successful recall of regulatory facts. Because causal tracing requires direct access to and manipulation of a model’s hidden internal states, this technique was restricted to the open-weight models in our study. To ensure the analysis maps genuine parametric memory rather than hallucination mechanisms, tracing was exclusively performed on prompts where the model successfully produced the correct factual answer in a baseline, unaltered state (defined as the “clean run”). The overall workflow is demonstrated in Figure 1b. During this clean run, we isolate the tokens comprising the factual subject of the prompt (e.g., the specific contaminant) and record the clean hidden states for the last token of this subject across all transformer layers, as the last token has been shown to aggregate the complete representation of the subject and act as the primary point where the model retrieves associated factual knowledge from its memory. (24)

We then apply a “corrupted run” by injecting Gaussian noise directly into the token embeddings of the subject. To adequately disrupt the model’s representation of the subject without destabilizing the entire forward pass, the noise magnitude is scaled to 3.0 times the standard deviation of the model’s embedding layer’s outputs. (24) This intervention effectively obscures the subject from the model’s contextual memory, which predictably degrades the probability of the model generating the correct regulatory limit. Finally, to isolate the specific layers responsible for factual recall, we perform a series of layer-wise patched runs. Iterating through each individual transformer layer, we repeat the corrupted run but surgically restore the hidden state at the final subject token to its previously recorded clean state. We quantify the causal importance of each layer by calculating its Average Indirect Effect (AIE), defined as the probability of the correct target token during the restored run minus its probability during the corrupted run, averaged across all prompts. The layer exhibiting the peak AIE indicates the primary locus which contributed to the greatest recovery of the factual recall from its weights.

We then performed layer editing by modifying the model’s weights at specific layers and observed whether the limit changed. (24) This also addresses a practical question raised by the ever-changing regulatory landscape: whether a limit held in a model’s memory can be updated when a standard is revised without the need to retrain the entire model. Editing was performed on Llama-3.1-8B. For each fact, we adjusted only the output weights of the MLP block within a three-layer window, leaving all other parameters untouched, so that the model produced a specified target value in response to the original prompt. To keep the modification small and local, every individual weight was permitted to move by up to 0.1% of the standard deviation of the weights in its own layer, a limit enforced after each optimization step. Optimization used the Adam algorithm with a learning rate of 10–4 and stopped once the model assigned at least 95% probability to the target value, up to a maximum of 100 steps.

Two types of edits were performed: (1) a counterfactual edit and (2) a repair edit. In the counterfactual edit, a limit the model originally recalled correctly was changed to a deliberately wrong value; in the repair edit, a limit the model originally got wrong was set to the correct value. Fifty facts were used for each type. Each edit was applied in one of four three-layer windows: an early window at the layers where the average indirect effect peaks, a middle window, a late window, and a window drawn at random and redrawn for every fact. After each edit, we re-queried the model with the original prompt, with a reworded version of the same question, with a set of unrelated limits, and with the neighboring limits from the same regulation, to measure whether the edit succeeded, whether it survived rewording, and whether it also affected closely related facts.

Retrieval-Augmented Generation

To demonstrate that hallucinations in open-weight LLMs could be effectively mitigated through RAG, we constructed a local vector database for the regulatory documents (Figure 1c). To accurately capture dense engineering data, all source documents were processed using Docling, a structure-aware document parsing framework that explicitly isolates and linearizes complex tables row-by-row to prevent numerical misalignment. (25) To bridge the linguistic gap between English and Chinese queries, all document chunks were embedded using BAAI/bge-m3, a state-of-the-art multilingual embedding model. (26) We then built a dense index using ChromaDB and a sparse, keyword-based index using BM25. (27) During inference, dense and sparse scores were blended utilizing Reciprocal Rank Fusion (k = 60), heavily weighted towards the dense retriever (α = 0.85). Retrieval accuracy was relatively insensitive to both values (Table S3). Furthermore, to prevent the retrieval system from favoring generic texts over numerical data, we applied an artificial 1.2× retrieval score multiplier to all chunks explicitly tagged as table rows. For each query, the top 5 retrieved chunks were concatenated into the context window, capped at a maximum of 4,000 characters. Because RAG architecture inherently requires models capable of interpreting system directives and integrating external context, we used an instruction fine-tuned model for RAG evaluation.

We performed two tests for each of the four open-weight models: a “Document RAG” test, which mimics the real-world scenario where the vector database is likely constructed from PDFs and website files. In this test, the vector database is built entirely from PDF sources; and a “Gold Context RAG” test, designed to isolate the model’s generation capabilities from retrieval noise, so that the only failure mode is generation failure. In this idealized test, models were provided with an index consisting exclusively of the perfectly structured ground-truth facts from our evaluation dataset, assuming a flawless retrieval step. The system prompt for RAG test is given in Text S2.

Results and Discussion

Overall Hallucination Occurrence

We found that open-weight base models exhibit hallucination rates between 50% and 70% for environmental regulatory facts, whereas commercial SOTA models exhibit much lower hallucination rates, ranging from 6.8% to 15% (Figure 2a). This striking difference probably stems from the more advanced architecture, much larger parameter counts, and subsequently, larger training corpora for SOTA models. While commercial models do not disclose their parameter counts, industry estimation frequently points to a few hundred billion to the trillion-scale, much larger than the open-weight models tested in this study. (28, 29) With larger parameter counts, the required training corpora size is also significantly larger. Early academic experiments point to an optimal ratio of 20:1 between the training tokens and the number of parameters, known as “Chinchilla scaling law”. (30) In recent years, this ratio is often inflated as a result of inference optimization. For example, Llama-3.1 families were trained with roughly 15 trillion tokens, much larger than the 20:1 ratio would require. (31) Even so, commercial SOTA models were likely trained on much larger corpora including proprietary training material compared to open-weight models, which might have exposed the models to the environmental knowledge we tested here, resulting in a lower hallucination rate. A further possible explanation is post-training. Commercial models undergo extensive fine-tuning and alignment, whereas the open-weight models compared here are base versions.

Figure 2. Overall hallucination occurrence across models. (a) Breakdown of test outcomes across open-weight and SOTA models; (b) hallucination rate breakdown by regulatory facts’ origin (U.S., China, EU, and WHO) and by prompting language (English and Chinese); (c) the distribution of the probability of the first generated token, with breakdown by factual recall and hallucination, for the open-weight models.
Figure 2. Overall hallucination occurrence across models. (a) Breakdown of test outcomes across open-weight and SOTA models; (b) hallucination rate breakdown by regulatory facts’ origin (U.S., China, EU, and WHO) and by prompting language (English and Chinese); (c) the distribution of the probability of the first generated token, with breakdown by factual recall and hallucination, for the open-weight models.

To isolate the post-training effect, we repeated the evaluation with the instruction-tuned version of each open-weight model under exactly the same commercial protocol. Matching the prompt format did not narrow the gap. Pooling English and Chinese prompts, the instruction-tuned models hallucinated on 52% to 78% of the facts, compared with 50% to 70% for the base models and 6.8% to 15% for the commercial models (Figure 2a). Instruction tuning improves conversational alignment but does not improve, and often degrades, the recall of a specific numerical limit. Prompt format is therefore not what separates the two groups of models. Because the instruction-tuned versions are themselves post-trained, this comparison also indicates that supervised fine-tuning and alignment alone do not account for the gap. Open-weight post-training and alignment pipelines are often not equivalent in scale or methods to those used for commercial flagship models; however, a contribution from post-training quality cannot be excluded entirely, but the difference in training corpus size and coverage remains the most plausible explanation.

Among the open-weight models, Llama-3.1-70B exhibited the lowest hallucination rate of 50%. However, Gemma-4-31B rivaled it with an HR = 51% with less than half the parameter count. This could be attributed to the very recent release date of Gemma-4 (April 2026 with knowledge cutoff Jan 2025) which might have given Gemma an architectural and knowledge edge, whereas the Llama 3.1 model families were released in July 2024 with Dec 2023 knowledge cutoff. (31, 32) It is worth noting that Gemma-4 models share the same technical lineage from Gemini models, and Gemini-3.1-Pro exhibited the lowest hallucination rate (6.8%) among commercial SOTA models. (33) Within the same Llama-3.1 family, the 70B model exhibited a lower hallucination compared to the 8B model (50% vs 70%), suggesting that larger parameter counts could give models an edge in environmental knowledge. However, as set by the Gemma example, parameter count is not the single determinant: training corpus composition, recency, and post-training procedures could all contribute alongside scale. When hallucination happens, approximately half of the answers can be off by more than an order of magnitude (Figure 2a, Figure S1). For example, three of the four open-weight models evaluated reported the U.S. EPA Maximum Contaminant Level for PFOA as 70 ppt─the agency’s earlier lifetime health advisory─rather than the 4 ppt MCL finalized in 2024 (a 17.5-fold overestimate). If an LLM-assisted compliance workflow hallucinates a regulated limit value that is more relaxed by orders of magnitude, this becomes a serious public health concern. The recall of outdated values is a recurring pattern. Across the limits in our dataset that have been revised, many incorrect answers reproduced the standard’s own previous value rather than a completely fabricated one, especially for open-weight models. We still count such outdated recall as hallucination because a superseded limit remains the wrong basis for a compliance decision.

Because LLMs are predominantly trained using English-centric corpora, this has led to potential representation bias, both in terms of knowledge applicability and prompting language. Almost all models performed better when answering U.S. EPA regulatory facts compared to other regulatory entities (Figure 2b, Figure S3, Table S2). For example, U.S. facts have an average hallucination rate of 18% versus 35% when prompted in English and Chinese, respectively. These values increased to 46% and 51% for Chinese regulatory facts (Figure S3). EU and WHO facts showed higher hallucination rates than U.S. facts but still lower than Chinese regulatory facts. This could be attributed to more training corpus covering those regulations. For example, the Llama team specifically recognized that their pre-training data contain significantly more English tokens than non-English tokens. (34) Additionally, U.S., EU and WHO facts are usually readily available in tabular format on public websites, whereas Chinese GB regulatory facts are often hidden behind PDF links on governmental websites, which might have increased the difficulty of their inclusion in the training corpora.

Because the evaluation dataset is not balanced across media and chemical types, we tested whether this geographic bias reflects dataset composition rather than jurisdiction. We restricted the comparison to pollutant–medium pairs regulated by two or more entities, so that the same chemical in the same medium is compared across jurisdictions and only the regulating entity differs. This matched subset contains 103 pollutant–medium groups covering 287 facts. The U.S. advantage persisted, with a hallucination rate of 20% on U.S. facts versus 42% for Chinese facts, 34% for EU facts, and 35% for WHO facts. The geographic gap is therefore not an artifact of which chemicals each entity happens to regulate. The medium, however, does change the picture considerably. Within the matched subset, the U.S. advantage held for water and widened sharply for solid waste (China +44.2%; EU, +64.9%), but reversed for air, where EU facts were hallucinated 21.8% less than U.S. facts (Figure S8). However, only seven pollutant groups are matched in air, so this could be an artifact of small sample size. Ambient air standards are short lists of pollutants that appear in almost every jurisdiction’s public reporting, so no regulatory entity holds a corpus advantage for them, whereas solid waste limits sit inside leaching test tables in PDF documents, where the U.S. values are better represented online than their Chinese or EU counterparts.

Another striking factor that affects the hallucination rate is prompting language. Although we used English and Chinese prompts for the same set of facts, using Chinese prompts consistently led to a higher hallucination rate, even for Chinese regulatory facts and for Chinese models (Qwen-3.5-9B). Llama-3.1-70B exhibited the highest lingual gap: when answering WHO regulatory facts, prompting in Chinese resulted in a ΔHR of 40% compared to prompting in English (Table S2). Among open-weight models, the only time when prompting in Chinese resulted in better performance was when answering WHO regulatory facts using Qwen-3.5-9B, with a ΔHR of −5.8%. This is probably because Qwen-3.5-9B was specifically optimized for Chinese conversations and WHO guidelines have a Chinese version available online. Qwen-3.5-9B is also the only open-weight model that achieved better performance on Chinese regulatory facts compared to U.S. regulatory facts when prompting in Chinese. Similar patterns have been demonstrated in a recent multilingual test, where the authors found that LLMs retained higher factual accuracy for high-resource languages. (35) Technically, Chinese is still considered a high-resource language with an extensive digital footprint, just not as abundant as English. The pattern revealed here suggests that current LLMs could potentially hallucinate more when prompting in other languages that have lower digital footprints, requiring a more careful evaluation when relying on information retrieved from LLMs.

Posing the same limits as scenario-based questions changed accuracy remarkably little. The three commercial models each answered 88% of the 50 scenarios correctly, compared with 86% to 96% on the matched direct prompts, whereas the open-weight models answered 26% to 56% correctly, compared with 26% to 58% (Figure 3a and c). Requiring the model to infer the governing regulation therefore does not, on its own, make the task harder. However, we did notice an interesting characteristic of the hallucinations. For the commercial models, 16 of the 18 (89%) incorrect answers reproduced a documented regulatory value that was simply attached to the wrong regulatory entity, the wrong averaging period, or an outdated revision, and only 2 were real fabrications that appeared in no regulation at all. Among the open-weight models, 61 of 119 incorrect answers (51%) were similarly traceable to a real limit. Therefore, model scale and capability change not only how often hallucinations occur but also the nature of hallucination.

Figure 3. Performance on scenario-based questions. (a) Hallucination on scenario-based questions with breakdown by hallucination type; (b) entity confusion matrix pooled across open-weight models and commercial models; (c) change in accuracy on the scenario questions compared with the direct-format prompts for the same 50 facts.
Figure 3. Performance on scenario-based questions. (a) Hallucination on scenario-based questions with breakdown by hallucination type; (b) entity confusion matrix pooled across open-weight models and commercial models; (c) change in accuracy on the scenario questions compared with the direct-format prompts for the same 50 facts.

The misattributions were strongly directional (Figure 3b). In every commercial case where entity confusion happens, questions about Chinese standards were always answered with U.S. regulatory values. The open-weight models followed the same direction. For example, when the question should have applied the Chinese national standard for atrazine in drinking water (2 μg/L), both Llama-3.1-8B and Qwen-3.5-9B answered with 3 μg/L, which is the U.S. MCL. Questions about U.S. and WHO limits, in comparison, were never answered with another entity’s value by any commercial model. This asymmetry gives a mechanism for the geographic bias reported above: the deficit on non-U.S. regulations is not only missing knowledge but well-known U.S. values being applied where they do not govern as well. The single exception is Qwen-3.5-9B, the only model with substantial Chinese pre-training, which answered U.S. questions with Chinese values.

The decoder-only LLMs evaluated in this study are autoregressive models, which means each subsequent token is strictly conditioned on the sequence before it. Because the output of our tests is a short sequence of a number plus units, the probability of the first generated token can be viewed as a proxy for the model’s relative confidence in its answer (Figure 2c). For most of the factual correct answers, the probability clustered on the higher end─suggesting models are truly confident in their answers rather than randomly guessing it right. For the hallucinated answers, the distribution shifted to lower probability values, but to different extents in different models. For example, Qwen-3.5-9B showed a very large cluster of probability lower than 0.5, suggesting that the models were not confident when giving out the wrong answers. Despite the left shift, there are still abundant distribution on the right for hallucinated answers, indicating that the model frequently exhibits high-confidence hallucinations (Figure S2). This finding underscores a critical vulnerability in deploying LLMs for high-stakes environmental tasks: the parametric confidence of the model cannot be universally relied upon as a proxy for factual accuracy, as the model often “commits” to a fabricated number at the first token with high probability, even when the answers could be off by orders of magnitude (Figure S1, Figure S2).

Other Factors Affecting Hallucinations

We aggregated results across different models and prompting languages and calculated the average hallucination rate for regulatory facts associated with different media and different classes of chemicals (Figure 4a and b). The most and least hallucinated chemicals and their hallucination rates across models are shown in Figure S4 and Figure S5. Air-related facts showed the lowest average hallucination rate of 30%, followed by water-related facts (34%), whereas solids-related facts showed the highest hallucination rate of 61%. This is likely due to their different digital coverage, as water and air regulatory limits are frequently cited in media and website coverage. Among the different chemical classes, semi-volatile organic compounds (SVOC) showed the highest hallucination rate (53%), followed by pesticides (53%) and per- and polyfluoroalkyl substances (PFAS) (52%). The U.S. regulations on PFAS in the National Primary Drinking Water Regulation were announced in April 2024, whereas many of the open-weight models have a knowledge cutoff date around or before that─which potentially led to poorly answered PFAS prompts. This revealed one of the important dilemmas when incorporating LLMs for environmental use: the ever-changing environmental regulatory landscape versus the static parametric memory that LLMs rely on. If not complemented with RAG, LLMs could easily hallucinate outdated information or confidently fabricate information. Overall, the chemicals that showed the lowest hallucination rate across models and prompting languages are generally those that are frequently discussed and cited, such as nitrate and ammonia, whereas the chemicals that showed the highest hallucination rate typically possess more complex structures less known to the public (Figure S4 and Figure S5).

Figure 4. Other factors affecting hallucination rate. Average hallucination rate across 7 models and 2 prompting languages by (a) media, (b) subject class, and (c) subject token count.
Figure 4. Other factors affecting hallucination rate. Average hallucination rate across 7 models and 2 prompting languages by (a) media, (b) subject class, and (c) subject token count.

A closer look at the per-chemical extremes (Figure S4, Figure S5) reveals two environmentally consequential signals. First, the four chemicals on which every model failed in every language─2,4-dichlorophenol, 2,4-dinitrochlorobenzene, acrylonitrile, and parathion─are all listed exclusively in China’s GB 5085.3-2007 hazardous-waste leaching toxicity identification standard, with no counterpart in the U.S. EPA, EU, or WHO regulatory facts evaluated here. One is an organophosphate insecticide (parathion); the other three are industrial organic intermediates. Second, pesticides account for 13 of the 30 highest-hallucination chemicals─spanning Chinese-regulated organochlorine persistent organic pollutants, Chinese-regulated organophosphates, and WHO-guideline phenoxy and triazine herbicides. By contrast, the 30 lowest-hallucination chemicals are dominated by common drinking-water and ambient-air indicators (PM10, NO2, benzene, bromate, fluoride, sulfate, nitrate, iron, manganese, arsenic), almost all of which appear on multiple jurisdictions’ regulatory lists simultaneously and feature prominently in standard environmental-engineering curricula.

LLMs operate on tokens rather than words. Generally, a single word is embedded into one or multiple tokens, which are then processed through the Transformer as high-dimensional vectors. Simple and common chemical names, such as lead and silver, often count as a single token. These single-token chemicals exhibited lower hallucination rates, even within open-weight models (Figure 4c). However, longer and more complex chemical names potentially take up many more tokens. For example, 1,2,4-trichlorobenzene will take up 11 tokens using Llama’s tokenizer (1/,/2/,/4/-Tr/ich/lor/ob/enz/ene). Indeed, we found that higher token counts for a subject generally led to an increased hallucination rate among open-weight models (Figure 4c), as these usually represent more complex chemicals with sparser representation in the training data. For instance, the average hallucination rate for one-token subjects in open-weight models was 36%, but this increased to 65% when the subject’s token length reached 10. However, this does not hold true for commercial SOTA models, which retained a low hallucination rate across all token lengths (Figure 4c). This likely reflects disparities in training data coverage. Short-token subjects typically correspond to frequently discussed “headline” chemicals, which are more easily consolidated into model memory during training compared to lengthy, obscure chemicals. Furthermore, it is likely that longer-token subjects are harder to associate with factual values because the self-attention mechanism must distribute its weights across a highly fragmented, multi-token sequence, making it computationally more difficult to maintain the semantic integrity of a single chemical entity.

Transformer Layer Contributions to Regulatory Fact Recall

Because environmental regulations frequently undergo legislative updates at local, state, and federal levels, relying blindly on an LLM’s static parametric memory poses an ongoing operational risk. To move beyond treating these models as black boxes, we utilized a causal tracing algorithm to isolate the specific architectural layers with which this environmental knowledge is most associated. By corrupting the subject token embeddings and later patching them with the hidden state from the clean run, we were able to locate the layers that are most associated with environmental knowledge. Tracing was performed only on prompts that the models answered correctly, so this analysis localizes where a successful recall takes place and does not, by itself, describe how a hallucination is produced. As shown in Figure 5, AIE concentrates in the first 10–50% of the normalized depth and falls away in later layers, consistent with previous findings. (24) Because only the final subject token is patched, this locates where restoring the subject representation recovers the answer rather than showing that later layers are uninvolved. English prompts consistently exhibit stronger causal signals than their Chinese counterparts, consistent with English-dominant training corpora, though the severity of this discrepancy varied significantly across models. For example, the two Llama 3.1 models essentially showed a near-zero AIE for Chinese prompts, suggesting that factual recall knowledge is stored almost entirely in English-centric representations. Given that Llama 3.1 is officially optimized for eight languages, which do not include Chinese, the model likely relies on a cross-lingual transfer mechanism. It maps the Chinese input into its English-dominant latent space, contrasting sharply with English prompts that trigger a precise, localized factual lookup (as illustrated by the solid lines in Figure 5). Conversely, Qwen-3.5-9B and Gemma-4-31B, which possess deeper native training in Chinese, demonstrated meaningful, localized causal signals for Chinese prompts, albeit lower than those for English prompts.

Figure 5. Causal tracing and layer editing. (a) Mean average indirect effect against normalized layer depth for the four open-weight models. (b) Outcomes of editing a single regulatory limit in Llama-3.1-8B within a three-layer window at four different depths. (c) What happened to the neighboring limits within the same regulation after each edit.
Figure 5. Causal tracing and layer editing. (a) Mean average indirect effect against normalized layer depth for the four open-weight models. (b) Outcomes of editing a single regulatory limit in Llama-3.1-8B within a three-layer window at four different depths. (c) What happened to the neighboring limits within the same regulation after each edit.

Isolating the layers most associated with factual recall raises a practical possibility. Environmental standards are revised regularly, so it would be valuable to update a limit held in a model’s memory directly at those layers using model-editing techniques such as Rank-One Model Editing or Mass-Editing Memory in a Transformer. (36) This means that when environmental standards inevitably change (e.g., when the U.S. EPA updates a Maximum Contaminant Level), practitioners could in principle update the LLM’s parametric memory directly at the identified layers without undertaking the computationally prohibitive risk of full-model retraining or catastrophic forgetting. We tested whether this is feasible by a layer editing experiment.

Editing the early layers where the causal signal peaks changed the limit in 98% to 100% of attempts and required the fewest optimization steps, 9 for a repair and 15 for a corruption, against 78 and 96 for the late window, which frequently failed to converge at all and succeeded in only 66% of corruptions. Unrelated limits were also best preserved at the traced layers, at 94% to 95%, compared with 73% to 76% when the middle window was edited (Figure 5b). Repair and corruption behaved alike, indicating that they offer intervention sites for changing recalled values in either direction. However, editing a single limit frequently moved the values of sibling limits within the same regulation. At the traced layers, only 54% of neighboring limits were left unchanged, and 7% of them adopted the edited value directly (Figure 5c). Direct adoption was most frequent when the middle layers were edited, at 17%, which is also where an edit best survived rewording of the question, at 74% to 84%. Correcting the Chinese drinking-water limit for malathion to its true value of 0.25 mg/L, for example, also changed the model’s answers for dichlorvos and pentachlorophenol to 0.25 mg/L, a value that governs neither, since their limits in the same standard are 0.001 and 0.009 mg/L.

The results above indicated that layer editing is effective and works most efficiently at exactly the layers that tracing identified, but comes with an important cost. A practitioner updating a single limit would risk silently rewriting the neighboring limits in the same table. Therefore, grounding the model in the regulatory documents is the simpler and safer route to keeping an environmental model current, as we discuss in the next section. Whether the same layers could also be used to detect a hallucination as it is generated is a separate question that warrants future experiments, since tracing was restricted to prompts the model had already answered correctly.

RAG for Hallucination Reduction

The editing results above show that a regulatory limit can be corrected inside the model, but not without disturbing the neighboring limits. The alternative is to leave the weights untouched and instead supply the governing document at the time the question is asked. Consequently, grounding model outputs in external, curated databases through RAG represents a critical mitigation strategy. RAG has been adopted rapidly across environmental applications. For example, WaterRAG couples a multiagent retrieval framework to a curated database of peer-reviewed wastewater studies and increases answer correctness on professional wastewater questions from 64.9% to 80.5%. (8) Retrieving a regulatory limit poses a unique challenge compared with retrieving literature: the source is a legal document rather than a literature collection, and the answer is a single value that must be located in one row of one table and reported with the correct unit and issuing authority. Because the RAG architecture requires models to strictly adhere to system prompts and integrate external context, we utilized the instruction-tuned versions of the four open-weight models for these evaluations. A baseline, non-RAG test was first conducted to isolate their intrinsic factual recall. Consistent with the format control described above (Figure 2a), the instruction-tuned models exhibited slightly higher baseline hallucination rates for three of the four architectures compared to their base-model counterparts (Figure 6). This aligns with recent findings, which demonstrate that instruction fine-tuning─while improving conversational alignment─often degrades zero-shot factual recall and increases susceptibility to confident fabrications. (37, 38)

Figure 6. RAG-assisted hallucination reduction in open-weight models. Percentage on top of the bar shows the hallucination rate (the sum of the red and yellow bars).
Figure 6. RAG-assisted hallucination reduction in open-weight models. Percentage on top of the bar shows the hallucination rate (the sum of the red and yellow bars).

When provided with a vector database constructed from clean, perfectly structured knowledge, as shown in the “Gold Context RAG”, all open-weight models were able to reduce hallucinations to near zero (Figure 6, Figure S6). Llama-3.1-8B still showed a hallucination rate of 1.2%, meaning that its parametric memory still sometimes overrides the retrieved correct value, highlighting small models’ weaknesses in instruction following. Unlike “Gold Context RAG” where the only failure mode is generation failure, “Document RAG” where the vector database was built from raw PDFs and websites, could also fail from the parsing and extraction failure, as well as retrieval error (Figure 1c). Indeed, open-weight models with “Document RAG” still hallucinate from time to time, albeit much less often than the base model (Figure 6). The hallucination rate for “Document RAG” varies between 9.9% and 14.8%, rivaling the hallucination rate for commercial SOTA models. The 50 scenario-based questions also saw significant improvement upon using RAG: the accuracy for the four open-weight models rose to 82% to 86%, recovering most of the gap to the commercial models (Figure S7). The remaining hallucination is not from failing to find the right document as the correct governing document was retrieved for 98% of the facts. These instead arise from selecting the wrong row within multi-column leaching tables where limits are cross-classified by test method and landfill class (Table S4). Using visual language models to help comprehend complex tabular structures could potentially further eliminate the remaining hallucination.

Limitations and Implications

With LLMs increasingly being used in daily life, research and development, hallucination increasingly bears higher stakes, particularly within the environmental sector, where regulatory accuracy directly impacts public and ecological health. In this work, we demonstrated that open-weight models spanning different parameter counts exhibit alarmingly high hallucination rates when recalling environmental facts. Notably, while models were on average less confident in incorrect outputs than in correct ones, many hallucinated answers were still produced with high token-level confidence─meaning that the model’s own confidence scores cannot, by themselves, be relied upon to flag fabricated regulatory facts.

Furthermore, the hidden inequity in environmental AI reliability, highlighted by unbalanced hallucination rates across regulatory entities and much higher rates of hallucination when prompting in Chinese compared to English, exposes a geographic and linguistic unevenness in AI trustworthiness. Our evaluation covers four regulatory systems and includes no national standard from a low- or middle-income country, so these results should not be read as a ranking of the world’s regulatory systems. However, the direction of the imbalance is concerning for exactly those settings. The WHO Guidelines for Drinking-water Quality are written to serve as the basis for national standards and are adopted or adapted by many countries that lack the resources to derive their own limits, yet WHO drinking-water facts were among the most hallucinated in our dataset, at 41% against 23% for U.S. drinking-water facts, and 18 percentage points higher after controlling for pollutant and medium. If left unaddressed, this disparity threatens to exacerbate existing global resource inequalities. Future environmental AI development must deliberately aim to bridge this performance gap, ensuring that AI-driven environmental tools are equitable, reliable, and globally accessible.

While this study provides a foundation for quantifying these vulnerabilities, several limitations must be acknowledged. First, the scope of our dataset is still relatively limited. It covers numerical limits rather than the procedural knowledge that also governs compliance, such as monitoring frequencies, reporting obligations, and the assignment of responsible parties. Future evaluation datasets can aim to include more diverse datasets from different regulatory entities, especially from Global South, for example, India’s IS10500, Brazil’s CONAMA resolutions, and South Africa’s SANS 241. Second, due to hardware limitations, we did not test open-weight models with higher parameter counts, such as GLM-5 (744B) and GPT-OSS-120B. Although higher parameter counts do not always guarantee a performance increase, these larger models could potentially store more environmental knowledge and therefore show lower hallucination. Finally, the performance of the evaluated models is inherently constrained by their respective pre-training knowledge cutoff dates. This temporal limitation likely explains the elevated hallucination rates observed for recently updated standards, such as the April 2024 U.S. EPA regulations on PFAS.

Because environmental regulations are fast-evolving, relying solely on the static parametric memory of LLMs is fundamentally incompatible with the strict precision required in this domain. Trusting unverified model outputs carries an unacceptable degree of risk. Consequently, integrating external knowledge grounding, such as RAG or tool-verified pipelines, is an operational necessity for environmental applications. Our results demonstrated that even small open-weight models can achieve very low hallucination when paired with an external vector database constructed from regulatory materials. However, regulatory materials are relatively well-organized in tabular format. When extending to broader environmental applications, the question of how to effectively organize a clean vector database from many raw, poorly structured PDFs and web pages remains a challenge. Concurrently, developing domain-specific parsers that utilize multimodal vision-language models to visually navigate complex table structures could greatly reduce RAG failures.

While this paper targets a critical aspect of hallucination where models confidently output incorrect numerical limits, another aspect where models fabricate entirely non-existent regulatory facts or “ghost” chemicals can be equally detrimental. Future research should focus on expanding this dataset to encompass a wider array of global standards, testing the efficacy of targeted mitigation techniques (such as specific layer editing) within environmental workflows, and developing robust automated detection systems for hallucination─going beyond simple confidence thresholding, since our results show that high token-level confidence does not guarantee correctness─and flagging suspect parametric retrieval in real time.