British programmer Joshua Browder is helping people save a lot of money on legal fees with his latest project – the world’s first robot lawyer. The 19-year-old developed a free service that allows users to ask any kind of legal question and receive relevant answers autogenerated by bots.

Browder first started the project last summer as a free website to help people appeal unfair parking tickets. He came up with the idea after getting a series of tickets himself for “trivial reasons”. Having wasted several hours on writing appeals to these tickets, he realised that many people do not have the time, legal knowledge or even the energy to appeal. So he decided to create an automatic appeal generator, using previously successful letters as a template. He aptly named the service DoNotPay, given that the legal fees involved in challenging tickets could mount up to sizable amounts between $400 to $900.

DoNotPay was a huge success, and the tech genius has now gone a step further with the website, converting it into a full fledged robo lawyer equipped to help with a range of legal issues. “I realised that the best way to help people would be to create a computer program that could talk to users, generate appeals, and answer questions like a human,” he told Mashable. “The robot can currently handle parking ticket appeals, payment protection insurance (PPI) claims and delayed flights/trains. It can also answer some general legal questions like ‘I can’t afford my ticket. What do I do?’”

“I am ultimately looking to give it as much functionality as possible in the spirit of trying to replace the large group of exploitative lawyers,” he added. To use the service, users need to go to the website donotpay.co.uk and sign up for free. Once signed in, the robot will ask the user a series of questions about their situation. When it has collected enough information, and if the person has legal grounds for an appeal, the robot will then generate a letter for the person to use.

Browder told Mashable that he received good advice from his professors at Stanford University, where he is currently a freshman. “Initially, I thought the best way to go about it was to create lots of individual rules for it to follow,” he explained. “However, I quickly failed with this approach because there are thousands of ways to say the same thing and it would be impossible to catch every one. The breakthrough came when I learned how to create a way for the robot to learn and compare phrases itself, so that it doesn’t matter how the user phrases his or her requests.”

So he programmed the robot to use text comparison that includes keywords, word order and pronouns. And the more that people use the robot, the better the algorithm gets. But there are situations where the robot can’t help, there’s a response ready for that too. “If the robot can’t answer, it provides generic and helpful message offering the user some sample phrases or the option of contacting me directly,” Browder said. “On the backend, whenever the robot can’t answer, I get notified and I work as quickly as possible to add functionality for any future requests of a similar nature.”

“As a 19-year-old, I have coded the entirety of the robot on my own, and I think it does a reasonable job of replacing parking lawyers,” Browder told Tech Insider. “I know there are thousands of programmers with decades more experience than me working on similar issues. If it is one day possible for any citizen to get the same standard of legal representation as a billionaire, how can that not be a good thing?”

Sources: Business Insider, Mashable