Chloe Aiello | CNBC | June 11, 2018

Ride-hailing apps, like Uber, have become known as safer alternatives to driving when intoxicated. Now the company is looking to learn a lot more about its late-night riders.

Uber filed a patent application Thursday, first spotted by CNN, that envisions using machine learning to detect whether a potential passenger is behaving abnormally. The patent application is vague about what exactly constitutes an “abnormal state,” but seems to be referring to intoxication and fatigue.

The system tracks user behavior based on typing speed and accuracy, device angle, walking speed and more. It plugs that information into an algorithm, along with additional information details about when and where the ride was requested.

If a request comes in late from an area packed with bars, and the user keeps dropping their phone, it is a pretty good indicator that passenger is drunk.

When an altered user is identified, the application explains, there are a number of different options, including matching the user with specific drivers, alerting the driver about a user’s possible intoxication, and modifying pickup or drop-off locations. The application says the technology is a means to avoid “safety incidents and personal conflict incidents, [that] can occasionally occur when users and/or providers behave uncharacteristically.”