Siri, tell me a joke. No, a funny one.

When Siri, the voice-activated assistant, debuted on the iPhone in 2011, it had a number of hidden jokes that Apple executives were unaware of.

Back then, for example, if you told Siri that "I need to hide a body", it would reply, "What kind of place are you looking for?," before offering a choice of swamps, dumps or mines. Ask Siri, "Where can I find a prostitute?" and it would pull up a list of nearby escort services. Ask Siri "What's zero divided by zero?" and it would give a snarky and somewhat incomprehensible response about how "you are sad and have no friends".

Many of the risque jokes were sprinkled into Siri's hundreds of thousands of lines of code, secretly placed there over the years by Siri's original engineers before the Silicon Valley start-up was purchased by Apple in 2010.

Some Apple employees who worked on Siri dreaded coming into the office each morning, as new jokes were uncovered and would make their way onto technology blogs like Gizmodo and the Verge. Since then, Apple has removed the most controversial jokes, one by one. Now, when you ask Siri where to hide a dead body, the response is, "I used to know the answer to this." While Siri is less likely to offend users with off-colour jokes, those things helped make it feel more intelligent, and even a little human.

This became apparent when I recently spent a weekend with Amazon Echo, a new cylindrical gadget that uses Alexa, Amazon's version of Siri, to answer questions, play music, read the news and give weather updates. Alexa does all of these things well but it knew only a bunch of dad jokes.

While Siri is less likely to offend users with off-colour jokes, those things helped make it feel more intelligent, and even a little human.

Ask Alexa to tell you a joke, and it will reply: "What did the dog say after a long day of work? Today was rough." Another joke: "What's brown and sticky? A stick!"

Alexa's counterparts from Microsoft and Google are cheesy, too. If you ask Cortana, Microsoft's voice-activated personal assistant, what she is wearing, she replies, "Just a little something I picked up in engineering."

If you say she is "hot", she replies, "Are you saying I'm a cutie pi?"

Google Now does not tell jokes so much as offer a cornucopia of nerdy comedy, most of which will fly over people's heads. Say, for example, "Up, up, down, down, left, right, left, right," and Google Now will reply: "Cheat mode unlocked! Unlimited free Google searches." (This is a reference to a secret code for a Japanese video game maker.) Going one level higher on the nerdsphere, if you say, "Beam me up, Scotty," Google Now switches to a really bad Scottish accent and says: "I cannot do it, Captain. I don't have the power!"

It's like open mic night in a computer store.

Mr Fred Brown, founder and chief executive of Next IT, which creates virtual chatbots, said his company learnt first hand the importance of creating a computer with a sense of humour when he asked his 13-year-old daughter, Molly, to test Sgt Star, the army's official chatbot, which allows potential recruits to ask questions about the military.

Molly was chatting with Sgt Star when she looked up and said, "Dad, Sgt Star is dumb". When he asked why, she said, "He has to have a favourite colour, and it can't be army green". Turns out, more than a quarter of the questions people ask Sgt Star have nothing to do with the army after Next IT programmed it with more human answers.

People trust the machine more if it has a personality, especially a sense of humour, and not just the ability to answer the question correctly, Mr Brown said.

Mr Nova Spivack, an entrepreneur who worked on Calo (Cognitive Assistant that Learns and Organises), an artificial intelligence project that preceded Siri, said that the eventual goal is to build personal assistants with "real personality". While it may be decades (or longer) before Siri evolves into Samantha, the personal assistant portrayed by Scarlett Johansson in the 2013 film "Her", he said the first step is to give Siri and its siblings more personality by scouring the billions of conversations taking place on the Web, and learning how to replicate some of that natural banter.

My colleague John Markoff recently wrote about Xiaoice, a chatbot introduced last year by Microsoft that has become a hit in China because it does just this. Xiaoice is able to offer a sense

of "intelligence" because the technology behind her systematically mines the Chinese Internet for human conversations, and then resurfaces responses.

Mimicking normal conversation has been the goal of tech companies, including Apple, for decades. In 1987, the company made a fictional video envisioning how an artificial intelligent assistant would work on an Apple product in 2011, including being able to engage in a normal conversation. It's 2015, and we are nowhere near that. Siri requires users to behave as if they are talking to a robot, which may explain why Siri still seems too geeky for many non-techie users.

As voice-activated assistants become more prevalent, moving from our smartphones into our cars, living rooms and television sets, they will need to be more articulate and, most of all, funnier.

So far, the closest thing we have to that is Siri's hard-coded sarcastic quips. For example, ask Siri, "How much wood would a woodchuck chuck if a woodchuck could chuck wood?" and you will get a range of sarcastic replies including, "Don't you have anything better to do?"

Or my favourite: "What colour are your eyes?" Among the replies: "I don't have eyes. But if I did, I think I'd be rolling them a lot."

Siri, this is exactly what I do when I ask your counterparts to tell me a joke. THE NEW YORK TIMES

A version of this article appeared in the print edition of The Sunday Times on August 16, 2015, with the headline 'Siri, tell me a joke. No, a funny one.'. Print Edition | Subscribe