Inspiration

Indian Railways operates 68,000 km of track. Maintenance decisions still rely on inspectors manually cross-referencing TRC printouts against printed tables in the Permanent Way Manual. We wanted to automate that chain — sensor readings in, action card with cited rule out.

What it does

Classifies track defect type from 38 sensor features, retrieves the exact PWM/SoD maintenance rule via FAISS vector search, and generates a structured action card using Sarvam-1 with officer designation, deadline, and speed restriction. Every inference is logged to Delta Lake and shown on a live Flask dashboard sorted by deterioration severity.

How we built it

Synthetic track geometry data generated using the IRPWM 2020 TQI formula. sklearn Random Forest trained on Delta Lake tables via PySpark. RAG pipeline over PWM and SoD PDFs using MiniLM embeddings and FAISS IndexFlatIP. Sarvam-1 for JSON action card generation. MLflow tracking throughout. All on Databricks Free Edition serverless.

Challenges we ran into

Databricks serverless enforces a 256MB model cache limit that fires during pipeline.fit() — not at serialisation — so Spark MLlib GBT was unusable. We kept Delta as the data layer and switched the training step to sklearn. FAISS index gets wiped on session restart since /tmp/ is ephemeral — solved by logging it as an MLflow artifact and recovering via download_artifacts.

Accomplishments that we're proud of

The RAG output is verifiable — we can show a judge the exact PWM paragraph retrieved and confirm the system cited it correctly. The deterministic rule engine runs before the LLM so hard operational rules (tamping intervals, TGI thresholds, thermal patrol triggers) are always reflected in the output even if the LLM phrases things differently.

What we learned

Delta Lake as a pipeline backbone rather than just a storage layer — every stage reads from and writes to Delta, giving us full lineage. MLflow artifact logging for non-model files. How the IRPWM TQI formula actually works and why the NBML thresholds matter for maintenance scheduling.

What's next for Team TVK - Rail Drishti

Connect to real TRC output instead of synthetic data. Add Databricks Vector Search to replace FAISS for a fully managed, session-restart-safe index. Extend to multi-segment route-level risk views. Push work orders directly to the divisional engineer's system on confirmation.

Built With

Share this project:

Updates