AirPilot: Your Wings, Our Watch Why I Built It Airplane crashes haunt us all—a shadow that lingers during every flight. The Ahmedabad tragedy on June 12, 2025, where a Boeing 787 plummeted into a hostel, killing 279, hit me hard. It wasn’t just news; it was a wake-up call. With 80% of crashes tied to human error, I asked: What if we could catch those mistakes before they spiral?
What’s AirPilot? AirPilot is your AI co-pilot, always alert. It scans live flight data—altitude, speed, warnings—and matches it to past crashes using MongoDB’s vector search. Powered by LangChain, it whispers clear, lifesaving advice: “Climb 500 ft,” “Throttle up to 70%,” or “Abort takeoff.” It’s a guardian for pilots, keeping skies safe.
Tools I Used Backend: FastAPI, LangChain, Google Vertex AI Database: MongoDB Atlas on Google Cloud Frontend: React, ElevenLabs, WebSpeech Hosting: Render AI: Lang chain with Google Gemma, Hugging Face Sentence Transformer
How I Built It Demo Flights: I crafted six crash scenarios—Korean Air 801, Asiana 214, Air France 447, Colgan 3407, Turkish 1951, Tenerife KLM 4805—as JSONs, pinning their fatal moments (e.g., Colgan’s 131-knot stall). MongoDB Setup: Loaded JSONs into MongoDB Atlas using pymongo, ready for vector search. Vector Embeddings: Used Vertex AI to turn telemetry (altitude, speed, warnings) into 768D vectors, stored in MongoDB. LangChain Magic: Built three chains—emergency advice, risk explanation, turbulence chat—tuned for precise, TCAS-compliant responses. Testing: Simulated flights via FastAPI, testing advice against real-world standards, Included test.py files for each simulated flights to test different scenarios Frontend Flair: Inspired by X-Plane dashboards, I used React or a clean UI, and also, OpenSKY api for live flight data
Challenges Query Routing: Pilot queries were messy. I built a LangChain router to direct them to the right chain. Hallucinations: AI invented crash details. Fixed it by grounding prompts with specific JSON data. Vector Search: MongoDB embeddings misfired until I standardized dimensions and tested small-scale.
What I Learned Data Drives Trust: Clean, structured JSONs kill AI drift. Modularity Wins: Separate chains and endpoints make scaling easy. Pilots Need Clarity: Simple, urgent advice builds confidence.
Improvements More Simulations: Add 50+ crashes and edge cases via Monte Carlo methods. Live Weather: Stream METAR data for better turbulence advice. System Health: Track hydraulic pressure, fuel flow to catch mechanical failures. Collision Detection: Add nearby_aircraft data for TCAS-like alerts.
What’s Next? Public demo with pilot feedback. Integration with flight sims like Microsoft Flight Simulator. AR cockpit alerts for real-time guidance. Certification for commercial cockpits.
Tech Stack Frontend: React JS, Elevenlabs and Webspeech for TTS Backend: FastAPI, LangChain Database: MongoDB Atlas AI: Google Vertex AI, Google Gemma via Ollama
What if the next crash never happens? That’s AirPilot’s promise. — Miraj Prasain
Log in or sign up for Devpost to join the conversation.