Geotechnical AI Assistant

Geotechnical AI Assistant

Objective

At TREK Engineering, geotechnical engineers work with a mix of structured databases and long technical reports when assessing sites and making design decisions. The objective of this project was to build an AI assistant that could answer complex, multi-step questions over this information in a safe and explainable way, without exposing raw data outside company systems or replacing expert judgement.

Methodology

I designed an agentic LLM workflow that combines natural language understanding with SQL generation and geospatial queries. The assistant receives a user question, breaks it into smaller steps when needed, and generates parameterised SQL queries against the enterprise database. Sensitive values are masked before any interaction with the language model so that raw data remains inside internal infrastructure.

In parallel, I developed a proof of concept based on retrieval-augmented generation (RAG) to work with PDF-based technical reports. Reports are indexed with embeddings, relevant sections are retrieved for each question, and the LLM uses only those sections to produce summaries and answers, keeping the context grounded in actual documents rather than hallucinated content.

Implementation

On top of the workflow, I implemented a conversational interface where geotechnical engineers and researchers can ask domain-specific questions in natural language. The system can:

• Translate multi-step questions into SQL over a Postgres/PostGIS database
• Return tabular and spatial results, including borehole and investigation data
• Visualise outputs on a map and export them as KMZ (Google Earth) and CSV files
• Provide a transparent explanation of which tables, filters, and assumptions were used for each answer

For reports, the same chat-style interface allows users to request summaries, extract key findings, and ask follow-up questions. Each answer is linked back to the source sections, so users can quickly verify the context and, if needed, open the original report.

Impact

The AI assistant reduced the amount of manual querying and document searching required for common geotechnical questions, especially for team members who are less comfortable writing SQL or navigating multiple systems. At the same time, the explainable design and strict data boundaries helped maintain trust: users can see what the system did, which data it used, and how it arrived at an answer, rather than receiving a “black box” response.

This project also acted as a foundation for future AI work at TREK Engineering, showing how language models can be introduced in a controlled way in an engineering context, supporting experts instead of replacing them.