DEV Community

Cover image for Why Google Maps Won't Let Gemini Take the Wheel
Nastaran Moghadasi
Nastaran Moghadasi

Posted on • Originally published at blog.nastaran.ai

Why Google Maps Won't Let Gemini Take the Wheel

A few weeks ago, I watched someone try to hammer a screw into a wall! They succeeded, eventually. But the result was ugly, unstable, and took three times longer than it should have. This is roughly what happens when organizations deploy generative AI for problems that don’t need it.

The current discourse around AI has a selection bias problem. We hear constantly about what generative models can do, but we rarely hear about when they shouldn’t be used. This matters because choosing the wrong model architecture isn’t just inefficient. It can be dangerous.

Let me explain through a product you probably use every day.

The Navigation Problem

Consider GPS navigation apps like Google Maps or Waze. These systems solve several distinct problems: classifying traffic patterns, recognizing road signs from imagery, predicting travel times, and computing optimal routes.

Here is a question worth asking. Which of these tasks actually benefits from a generative model?

To answer this, we need to be precise about what generative and discriminative actually mean.

A discriminative model learns the boundary between categories. Given input x, it models P(y∣x) directly, the probability of output y conditioned on input. It asks: given this road segment and current traffic, is the delay 5 minutes or 20 minutes?

A generative model learns the joint distribution P(x,y) or, in the case of modern large language models, models the probability of the next token given the context. It can generate new samples that resemble the training distribution. It asks: what would a plausible route description look like?

P(xt+1x1,...,xt)P(x_{t+1} | x_1, ..., x_t)

The distinction matters. These models have fundamentally different failure modes.

Why Discriminative Models Win for Pathfinding

When you ask Google Maps for directions to the airport, the blue line on your screen is computed by algorithms that have nothing to do with generative AI. The underlying computation is typically some variant of A* search or Dijkstra’s algorithm. It is potentially augmented by graph neural networks for traffic prediction.

This is precisely the kind of problem where we don’t want creativity. We want the global optimum.

This is the correct architectural choice, and here is why.

Ground truth constraints are non-negotiable. When you are driving at 100 km/h, you need the system to discriminate between a drivable road and a pedestrian path. The model must be bound by the physical reality of the road network. A generative model might produce a “plausible-looking” route that happens to include a road segment that was closed for construction because it fits the statistical pattern of routes it has seen, not because it is actually traversable.

The problem has a well-defined optimum. Route planning is a graph optimization problem. Given edge weights (travel times, distances, fuel costs), we want the path that minimizes total cost. This is precisely the kind of problem where we don’t want creativity. We want the global optimum. We have principled algorithms that can find it efficiently.

Reliability dominates over delight. Generative AI excels when surprising outputs are valuable. In creative writing, an unexpected metaphor might be brilliant. In navigation, an unexpected route means you are lost in an unfamiliar neighborhood or late for your flight.

Imagine a generative navigation system. You ask for directions to the airport, and it suggests a route through what it imagines would be a scenic park road. It does this because in its training data, parks and pleasant drives co-occur frequently. The fact that this particular park has no through-road is lost in the statistical averaging.

The model has optimized for plausibility, not correctness.

Wait, Didn’t Google Just Add Gemini to Maps?

Yes. And this is exactly where the nuance lives.

In late 2024, Google integrated Gemini into Google Maps. The key question is: what is Gemini actually doing?

The answer reveals how thoughtful architecture works in practice.

What Gemini Does

Gemini powers the natural language interface and contextual descriptions. When the app tells you “turn right after the blue Thai restaurant,” that instruction was generated by a multimodal model. It analyzed Street View imagery and synthesized a human-friendly landmark description.

An Abstraction, showing generative and discriminative models converge

This is genuinely generative work. It involves creating natural language from raw data (GPS coordinates, business names, visual features). The model is generating descriptions that don’t exist in any database. It is reasoning about what would be most salient to a human driver scanning the street.

Gemini also powers semantic search. When you type “cozy cafe with parking near me,” you are querying with natural language that needs to be interpreted, not just matched against keywords. This is where the world knowledge of a generative model becomes valuable.

Crucially, this generation is securely tethered to reality through a process called grounding. As the specific documentation for Grounding with Google Maps explains, when a user’s query contains geographical context, the Gemini model invokes the Maps API as a source of truth. The model then generates responses grounded in actual Google Maps data relevant to the location, rather than relying solely on its training weights.

What Gemini Doesn’t Do

Gemini does not compute your route.

