Full text loading...
This study explores the use of large language models (LLMs) in coding agents to enable geoscientists to converse with subsurface databases through natural language queries. By utilizing a ReAct (reasoning and action) framework, the agents can dynamically plan and execute SQL queries based on user input and adapt to errors or intermediate results. The study tests the performance of the agents on a complex SQL database of Petrel data and metadata from over 1200 projects. Initial challenges included the agents’ difficulties in understanding table relationships and correctly formulating queries, which were mitigated by providing database descriptions and adding specific ReAct loop strategies to help solve the task. The agents demonstrated improved accuracy, particularly in complex queries requiring joining data from multiple tables, while also reducing response time and resource costs. Results indicate that users can effectively interact with their data without needing SQL expertise, revealing the potential benefits of coding agents in enabling new subsurface workflows.