Language model applications for environmental geochemical analysis of soils in the Antofagasta region
DOI:
https://doi.org/10.64966/ingeniare.v33.36Keywords:
environmental geochemistry, soil analysis, Language modelsAbstract
This work describes the development of a prototype system utilizing large language models (LLMs) for environmental geochemical analysis of soils in the Antofagasta Region, Chile. The system integrates Retrieval Augmented Generation (RAG) techniques, structured prompt engineering principles based on DSPy, and a self-evaluation mechanism employing an LLM-as-a-judge approach. A total of 94 soil samples were processed, each containing data from 12 chemical elements (B, Co, Fe, Zn, Mn, Pb, As, Cu, Cr, Ni, V, Al). The methodology included UTM-to-WGS84 coordinate transformation, 2 principal component analysis (PCA), percentile 95-based anomaly detection for critical elements (As, Pb, Cu), and automatic generation of technical reports. The self-evaluation system applies six specific criteria, each rated on a 1-5 scale, and uses a temperature setting of 0.2 to ensure consistency. The developed system demonstrates the technical feasibility of specializing generic LLMs to the scientific domain of environmental geochemical analysis by incorporating a contextual knowledge base and regional geological characteristics via Ollama. Although the system successfully generates structured reports containing relevant environmental information and implements a functional automated evaluation prototype, its quantitative effectiveness requires systematic validation by comparing its analyses with those conducted by a human expert. This study establishes the methodological and technical foundations for adapting LLMs to specialized scientific domains without costly retraining, while also identifying the approach’s potential and current limitations.
Downloads
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Benjamín Ibarra-Campillay, Elizabeth Lam-Esquenazi, Brian Keith-Norambuena

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors retain copyright of their work and grant the journal the right of first publication under the Creative Commons CC-BY Attribution License, which permits unrestricted use, distribution, and reproduction provided the original authorship and the journal’s first publication are acknowledged.


