Anybody who’s ever shared an Uber with a drunken stranger knows that it can be a loud, tiresome, and downright gross experience. Right now, there isn’t much that drivers (and carpoolers) can do to steer clear of these sorts of people, but artificial intelligence could be a solution.

According to a patent application spotted by CNN, Uber has drawn up a plan for AI that detects a user’s drunken behavior to accommodate them before they get into the backseat. The system, described by members of Uber’s Trust & Safety team in 2016 and published yesterday, tracks how someone typically uses Uber’s app: how quickly they type (and with how many typos), how precisely they click on buttons, their walking speed, and the way their phone is typically held or dropped on any given day.

Someone who hails a car to get home after hitting the bars probably won’t be the best at typing out their home address or walking too quickly (if at all). Factors like these are plugged into Uber’s planned algorithm, along with details about when and where the ride was requested. A late-night Uber call or one that’s from an area loaded with bars, would tip the system off about a rider’s sobriety differently than a daytime call from the suburbs.

Uber’s idea could present risks for riders

How drunken or disorderly the AI assumes a rider to be is ultimately what shapes what their ride looks like, according to the patent application. A driver set to pick up a particularly tipsy passenger might get a notification on their phone beforehand, or they could be told to meet the rider at the designated location a bit later to give the person more time to get to the car before driving off. Depending on their sobriety levels (or lack thereof), a passenger may only match with drivers who are trained or experienced with handling people in this state, or the rider might be prevented from joining a carpool.

Uber’s idea, as it’s written out, manages to make some late-night rides a bit less awkward without barring drunken passengers from the service entirely. Still, it’s not hard to imagine that a driver with a new, shiny, upholstered car might think twice about picking up a passenger they know to be sloshed. If these people can’t get themselves into the back of an Uber, then they might resort to driving or other forms of transportation that can be dangerous under alcohol’s influence.

Another disturbing possibility comes from the drivers who wouldn’t use this indicator as a deterrent but as a draw. There have been more than 100 cases of assault and abuse at the hands of Uber drivers over the past four years. A common thread through many cases, according to court documents obtained by CNN, was that the victims were either heavily inebriated — if not fully passed out — while the assault took place. Uber’s planned AI feature could, in theory, let drivers easily scout neighborhoods to find drunken passengers for this purpose.

Uber declined to comment on these issues, but it’s important to note that this product nascent; it’s just a patent application right now. The issues described here could be dealt with in a more considered way before this project pops into everyone’s phones, if it ever does. Until then, the countless carpoolers who take Uber might have to tolerate drunken, impromptu karaoke in the back seat of their car — and maybe even getting puked on.