ESA Copilot: AI Report Generation for Environmental Engineering by Randy RamnansinghESA Copilot: AI Report Generation for Environmental Engineering by Randy Ramnansingh

ESA Copilot: AI Report Generation for Environmental Engineering

Randy Ramnansingh

Randy Ramnansingh

ESA Copilot

AI-Powered Environmental Report Generation Platform

Role: Lead AI Engineer & Full Stack Developer Client: Langan Engineering

Overview

Environmental Site Assessments (ESAs) are one of the most document-intensive processes in environmental engineering. Producing a single Phase I ESA often requires engineers to review hundreds of pages of historical reports, aerial imagery, regulatory records, maps, environmental databases, and previous assessments before writing detailed technical reports.
Langan Engineering engaged me to design and build ESA Copilot, an internal AI-powered assistant that dramatically accelerates this workflow by allowing engineers to ask questions about a site, automatically extract relevant information from historical documents, and generate high-quality report sections grounded in real project data.
Rather than functioning as a simple chatbot, ESA Copilot acts as an intelligent engineering assistant capable of understanding environmental terminology, historical site context, and regulatory documentation while producing audit-ready content that engineers can review and refine.

Objective

The objective of ESA Copilot was to reduce the time engineers spend reviewing historical documentation and writing repetitive report sections while maintaining the accuracy and traceability required for environmental consulting.
The platform needed to:
Analyze thousands of pages of environmental documentation
Understand scanned PDFs, maps and engineering reports
Retrieve relevant historical context
Generate draft report sections
Allow engineers to verify AI outputs against original sources
Integrate into existing engineering workflows without disrupting established review processes

Scope of Work

1. AI Copilot Architecture

Designed the overall AI architecture responsible for document ingestion, retrieval, prompt orchestration, report generation, and user interaction.
Built an end-to-end Retrieval-Augmented Generation (RAG) platform capable of grounding responses in company knowledge rather than relying solely on LLM knowledge.

2. Intelligent Document Processing

Developed document ingestion pipelines capable of processing:
Phase I & Phase II ESA reports
Regulatory documents
Historical environmental studies
Government databases
Site maps
Scanned PDFs
Image-heavy engineering reports
Implemented OCR, document chunking, metadata extraction, and semantic indexing for efficient retrieval.

3. Environmental Knowledge Search

Built semantic search infrastructure allowing engineers to search historical environmental information using natural language rather than keywords.
Implemented:
Vector embeddings
Semantic search
Metadata filtering
Hybrid retrieval
Context ranking

4. AI Report Generation

Built prompt orchestration pipelines capable of generating:
Site history
Environmental summaries
Historical land use
Regulatory findings
Contaminant summaries
Supporting narrative for Phase I ESAs
Each generated section remained traceable back to supporting documents.

5. Full Stack Application

Developed a modern web application allowing engineers to:
Upload documents
Browse processed files
Ask questions
Generate report sections
Review retrieved evidence
Edit AI-generated content
Export completed reports

6. Prompt Engineering & Guardrails

Designed prompt templates specifically optimized for environmental consulting.
Implemented:
Prompt chaining
Validation stages
Hallucination reduction
Confidence scoring
Source citation
Structured output formatting

7. AI Evaluation & Feedback

Built mechanisms allowing engineers to:
Review generated responses
Provide feedback
Improve prompts
Compare AI outputs
Validate generated reports before submission

Challenges

Large Unstructured Document Collections

Historical environmental documentation varied significantly in structure, quality, and formatting. Many reports were scanned decades ago and contained poor OCR quality, handwritten notes, engineering drawings, and inconsistent terminology.

Accuracy Requirements

Unlike consumer AI applications, environmental consulting demands highly accurate outputs because generated reports directly support engineering decisions.
Every AI response needed to remain grounded in source material and be easily verifiable.

Context Across Hundreds of Documents