The actual pathfinding (the blue line, the ETA, the turn-by-turn sequence) is still handled by optimization algorithms and graph neural networks. These systems take the road network as a constraint rather than a suggestion. They find the minimum-cost path through a graph, with edge weights updated by discriminative models that predict traffic delays.

The architecture looks something like this:

Decision Matrix showing which area in the Google Map handles with Generative, and which part handles using Discriminative models

This is a hybrid architecture. It is hybrid for a reason.

The Safety Principle

Here is the key insight:

Google uses Gemini for the description but not for the direction.

If Gemini were allowed to be creative with actual routing decisions, it might hallucinate that a pedestrian bridge is a valid vehicle crossing. Visually, bridges that cars use and bridges that only pedestrians use look similar. The model has learned associations, not physical constraints.

By constraining generative models to the interface layer (natural language input/output, landmark descriptions, semantic search) while keeping pathfinding in the realm of constrained optimization, the system gets the benefits of both paradigms.

  • The generative model makes the experience feel natural and human.
  • The discriminative and optimization models keep you on actual roads.

This isn’t a limitation of generative AI. It is appropriate scoping.

The Broader Principle

Navigation is just one example. The same logic applies across domains.

Medical diagnosis: You probably want a discriminative model that estimates rather than a generative model that produces plausible-sounding diagnoses. The latter might generate confident text about a condition the patient doesn’t have.

Fraud detection: The goal is to discriminate between legitimate and fraudulent transactions. A generative model might be useful for creating synthetic training data, but the production classifier should be discriminative.

Structural engineering: When computing whether a bridge can support a given load, you want physics simulations and finite element analysis. You do not want a model that generates realistic-looking stress distributions.

The pattern is clear. When the problem has a ground truth that must be respected, when there is a well-defined optimum, and when creative outputs would be failures rather than features, discriminative models and traditional optimization often outperform generative approaches.

When Generative AI Is the Right Choice

To be clear, generative AI is genuinely transformative for many problems.

  • Open-ended content creation: writing, art, music, code generation.
  • Natural language interfaces: making complex systems accessible through conversation.
  • Semantic understanding: interpreting intent, summarizing documents, answering questions.
  • Synthetic data generation: creating training examples for rare cases.
  • Exploration and ideation: when you want novelty and surprise.

The question isn’t whether generative AI is powerful. It demonstrably is. The question is whether it is appropriate for the specific problem you are solving.

The Meta-Point

We are in a moment where generative AI is being treated as a universal solution. The commercial pressure to add AI to every product is immense. But good engineering has always been about choosing the right tool for the job.

The most sophisticated AI systems today are hybrids. They use generative models where creativity and natural language matter, discriminative models where classification accuracy matters, and traditional algorithms where mathematical guarantees matter. The skill is in knowing which is which.

The next time someone proposes adding a large language model to a system, it is worth asking: what problem are we actually solving, and is a generative model the right tool for it?

Sometimes the answer is yes. And sometimes, you just need a good classifier and a well-tuned Dijkstra implementation.

References

Derrow-Pinion, A., She, J., Wong, D., Lange, O., Hester, T., Perez, L., Nunkesser, M., Lee, S., Guo, X., Wiltshire, B., Battaglia, P. W., Gupta, V., Li, A., Xu, Z., Sanchez-Gonzalez, A., and Li, Y. 2021. ETA Prediction with Graph Neural Networks in Google Maps. arXiv preprint arXiv:2108.11482. https://arxiv.org/abs/2108.11482

Dijkstra, E. W. 1959. A Note on Two Problems in Connexion with Graphs. Numerische Mathematik, 1(1), 269–271. https://eudml.org/doc/131436

Google. 2024. Grounding with Google Maps. Google AI for Developers. https://ai.google.dev/gemini-api/docs/maps-grounding

Google. 2024. New ways to get around with Google Maps, powered by AI. The Keyword (Google Blog). https://blog.google/products/maps/gemini-navigation-features-landmark-lens/

Hart, P. E., Nilsson, N. J., and Raphael, B. 1968. A Formal Basis for the Heuristic Determination of Minimum Cost Paths. IEEE Transactions on Systems Science and Cybernetics, 4(2), 100–107. https://ieeexplore.ieee.org/document/4082128

Ng, A. Y. and Jordan, M. I. 2002. On Discriminative vs. Generative Classifiers: A comparison of logistic regression and naive Bayes. Advances in Neural Information Processing Systems 14. https://papers.nips.cc/paper/2001/hash/7b7a53e239400a13bd6be6c91c4f6c4e-Abstract.html

Top comments (0)