How Cortana got her corny jokes

Hey Cortana, do you like dogs?

"I like good dogs. Who's a good dog? Who's a good doggie? That's a good little fuzzy face."

Of all the jokes that Windows 10's digital assistant tells, that's Jonathan Foster's favorite. When someone on Foster's staff suggested that joke to the rest of the team, he said the whole writers' room was howling with laughter.

Foster leads Microsoft's(MSFT) Cortana personality team, a group of writers who draft the responses Cortana provides when people ask her "chit chat" questions. "What's up?" "What can you do?" "Hi." "Tell me a joke." Those all fall under the personality team's umbrella.

To give Cortana personality, Microsoft hired Foster (a Hollywood film and TV writer), along with a novelist, an essayist, a poet, a playwright, a couple of screenwriters, a few copywriters and some journalists. Their task: to create a kind of digital character that can interact with Windows users.

They have a daily roundtable meeting at 10 a.m. in which the writers throw out jokes and other ways to imbue Cortana with personality. Foster said the process was inspired by the legendary writers room from the satirical newspaper The Onion.

The work that Foster's team does is going to get significantly more exposure in the coming weeks, months and years. Cortana got a big promotion this week, becoming the default search tool in Windows 10. Microsoft expects 1 billion people to use Windows 10 in a couple of years. And in the fall, Cortana is coming to the iPhone and Android devices.

Foster says he and his team feel the pressure.

"We take the work very seriously," Foster told CNNMoney. "We're definitely conscious of the need for growth."

Cortana started with 20 jokes; now the digital assistant has entire categories of jokes. She tells science jokes, bad jokes and Easter eggs (hidden treasures if you ask it to do just the right thing). Foster's favorite Easter egg: if you tell Cortana "the cow says..." Cortana will say "mooooo," See-n-Say-style. (It also works for a host of other animals, and the farmer says "E-I-E-I-O.")

What's the point of Cortana's sense of humor? As people start to play around with Cortana, "chit chat" is the way people learn what its capabilities are.

"It's a place for people to poke around, see what she can do, kick the tires a bit," he said. "But we want to push people out of this chit chat realm and into Cortana. That's the ultimate goal: We want people to use her like we do."

Cortana,named for the artificially intelligent character in the Xbox video game Halo, can search the Internet, tell you when your next appointment is, set reminders and give you information about your PC. It's like a search box on steroids. Add in a personality, and you've got a tool that, similar to Apple's(AAPL) Siri, is meant to delight its users.

"People feel more in control if they imbue technology with personality," said Foster. "We want to open up that comfort zone for people."

To do that, Foster's team worked diligently to make Cortana friendly -- not creepy. People are freaked out by "ambiguous personalities," his team found. So they built character traits: she's not human, she has a healthy fear of water, she loves Star Trek, and she's positive -- but not overly chipper or intrusive like Clippy, Microsoft's previous, much-loathed digital assistant.

There are also some jokes that are off limits. She'll never joke about privacy, for example. Cortana isn't snarky or mean. She also needs to be sensitive and nonjudgmental.

The team is made up entirely of adults, so to make sure they're providing Cortana with appropriate responses for a younger audience, they'll often bring in teenagers to sit in on the meetings.

That came in handy when the team was trying to draft a response to "I'm gay." Each of the responses the team suggested fell flat, until a visiting teenager said, "Why not just have her say, "Cool! I'm A.I." The team loved it.

But humor, sensitivity and cultural references just don't translate across borders. That's why Foster's team includes writers from each of the different countries in which Cortana operates.

In Italy, Cortana refers to herself as "our" or "we." In Canada, Cortana goes out of her way to be polite. (One exclusive-to-Canada joke: "How do you make a Canadian apologize? You step on his foot.")