Important environmental information is rarely contained within a single report.
The platform needed to retrieve information from multiple historical documents and combine them into a coherent understanding of a site.

Engineering Terminology

Environmental consulting includes specialized terminology, regulations, contaminants, geological concepts, and reporting standards that general-purpose language models do not consistently understand without additional context.

Trust in AI

Engineers needed confidence that generated information originated from actual project documentation rather than hallucinated model responses.
Building trust became just as important as building the AI itself.

Strategic Solution

To solve these challenges, I designed ESA Copilot around a Retrieval-Augmented Generation (RAG) architecture rather than relying on direct LLM prompting.

Intelligent Document Pipeline

Documents were automatically:
Parsed
OCR processed
Chunked intelligently
Embedded into vector space
Indexed for semantic retrieval
Linked with structured metadata
This transformed thousands of pages of engineering documents into searchable knowledge.

Hybrid Retrieval Engine

Instead of retrieving documents using keywords alone, ESA Copilot combined:
Semantic similarity search
Metadata filtering
Structured document search
Context ranking
This significantly improved retrieval quality while reducing irrelevant context passed to the LLM.

AI Orchestration Layer

Built an orchestration framework responsible for:
Query understanding
Retrieval strategy
Prompt construction
Context assembly
LLM interaction
Output validation
Response formatting
This abstraction made the platform extensible as newer models became available.

Engineering-Focused Prompt Framework

Rather than using generic prompts, I designed prompt templates specifically for environmental reporting.
These prompts instructed the model to:
cite supporting evidence
avoid speculation
distinguish assumptions from facts
produce engineering-style language
follow report formatting standards

Human-in-the-Loop Review

Every generated report remained fully editable.
Engineers could inspect retrieved documents, verify supporting evidence, modify generated text, and provide feedback before finalizing reports.
This ensured AI accelerated work without replacing professional engineering judgment.

Technology Stack

Languages
TypeScript
Python
JavaScript
Frontend
React
Node.js
Backend
Python
TypeScript APIs
Artificial Intelligence
GPT-4o
OpenAI API
Retrieval-Augmented Generation (RAG)
Prompt Engineering
Vector Embeddings
Document Processing
OCR
PDF Parsing
Computer Vision
Semantic Chunking
Search
Vector Database
Semantic Search
Metadata Search
Hybrid Retrieval
Infrastructure
Cloud-hosted microservices
Secure document storage
Internal engineering systems integration

Results

✔ Reduced time spent reviewing historical environmental documentation.
✔ Enabled engineers to locate relevant historical information using natural language rather than manually searching reports.
✔ Automated generation of repetitive technical report sections while maintaining human review.
✔ Improved consistency across environmental reports through standardized AI-generated language.
✔ Built a scalable AI platform capable of supporting future engineering workflows beyond Phase I Environmental Site Assessments.
✔ Established a reusable AI architecture that can be extended to additional engineering document types and internal knowledge systems.

My Role

I served as the Lead AI Engineer and Full Stack Developer responsible for the end-to-end design and implementation of ESA Copilot.
My responsibilities included:
Defining the overall AI architecture
Designing the Retrieval-Augmented Generation (RAG) system
Building document ingestion and semantic indexing pipelines
Developing prompt orchestration and AI workflows
Implementing full-stack React and Node.js features
Integrating OpenAI models into production workflows
Building guardrails and validation logic
Designing APIs and backend services
Collaborating with engineering stakeholders to refine AI-generated outputs
Driving the project from initial concept through production-ready implementation
This project combined modern LLM engineering, information retrieval, document intelligence, and full-stack software development to create a production AI assistant tailored specifically for environmental engineering workflows. It also demonstrates my experience architecting domain-specific AI systems that deliver measurable productivity gains while maintaining the accuracy and trust required in professional services.  
Like this project

Posted Jun 26, 2026

Developed AI assistant, ESA Copilot, to streamline and automate Phase I ESA processes.