← Back to list

Building an AI That Knows When You Should Leave

Most navigation apps answer a simple question:

Gopika B · 2026-06-27 14:30 · 0 claps · 2.0 min read
#building-in-public #apps #commute #traffic-management #software-development
Open on Medium ↗
Wiki topics: BIZ · Business Strategy

Building an AI That Knows When You Should Leave

Most navigation apps answer a simple question:

“How do I get there?”

I wanted to answer a different one:

“When should I leave?”

That single question turned out to be much more interesting than I expected.

When you think about your daily commute, there are countless factors that influence travel time. It’s not just traffic. A sudden downpour, a concert, a cricket match, road construction, or even a public holiday can completely change your ETA. Predicting the best departure time is less about finding a route and more about understanding a constantly changing environment.

That idea became CommuteAI.

The more I worked on it, the more I realized this wasn’t just another full-stack application. It became an opportunity to explore how multiple AI and software engineering concepts fit together to solve a real-world problem.

I started by building the application architecture using React, FastAPI, PostgreSQL, and Docker, integrating Google Maps APIs to retrieve routes, distances, and traffic information. Then came the machine learning component to predict commute durations based on historical traffic trends and contextual features.

But I wanted the application to do more than make predictions.

If CommuteAI recommends leaving at 8:05 AM, I don’t want users wondering “Why?” I want the system to explain itself.

That’s where Retrieval-Augmented Generation (RAG) became the most exciting part of the project.

Instead of relying only on an LLM’s general knowledge, the assistant retrieves relevant information from a knowledge base containing traffic advisories, weather alerts, road closures, public events, and other contextual data before generating a response.

So instead of simply saying:

“Leave at 8:05 AM.”

It can explain:

“Traffic is expected to increase due to ongoing construction near Outer Ring Road and a technology conference in Whitefield. Leaving 20 minutes earlier is likely to reduce your travel time.”

Building this has given me a much deeper appreciation for how modern AI systems are designed. It’s not just about prompting an LLM anymore. It’s about combining APIs, databases, vector search, retrieval pipelines, machine learning models, and thoughtful system design to create something genuinely useful.

There have definitely been challenges along the way — setting up Docker containers, configuring PostgreSQL with pgvector, wiring together the backend services, and debugging the AI pipeline — but each problem solved has made the project stronger.

There’s still more to build, including refining the AI Copilot, completing the RAG pipeline, and deploying the application for end-to-end testing.

I’m excited to keep pushing it forward and see where it goes.

Sometimes the best projects start with a simple everyday question.

“What time should I leave?”

Turns out, the answer involves a lot more AI than I ever imagined.

https://github.com/hyuksinja/commuteai here is the git repo of what i was able to achive so far 🐣


메타데이터
post_id
fbf8d828450b
slug
building-an-ai-that-knows-when-you-should-leave-fbf8d828450b
url
https://medium.com/@b.gopika270/building-an-ai-that-knows-when-you-should-leave-fbf8d828450b
canonical_url
https://medium.com/@b.gopika270/building-an-ai-that-knows-when-you-should-leave-fbf8d828450b
author_url
https://medium.com/@b.gopika270
status
ok
fetched_at
2026-07-13 06:23:13