Inspiration
Ho Chi Minh City (HCMC) is expanding at a breathtaking pace, yet its urban infrastructure projects are consistently plagued by a silent bottleneck: volatile construction cost estimation.
Living and working within this rapidly developing landscape, we witnessed how minor fluctuations in local material supply chains, intricate regulatory adjustments across dynamic districts, and sudden geospatial challenges could stall vital civil projects for months—or even years. Traditional estimation methods rely on manual spreadsheets, fragmented municipal databases, and outdated pricing indexes. We asked ourselves: Can we build an autonomous system that absorbs this real-world noise, isolates what truly matters, and delivers precise, rapid engineering forecasts? This friction inspired CivisEstimate—an AI-driven initiative to transform manual city planning into an agile, agentic workflow.
What it does
CivisEstimate is an intelligent agentic platform that automates high-precision urban infrastructure construction cost forecasting specifically calibrated for HCMC’s ecosystem.
Instead of forcing engineers to manually comb through hundreds of pages of municipal guidelines and volatile market rates, CivisEstimate deploys an autonomous multi-agent system. The platform digests raw data streams—ranging from regional concrete and steel pricing to complex local zoning laws—and isolates goal-relevant parameters. It then shifts focus dynamically to calculate comprehensive budget projections, evaluate structural risk factors, and instantly synthesize audit-ready Business Requirements Documents (BRDs) and precise engineering cost breakdowns.
How we built it
The entire architecture of CivisEstimate was built around a highly responsive, secure, and interoperable data-to-agent pipeline leveraging Google Cloud and MongoDB Atlas:The Backend Environment: Developed natively inside GitHub Codespaces using a Python and Node.js foundation, managing dynamic dependency trees cleanly via automated environmental configurations.Data Architecture: We utilized MongoDB Atlas along with its Data Federation engine to securely bridge separate data streams (historical cost sheets and geographic asset logs) without exposing critical operational vectors.Agentic Orchestration: Powered by Google Cloud's Vertex AI and the latest Gemini models on Google AI Studio. We activated strict System Instructions and Code Execution sandboxes to turn the LLM into a reasoning engine capable of dynamic function-calling.Mathematical Modeling: The cost aggregation agent operates on localized cost estimation algorithms. The overall estimated infrastructure budget ($E_{total}$) is dynamically calculated using a weighted parameter distribution:$$E_{total} = \sum_{i=1}^{n} (Q_i \times P_i) \times (1 + \alpha_{district}) + \delta_{risk}$$Where:$Q_i$ represents the raw quantity of material or labor unit $i$.$P_i$ represents the real-time indexed market price pulled dynamically via our database driver.$\alpha_{district}$ is the specific regulatory/zoning friction coefficient of the chosen HCMC district.$\delta_{risk}$ represents an unpredictable environmental or geospatial risk variance dynamically determined by Gemini's analysis of historical anomalies.
Challenges we ran into
Building an agentic application for real-world municipal datasets brought complex engineering hurdles:
Context Distraction & Noise: Standard LLMs easily lost focus when fed massive, chaotic data payloads filled with conflicting district regulations. We encountered heavy attention degradation where models got sidetracked by irrelevant conversational fluff inside the prompts. We solved this by implementing a rigid Multi-Stage Strategic Prompt System that forced the model to execute separate, isolated sub-tasks with strict markdown boundaries.
Database Connection Exceptions: Early prototyping in online AI environments threw cryptic UNKNOWN: An unhandled driver exception occurred messages when connecting to our federated database. We resolved this by explicitly configuring our MongoDB URI strings to utilize proper administrative authentication overrides (SCRAM-SHA-1) and opening up safe network access pathways for Google's dynamic cloud endpoints.
UI Sync Desynchronization: During intensive hackathon sprints, the built-in file synchronization tool between our workspace and our GitHub repository regularly hit "Failed to load file differences" errors due to cached tracking layers. We bypassed this bottleneck entirely by writing automated terminal synchronization shell scripts within our Codespace.
Accomplishments that we're proud of
Flawless Tool-Use Execution: We successfully implemented native function-calling where the Gemini model accurately triggers Python code to fetch live data from our MongoDB endpoints without exposing credentials.
High Attention Resiliency: Our final system successfully passed rigorous stress tests—ignoring aggressive prompt injections (like instructions hidden in text trying to hijack the task) to maintain absolute focus on generating the core budget estimate.
Localized Alignment: We built a configuration layout tailored to the actual physical and economic constraints of Ho Chi Minh City's evolving districts.
What we learned
This hackathon redefined how we view cognitive artificial intelligence. We learned that engineering for the Attention Track isn't just about feeding an LLM more context; it is about setting explicit boundaries and meta-cognitive filters. We learned how to handle complex cloud data pipelines securely, why environment variables must always remain absolute ground truth over application logic, and how to effectively transition cloud-based prototypes into automated development containers.
What's next for CivisEstimate Urban Infrastructure Construction Estimate
CivisEstimate is just scratching the surface of agent-driven civil engineering. Next, we aim to expand our backend into a fully browser-integrated IDE framework, enabling urban planners to map out infrastructure pipelines visually. We plan to integrate broader standardized formats to allow our agents to seamlessly hook into deeper global municipal schemas. Ultimately, our goal is to take CivisEstimate from a hackathon prototype and scale it into an active tool that powers smarter, predictable, and transparent development across Ho Chi Minh City.
Log in or sign up for Devpost to join the conversation.