GSI Agent: Domain Knowledge Enhancement for Large Language Models in Green Stormwater Infrastructure
Abstract
Green Stormwater Infrastructure (GSI) systems, such as permeable pavement, rain gardens, and bioretention facilities, require continuous inspection and maintenance to ensure long-term performance. However, domain knowledge about GSI is often scattered across municipal manuals, regulatory documents, and inspection forms. As a result, non-expert users and maintenance staff may struggle to obtain reliable and actionable guidance from field observations. Although Large Language Models (LLMs) have demonstrated strong general reasoning and language generation capabilities, they often lack domain-specific knowledge and may produce inaccurate or hallucinated answers in engineering scenarios. This limitation restricts their direct application to professional infrastructure tasks. In this paper, we propose GSI Agent, a domain-enhanced LLM framework designed to improve performance in GSI-related tasks. Our approach integrates three complementary strategies: (1) supervised fine-tuning (SFT) on a curated GSI instruction dataset, (2) retrieval-augmented generation (RAG) over an internal GSI knowledge base constructed from municipal documents, and (3) an agent-based reasoning pipeline that coordinates retrieval, context integration, and structured response generation. We also construct a new GSI Dataset aligned with real-world GSI inspection and maintenance scenarios. Experimental results show that our framework significantly improves domain-specific performance while maintaining general knowledge capability. On the GSI dataset, BLEU-4 improves from 0.090 to 0.307, while performance on the common knowledge dataset remains stable (0.304 vs. 0.305). These results demonstrate that systematic domain knowledge enhancement can effectively adapt general-purpose LLMs to professional infrastructure applications.
Figures & tables
| Category | Typical method | Key idea and trade-off |
|---|---|---|
| Dynamic injection | RAG | Retrieve external documents at inference time; easy to update, but depends on retrieval quality. |
| Static injection | SFT | Put domain patterns into model parameters; strong for style/tasks, but harder to update. |
| Model adapter | LoRA | Train small rank adapters; efficient and low-cost, but capacity is limited. |
| Prompt optimization | Prompt | Control behavior without changing weights; fast but may be brittle. |
| Field | Description |
|---|---|
| _id | Unique identifier (UUIDv4). |
| _source | Source document (PDF) providing reference information. |
| _source_location | Geographical tag (e.g., “Philadelphia, PA”) or empty if not location-specific. |
| _task_type | One of nine predefined task families. |
| _deployment_type | Intended usage: fine-tuning or rag . |
| _created_at | Timestamp of record creation (UTC, RFC3339). |
| Location | Count | Percentage |
|---|---|---|
| Philadelphia, PA | 5219 | 54.2% |
| None | 4791 | 45.8% |
| Type | Count | Percentage |
|---|---|---|
| Fine-tuning | 7460 | 73.3% |
| RAG | 3495 | 26.7% |
| Task Type | Count | Percentage |
|---|---|---|
| Question Answering | 5300 | 31.2% |
| Verification / Judgment | 5241 | 30.9% |
| Generation / Composition | 2573 | 15.2% |
| Information Extraction | 1724 | 10.1% |
| Classification | 1225 | 7.2% |
| Reasoning / Math / Logic | 758 | 4.4% |
| Task Type | Count | Percentage |
|---|---|---|
| Question Answering | 400 | 40% |
| Classification | 300 | 30% |
| Reasoning / Logic | 300 | 30% |
| Metric | Level | What it measures |
|---|---|---|
| BLEU-4 | Lexical | N-gram precision with brevity penalty; good for short factual text. |
| ROUGE-1/2/L | Lexical | Recall-style overlap; captures coverage for summary-like answers. |
| Micro-F1 | Label | Aggregated F1 for classification-style tasks (e.g., issue type). |
| Sentence-BERT | Semantic | Embedding cosine similarity; complements lexical overlap. |
| G-Eval (LLM Judge) | Semantic/Logic | LLM-based scoring for correctness and coherence. |
| Human Expert | Real | Expert rating on usefulness and correctness (small sample). |
| Baseline | RAG | SFT | Agent | Notes |
|---|---|---|---|---|
| Base LLM | Direct prompting on base model. | |||
| Base LLM + RAG | ✓ | Retrieval improves factuality; no parameter updates. | ||
| Fine-tuned LLM + RAG | ✓ | ✓ | ✓ | Full system with LoRA-SFT, RAG, and agent reasoning. |
| Setting | Value |
|---|---|
| finetuning_type | LoRA |
| bf16 | true |
| template | qwen3_vl |
| lora_alpha | 16 |
| lora_dropout | 0 |
| lora_rank | 8 |
| Metric | Common Knowledge Dataset | GSI Dataset | ||
|---|---|---|---|---|
| Base LLM | GSI LLM | Base LLM | GSI LLM | |
| BLEU-4 | 0.304 | 0.305 | 0.090 | 0.307 |
| ROUGE-1 | 0.352 | 0.351 | 0.157 | 0.204 |
| ROUGE-2 | 0.146 | 0.146 | 0.032 | 0.111 |
| ROUGE-L | 0.223 | 0.223 | 0.071 | 0.153 |
| Sentence-BERT | 0.861 | 0.869 | 0.544 | 0.742 |
| Method | G-Eval Score |
|---|---|
| LLM + RAG | 0.51 |
| LLM + Fine-tuning | 0.63 |
| LLM + RAG + Fine-tuning | 0.72 |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| # | Title | Year | Link / Notes |
|---|---|---|---|
| 1 | Stormwater Management Guidance Manual | 2023 | https://water.phila.gov/wp-content/uploads/files/stormwater-management-guidance-manual.pdf |
| 2 | Pennsylvania Stormwater BMPs Manual | – | https://greenport.pa.gov/elibrary/GetFolder?FolderID=1368916 |
| 3 | City of Philadelphia Green Streets Design Manual | 2014 | https://www.phila.gov/media/20160504172218/Green-Streets-Design-Manual-2014.pdf |
| 4 | Green Stormwater Infrastructure Maintenance Manual | 2016 | https://water.phila.gov/wp-content/uploads/GSI-Maintenance-Manual_v2_2016.pdf |
| 5 | Green City, Clean Waters Plan | 2009 | https://www.phila.gov/media/20160421133948/green-city-clean-waters.pdf |
| 6 | Green City, Clean Waters Partnership Agreement | 2012 | https://water.phila.gov/wp-content/uploads/files/EPA_Partnership_Agreement.pdf |
Knowledge Augmentation for Language Models
Knowledge augmentation for language models adds external or newly learned information to improve factuality, reasoning, and domain performance.
See all 178 papers