Inspiration

Every year, India's construction sector loses over ₹1.5 lakh crore to material wastage and project delays. Statistics from the Ministry of Statistics and Programme Implementation (MOSPI) reveal that a staggering 77% of Indian infrastructure projects suffer from major delays, with an average timeline overrun of 20 months.

Generic project management and supply chain tools fail in India because they do not account for the country's unique logistical challenges: The Monsoon Factor: Heavy rains disrupt logistics and degrade raw materials like cement and sand for 4 months of the year. Festival Closures: Major festivals (Diwali, Pongal, Chhath Puja) completely shut down manufacturing and transport networks for weeks. Regulatory Shocks: Unpredictable regional sand mining bans and truck strikes halt supply lines overnight.

We were inspired to build NirmanAI—an intelligent, India-first supply chain copilot designed to predict delivery risks, estimate real material consumption, and optimize procurement.

What it does

NirmanAI is an API-first platform featuring three core modules integrated into a single Streamlit dashboard:

  1. Delay Predictor: Forecasts whether a delivery will be late, by how many days, and flags the specific risk factors (e.g., monsoon intensity, supplier history, route distance).
  2. Wastage Estimator: Estimates actual material consumption at the project level, helping contractors avoid over-ordering and predict cost overruns before they occur.
  3. Smart Procurement Planner: Automatically maps out a week-by-week ordering schedule that guides General Contractors on when to order specific materials to minimize holding costs while avoiding idle labor.

How we built it

NirmanAI is built entirely in Python, utilizing an end-to-end data science pipeline:

  • Data Layer: We engineered a synthetic dataset of 8,000 records calibrated against real-world Indian construction benchmarks (CIDC and McKinsey report data).
  • Machine Learning:
    • We trained an ensemble of XGBoost (for delay classification) and LightGBM (for delay magnitude regression).
    • We utilized LightGBM Quantile Regressors (10th, 50th, and 90th percentiles) to forecast material wastage percentages and establish confidence boundaries.
  • Explainable AI (XAI): We integrated SHAP (SHapley Additive exPlanations) to interpret model outputs, translating mathematical features into human-readable risk factors for site managers.
  • Visualizations: The dashboard UI was built using Streamlit and interactive Plotly charts for real-time risk tracking.

Incorporating AI Safety & Calibrated Uncertainty

In high-stakes industries like construction, overconfident machine learning predictions can cost millions. To address this, we integrated Conformal Prediction to calculate mathematically guaranteed prediction intervals.

Instead of presenting a risky point estimate \( \hat{y} \), NirmanAI computes a calibrated interval: $$ \mathcal{C}(X_{n+1}) = [\hat{Y}{n+1} - \hat{q}, \hat{Y}{n+1} + \hat{q}] $$

where \( \hat{q} \) is the conformal quantile calibrated at a significance level of \( \alpha = 0.20 \). This guarantees that the true delivery date lies within our predicted range at least 80% of the time: $$ P(Y_{n+1} \in \mathcal{C}(X_{n+1})) \ge 1 - \alpha $$

This ensures that site managers receive honest, reliable uncertainty bounds.

Challenges we faced

Throughout the development cycle, we overcame several technical hurdles:

  1. Windows Unicode Console Crashes: Modern terminal UI symbols (like ✓, ₹, ⚠, →) crashed the Python console during model training setup due to default cp1252 encoding. We resolved this by forcing Python to execute in UTF-8 mode using PYTHONUTF8=1 environment variables.
  2. Plotly Categorical Axis Bugs: We encountered a Plotly bug when adding timeline markers (add_vline) to a categorical X-axis containing month names. We bypassed this by manually building lines using absolute coordinate shapes and annotations.
  3. Streamlit Cache Isolation: We resolved a state issue where ML models cached via @st.cache_resource could not propagate to module scope global variables, refactoring the system to return models as unpacked functional tuples.

What we learned

We learned how crucial domain-specific parameters are when designing predictive models. A model is only as good as its features; incorporating India-specific constraints like monsoon calendars, state-level logistics indices, and contractor experience years drastically improved model accuracy and relevance compared to generic baseline models. We also realized that explainability is key—site managers don't just want to know if a shipment will be late, they need to know why so they can take preventative action.

Built With

Share this project:

Updates

Submission history