Source-linked AI summary
Edge-Based Agentic Retrieval-Augmented Generation for Autonomous FHWA Bridge Inspection Compliance
Viraj Nishesh Darji, Hemaliben Rakeshkumar Darji
TL;DR
Bridge inspection compliance is labor-intensive and difficult to perform where connectivity is unavailable. BridgeGuard addresses this gap with an air-gapped agentic RAG system combining local regulatory retrieval, NBI queries, and multi-step planning. It achieves 99.77% accuracy on Delaware and 100.0% on a Texas sample, while ablations support the necessity of vector search and multi-step reasoning.
Problem
Bridge inspection records require labor-intensive verification against FHWA definitions, while cloud-connected systems cannot operate in air-gapped environments.
Method
BridgeGuard combines section-aware regulatory retrieval, structured NBI queries, and a stateful agentic loop in an air-gapped edge system.
Results
99.77% classification accuracy is achieved on the full Delaware inventory and 100.0% on the Texas sample for Structurally Deficient bridge classification.
Takeaways & Limitations
Ablations report that removing vector search reduces F1 to 0.000, supporting the necessity of both vector search and the multi-step agentic loop.
Takeaways & Limitations
Validation covers the Delaware inventory and a 200-bridge Texas sample, so all-50-state validation remains outstanding.
Abstract
from arXiv · showhide
The Federal Highway Administration (FHWA) mandates that over 600,000 bridges in the United States be evaluated against the Recording and Coding Guide for the National Bridge Inventory (NBI). Manual compliance verification is labor-intensive, error-prone, and impractical in connectivity-limited field environments. This paper introduces BridgeGuard, a fully air-gapped agentic Retrieval-Augmented Generation (RAG) system for autonomous bridge inspection compliance. BridgeGuard integrates vector search over the FHWA Recording and Coding Guide with structured SQL queries against NBI tabular data, orchestrated by a stateful multi-step ReAct planning loop executing locally on commodity edge hardware. A section-aware chunking algorithm preserves hierarchical regulatory item boundaries, achieving 94.2% chunk integrity compared with 28.4% for naive fixed-size splitting. Evaluated on the full Delaware 2023 NBI inventory (874 bridges) and a Texas sample (200 bridges), the system achieves 99.77% and 100.0% classification accuracy, respectively, for Structurally Deficient bridge identification, with 100.0% citation accuracy, at 197.0 bridges per hour with out external network access. Ablation experiments confirm that both vector search and the multi-step agentic loop are necessary for correct compliance reasoning.
PRACTICAL APPLICATIONS
BridgeGuard targets labor-intensive bridge-record verification by combining offline regulatory search, NBI database queries, and agentic compliance reasoning. Evaluations report high classification accuracy, precise citations, and rapid edge execution for remote or connectivity-limited deployments.
- PRACTICAL APPLICATIONS: BridgeGuard is an automated offline assistant that helps inspectors verify bridge records against federal safety requirements.It combines local vector search over the FHWA guide with structured SQL queries against NBI data in a stateful multi-step loop.
- PRACTICAL APPLICATIONS: Manual verification requires cross-referencing inspection databases with complex federal definitions, making it slow and susceptible to human error.The process involves relational databases or spreadsheets and the FHWA Recording and Coding Guide.
- PRACTICAL APPLICATIONS: Air-gapped deployment addresses field connectivity constraints and protects sensitive infrastructure data from commercial cloud exposure.The paper identifies rural, sub-deck, and secure military inspection sites as environments where internet access may be unavailable.
- PRACTICAL APPLICATIONS: 99.77% classification accuracy is achieved on Delaware and 100.0% on Texas for the evaluated bridge records.The system processed 197.0 structures per hour on standard edge hardware and maintained high citation precision.
- PRACTICAL APPLICATIONS: 197.0 structures per hour reduces manual database cross-referencing to approximately 20 seconds per bridge.The paper contrasts this with estimated hours of manual work per review cycle and reports precise regulatory citations for flagged deficiencies.
RELATED WORK
Prior RAG systems commonly use single-shot retrieval, while multi-step ReAct systems alternate reasoning, actions, and observations to support more complex queries. BridgeGuard applies this agentic pattern to local database and vector-index retrieval.
- RELATED WORK: Standard RAG embeds a query, retrieves relevant documents, and generates a response in one step.The related-work passages present this as the conventional single-shot setup.
- RELATED WORK: Multi-step reasoning uses ReAct to alternate model Thought, Action, and Observation steps.Actions can include calling an API or executing a search.
- RELATED WORK: BridgeGuard’s agentic loop incrementally queries relational databases and vector indexes while adapting its plan to intermediate results.This extends retrieval beyond a single search-and-response step.
NLP for Regulatory Compliance in Civil Engineering
Civil-engineering compliance research has progressed from manually engineered rule and ontology systems toward NLP and RAG methods for interpreting regulatory text. However, existing LLM-based systems typically depend on cloud APIs, motivating BridgeGuard’s offline edge focus.
- NLP for Regulatory Compliance in Civil Engineering: Rule-based systems were accurate for explicitly codified rules but required manual conversion of natural-language regulations into machine logic.Prior systems also proved fragile when standards changed or varied across jurisdictions.
- NLP for Regulatory Compliance in Civil Engineering: Early civil-engineering compliance systems used rule-based information extraction, ontologies, knowledge graphs, and LegalRuleML to encode regulations.These approaches mapped regulatory requirements into machine-readable formats but required substantial feature engineering.
- NLP for Regulatory Compliance in Civil Engineering: Instruction-tuned LLMs and RAG systems can interpret nested regulatory clauses and retrieve context-relevant code sections before generating assessments.These systems combine neural semantic understanding with traceable references.
- NLP for Regulatory Compliance in Civil Engineering: Existing LLM-based AEC systems typically rely on commercial cloud APIs, limiting deployment in air-gapped or data-sensitive environments.The paper positions offline edge deployment as a constraint not addressed by prior work in this domain.
Bridge Inspection Data Analysis
Bridge inspection compliance research combines regulatory interpretation with bridge-record analysis, addressing the gap between predictive structural assessment and citation-based compliance explanation. BridgeGuard applies FHWA coding rules to identify structural and operational conditions.
- Predictive NBI research captures deterioration and sufficiency patterns but does not cite the regulatory item definitions determining non-compliance.
- BridgeGuard combines tabular SQL lookups with semantic searches over the Recording and Coding Guide to generate traceable compliance reports.
- The FHWA Recording and Coding Guide structures bridge parameters as distinct Items and evaluates condition assessment items on a 0–9 integer scale.
- Codes 7–9 indicate good to excellent condition, codes 5–6 fair condition, codes 3–4 poor or serious condition, and codes 0–2 critical to failed condition.
- Structurally Deficient classification occurs when any key structural component, including Items 58, 59, 60, or 62, has a condition rating of ≤4.
- Additional compliance checks address scour vulnerability through NBI Item 113 and load-posting status through NBI Item 70.
METHODOLOGY
BridgeGuard’s methodology preserves FHWA regulatory hierarchy during retrieval and executes the system locally on edge hardware. Its parser separates item descriptions from rating scales while retaining parent context for language-model reasoning.
- All embedding, vector-distance, and LLM generation tasks execute locally on edge hardware without external network access.
- A custom parser structures the hierarchically organized FHWA guide as a tree instead of relying on fixed-size or recursive character splitting.
- Naive fixed-size and recursive splitting can separate item numbers, condition scales, and tabular definitions across chunk boundaries.
- Hierarchical parent-child chunking creates granular code-description or rating-scale child chunks while retaining the full item text in a parent chunk.
- Vector similarity search runs over child chunks, then returns the parent chunk to the LLM context window for the complete regulatory definition.
- Cosine distance is computed over 768-dimensional Nomic embeddings, with the chunking procedure specified in Algorithm 1.
Stateful Agentic Graph
The stateful agentic graph coordinates database queries, regulatory retrieval, compliance flagging, and report generation in an iterative loop. It continues until compliance checks are resolved and then returns a final report.
- A ReAct agent implemented with LangGraph maintains state containing message history, agent thoughts, tool executions, and observations.
- The agent can select either a tool call or a final summary response as its next action.
- Four exposed tools support read-only NBI SQL queries, coding-guide vector search, compliance-flag insertion, and structured report generation.
- Compliance flags record the bridge ID, rule name, violated NBI items, and textual reasoning.
- The agent loops through data queries and regulatory searches until all compliance checks are resolved, then flags violations and returns its final report.
EXPERIMENTAL SETUP
The evaluation uses official 2023 NBI data from Delaware and Texas, retrieval questions tied to NBI items, and classification, citation, and edge-execution metrics. Section-aware and hierarchical retrieval outperform naive baselines on item-level retrieval.
- Dataset and metrics: The experiments use the official 2023 NBI datasets, with Delaware as the primary evaluation set and Texas for cross-state generalization.
- Dataset and metrics: Delaware includes 874 bridges, while the Texas evaluation samples 200 bridges evenly across Structurally Deficient and compliant classes.
- Dataset and metrics: Ground-truth labels come from standard NBI definition formulas for Delaware and pre-computed InfoBridge fields for Texas.
- Dataset and metrics: The benchmark contains 20 questions mapped to representative NBI items and condition ratings, with retrieval assessed using Precision@k and nDCG@k.
- Dataset and metrics: Classification uses accuracy, precision, recall, and F1-score, while citation accuracy measures correct NBI Item citations and edge metrics include throughput.
- Retrieval results: P@5 = R@5 = nDCG@5 = 0.000 for naive and recursive baselines, whereas section-aware and hierarchical chunking achieve 94.2% and 91.4% chunk integrity.
- Retrieval results: Hierarchical parent-child chunking achieves Precision@5 = 0.404, while section-aware chunking achieves Recall@5 = 0.575.
End-to-End Compliance Accuracy (RQ2)
BridgeGuard achieved near-perfect Structurally Deficient classification across Delaware and Texas, with accurate regulatory citations and execution on low-power edge hardware.
- 99.77% classification accuracy was achieved on Delaware’s full 874-bridge inventory, while Texas reached 100.0% across its 200-bridge sample.
- 481 of 483 Delaware Structurally Deficient bridges were flagged, while all 391 compliant structures were correctly verified.
- 99.79% of flagged Delaware violations and 100.0% of Texas violations cited the relevant FHWA Recording and Coding Guide sections.
- 0.9977 ± 0.0028 mean accuracy and 0.9980 ± 0.0025 mean F1-score across five Delaware folds indicated stable performance.
- McNemar’s test found no significant classification difference from the deterministic baseline, while BridgeGuard added reasoning traces and regulatory citations.
- 197.0 bridges/h throughput was achieved with 18.27 s per bridge, 120.25 MB peak memory, and 16 GB RAM edge hardware.
Ablation Study (RQ4)
Ablation results show that BridgeGuard’s vector retrieval and multi-step reasoning loop are both required for reliable compliance classification and citation behavior.
- 100.0% accuracy was matched only by the full agentic RAG configuration combining vector search with a stateful ReAct loop.
- The ablation used a 200-bridge Delaware sample preserving natural prevalence, with approximately 55% Structurally Deficient bridges.
- F1 = 0.000 without vector search, because the system lacked access to Recording and Coding Guide definitions and flagged no Structurally Deficient bridges.
- F1 = 0.371 for single-shot RAG without the multi-step loop, as the model failed to complete multi-step numerical comparisons in one pass.
- The reasoning trace sequentially queries NBI records, retrieves rating definitions, compares values, and registers cited violations.
LIMITATIONS AND FUTURE WORK
The study reports strong results but identifies limitations in validation independence, regulatory-version coverage, and geographic generalization, motivating broader expert-validated testing.
- Validation dataset and ground truth: Delaware labels were computed from the same deterministic formulas as the rule-based baseline, creating circular validation risk.
- Geographic scope: Validation covered Delaware’s 874 bridges and a Texas sample of 200, but testing across all 50 states remains necessary.
- Geographic scope: Broader generalization claims require more diverse geographic regions and multi-state full-inventory evaluation for scaling and throughput.
- Validation dataset and ground truth: Texas labels came from official pre-computed InfoBridge fields, providing an independent baseline; future work will add certified engineer annotations.
- Regulatory standard transition: The current agent relies on the legacy FHWA Recording and Coding Guide while the standard transitions to SNBI.
- Future work: Future work will support both specification versions and expand validation with independent expert annotations.
DATA AVAILABILITY STATEMENT
The paper identifies public sources for the Delaware NBI dataset and FHWA guide, provides implementation code, and lists additional symbol definitions and artifact access information.
- The Delaware 2023 NBI dataset is publicly available from FHWA.
- The FHWA Recording and Coding Guide is available through FHWA’s published document link.
- Implementation code supporting the findings is available in the BridgeGuard GitHub repository.
- Additional data, models, or experimental artifacts are available from the corresponding author.
- The paper defines symbols including cosine distance, load-posting and Structurally Deficient indicators, and recall at rank k.