When you talk to an AI chatbot, who do you think writes those professional, peppy responses? There’s certainly an algorithm behind the scenes, but humans put together those phrases. Tech companies are creating teams of writers, including playwrights, poets, and novelists, to help write lines that don’t sound like they came from a machine. The work can range from creating a consistent character for a chatbot, to inspiring an immersive virtual reality.

Jonathan Foster, manager for Cortana’s editorial team at Microsoft, heads a team of 22 writers around the world who help give Cortana, Microsoft’s personal assistant, a consistent voice. Foster has worked as a film and TV screenwriter in Hollywood (and continues to write screenplays on the side), but he says he’s fascinated by the immersive challenge of writing for tech.

He and his team have a detailed set of principles that define Cortana’s character and work to make sure the dialog reflects her voice. “She isn’t a chatty teenager, she’s a professional assistant,” he says. And so Cortana is positive without being naïve or chipper, and steers clear of dark humor.

“The nuance of what a writer can do sometimes looks a lot easier than it actually is,” says Foster. “Conversation seems simple because we do it every day but when you have to write it in a logical way that doesn’t feel broken, it takes a new kind of expertise that’s just burgeoning.”

Foster’s writers include poets, playwrights, novelists, and the author of children’s books. They don’t try to convince users that Cortana is human, and in fact make very clear that she’s artificial. When it comes to difficult and divisive questions, such as the election, Foster’s team avoids alienating users and has Cortana instead suggest that such topics are best left for human discussion.

In other areas, Cortana has firm views. Foster says his team changed its position on Cortana’s favorite film, for example.

“We used to do a more pervasive ‘I don’t have an opinion about that.’ But when we saw people were asking, we realized they really want to know what her favorite movie is,” he says. And so the team picked Star Trek, which aligns with her science fiction personality.

Writing for tech companies can be more involved than composing a script for a chatbot. Nathan Phillips, playwright and co-founder of a creative agency in New York, has worked for Intel and as a collaborator on the Google Creative Lab, among other tech projects. His projects include a mixed reality experience for Intel, where fish (including turtle that measured time and a whale that lit up when it found the strongest wifi signal) would eat the 3G and wifi waves that surround us, making them visible as they consumed them. He’s also worked on an interactive billboard, and an interactive documentary that creates a film about the viewer based on responses to questions.

Though Phillips understands tech fairly well, he refuses to talk about it when building the projects. “There has to be someone who adamantly refuses to talk about how it works but instead talks about what it is,’ he says.

The biggest difference in writing for VR rather than a play, for example, is that the writer is making the user the protagonist rather than trying to show the actions of the protagonist. Otherwise, Phillips believes the central concept is the most important element, and it’s just a matter of how it’s expressed.

“There’s no such thing as a VR idea or a book idea,” he says. “There’s an idea that requires you use VR to convey it, or idea that requires you have a book to convey it. Think about how many incredible stories have been lost because someone was like ‘I write books.’ When you stop focusing on how it works and start focusing on what it is, you can push into a realm of idea-focused innovation.”

Both Phillips and Foster note that writing for tech can have a significant impact. Users have an emotional response when they talk to AI, says Foster. Writers are shaping the layer technological information that exists everywhere and is largely invisible. Philips says messaging applications such as WhatsApp will get smarter, will know more about you and how to respond.

“As a writer, that’s something that is and will be very much part of my job,” he says. “Figuring out what those voices are, what type of personality they have, should they feel like machines.” Writers will also have to help users feel comfortable using this technology, and give them agency as they move “from VR to AR to MR to talking to a human or an enhanced human.”

Storytelling have existed for millennia, says Phillips, but thanks partly to such phenomena as reality TV, the film equipment inside our phones, and the rise of virtual reality, the line between fiction and reality is blurring.

“If you get rid of the writer, all you have is the technology,” he says. “You have no one taking advantage of the fact that reality is over.”