How a robot wrote for Engadget
John McCarthy, the late computer scientist who first coined the term Artificial Intelligence, famously said “as soon as it works, no one calls it AI any more.” What was once cutting-edge AI is now considered standard behavior for computers. As I write this article, my computer is continuously performing millions of tasks, caching files, managing RAM and balancing CPU loads. The algorithms behind many of these operations would have been considered “AI” years ago. Now it’s just software.
Last year, I looked into how well neural networks — programs that behave like a scaled-down version of your brain’s neurons — can write. My plan was to create a bot that could write articles for Engadget. As I discovered, we’re not yet at the point where such applications can think and write like humans, but they can do a reasonable job of writing readable sentences. As I noted at the time, some companies are using less “advanced” methods to produce content automatically. One such company is Automated Insights, whose tools are used by a number of companies to auto-generate reports, and also by the Associated Press to write articles about sports and finance.
I’ve been using one of Automated Insights products, Wordsmith, trying again to make a computer write like Engadget. It’s easy to argue that Wordsmith isn’t “AI.” It doesn’t use machine learning and neural networks, but it does work. And thanks to that fact, I’ve been much more successful in my mission to automate the art of the tech blog.
At its core Wordsmith is a bit like Mail Merge: It all starts with data. That means you’re limited to writing about quantitative, number-driven topics. I plugged in a simple chart containing some key data on smartphones released this year, with the view to having the app write an article about the latest big tech announcement, Samsung’s Galaxy Note 7. I wanted to create a Blogbot that could compare its specs to the rest of the smartphone market.
While training the neural network to write, I had to feed it around a million words published on Engadget. Wordsmith doesn’t require this sort of input, but it can’t create articles from nothing. Instead, you write a basic template article, and then start adding variables. So I started with a simple opener:
Company has just announced the Product, its latest flagship. How does the new model stack up against its rivals? It’s time to check the spec sheets.
They were the perfect first words for Blogbot: It would be difficult to write a more tech-bloggy paragraph. Rather than being specific with company and product names, I instead left them blank, and linked the data from my spreadsheet. It’s these data points that allow you to create a template that can be used again.
With the basic data linked, it was time to build in some variation. The simplest way to do this is using the included synonym tool to add more words and phrases that can be swapped in at random. Replacing certain sections of an article won’t create the level of variety needed for publication, though. You can also highlight entire paragraphs and play around with the ordering and phrasing. After a little tweaking, I ended up with this:
Wordsmith would now create a paragraph from one of three basic structures, each of which have at least four phrases that will be picked from a further list of synonyms. With a small amount of work, the system was able to pick from around 50,000 different options.
I applied the same principles to the rest of the template, and was left with a surprisingly functional, if a little dull, article. Here’s a randomized output:
Now that the dust has settled on Samsung’s Galaxy Note 7 announcement, how does it fare against its rivals? It’s time to run the numbers.
Many will be interested in the Galaxy Note 7 just because of its “S Pen” stylus, but that’s not where the story ends. Elsewhere, the Galaxy Note 7 has a Snapdragon 820 processor paired with 4GB of RAM, which is just what you’d expect from a premium device in 2016. Its 5.7-inch display is larger than the rest of the pack while its 1440 x 2560 resolution is what you’d expect from a flagship. The Galaxy Note 7 has 64GB of internal storage and an expandable microSD slot. The rear-facing camera is a 12-megapixel unit, which is lower resolution than most sensors in this price range, but Samsung claims it takes great pictures anyway thanks to its larger pixels and fast autofocus.
Rest assured we’ll have a full review of the Galaxy Note 7 before long, but here’s a table of numbers to tide you over for now:
By the time I got to this point, I’d added complexities to the template. The middle paragraph not only pulls all of its data automatically from a spreadsheet, but it also makes comparative statements. For screen size, anything two percent away from the average will get one of several phrases that basically say if it’s “larger” or “smaller” than other phones. If Samsung cheaped out on a 1080p display, Wordsmith would highlight that using slightly negative phrasing. In the example above, it’s also pulled out that the camera sensor is a lower resolution than competing handsets, and given Samsung’s explanation for that.
All of the “training” I gave Blogbot amounts to simple conditional “If-then” programming, but you can go surprisingly deep with those basic principles. It wasn’t really necessary for this project, but instead of randomizing the paragraphs, you could make the structure selection conditional too. This proves useful in financial articles: If a company has fallen short of expectations, a writer will pull out that fact first and explain why. Here’s an example, published by the Associated Press.
Synonyms inside synonyms inside synonyms.
After almost five years writing for tech publications, I am both very adept and very tired of writing product posts. When I started out, I quickly trained my brain to pull together a non-descript opener, some paragraphs with facts and figures, and a functional closing sentence with something like a release date and a price. With that knowledge, it was very simple to put together Blogbot, which now writes at an acceptable standard. To mark the start of AI Week, I actually published the excerpt above under the not-particularly-good pseudonym Toby Golby (read it backwards without the “y”s) together with the chart containing the data that helped Worsmith write. It’s not a good article, but it’s definitely an article. And aside from the headline and formatting, it’s all Wordsmith.
Here’s the problem, though: Those sort of articles aren’t what I, or any writer at any publication, hope to write. Yes, we still want to give readers the facts and figures that they care about, but we also want to provide context on why they matter, and the bigger picture in general. Just as I’d mastered the art of the basic product post, my editors had pointed out that it wasn’t good enough. And it never has been. Back when it was a simple tech blog, Engadget alumni like Ryan Block, Joshua Topolsky and Tim Stevens always strived to deliver analysis and opinion with the news. Today, the same is true: If you’re reading about a new phone, you’ll also get background on where the company’s at right now, the phone’s position in the market, and whether this is what it needs to succeed.
With more data Wordsmith could be a better blogger, but that would require more maintenance.
In its current state, Blogbot can’t do that. To achieve context I’d need to write out small facts about each company we cover, perhaps mark them as positive or negative, and even then it would be tough to guarantee that the news of the day doesn’t negate the content of those canned phrases. So yes, with more data, there’s a chance it could be a better blogger, but the amount of maintenance it requires would make the exercise pointless.
Automated Insights is a long way off from being able to actually automate the kind of insight I’d need to be able to set Blogbot off to write for Engadget its own. Right now, though, it’s working on numerous feature improvements that will reduce the amount of time it takes to get a workable template up and running. The first is a simple tool that’ll automatically suggest synonyms for words. Another feature already heavily into development will use machine learning to scan sentences and rearrange them to increase variance. Training a computer to grasp the meaning of a sentence and then rearrange the words without breaking it is no mean feat.
This imposing blank page is the first thing you see when starting a template.
There are even loftier long-term goals. Perhaps the most ambitious also involves machine learning reading the data and automatically generating templates. “The synonym stuff is coming soon, the other stuff is harder,” James Kotecki, Head of Communications at Automated Insights, told me.
Building these new AI elements into Wordsmith comes with “the classic computer science problems you’d expect,” Kotecki continued. Making a computer understand that numbers increasing in data charts isn’t always positive — that figure could represent debt — is tough. “It’s going to be a multiyear thing, as all machine learning things are. Just as we haven’t perfected automatic driving or computer vision or even natural language processing, it’ll take some time for this field of computer science to keep developing.”
Like most writers, I’d rather be interviewing people (and messing around with AI) than hammering out news articles. But while Engadget has expanded beyond the confines of the “tech blog,” gadget news is still a big part of our DNA. I want to continue to push Wordsmith, and other automated writing tools, to see if such applications can become useful enough to be a permanent member of the news team.
What’s super interesting about Wordsmith, versus the pure machine learning route, is it’s very much working now. It’s capable of reading a financial statement and writing an article of it, or generating a thousand property and car advertisements almost instantly. But Wordsmith, as it is, isn’t quite ready for my usecase. Sure, I published an article it wrote, and nothing exploded, but having it handle the myriad topics we cover every day would be impossible. As more features are added, though, it’ll only become more viable.
Wordsmith, as it is, isn’t quite ready for my usecase
Adding in the more “modern” AI elements that make use of machine learning piece by piece appears to be working well in other fields. While Google is going all out on a building a self-driving car, Tesla is slowly rolling out the pieces to customers when they’re ready, and other manufacturers like Nissan are doing the same thing.
Really the missing piece of the puzzle for me right now is recognition, rather than creation. I trust Wordsmith, with enough programming and testing, to do the actual writing. It’s capable of linking with other applications directly, so what I need is a tool that could read and understand a press release, and input the relevant data into a spreadsheet for Wordsmith to pull from. That’s tough: Samsung’s press releases are worded differently than Apple’s, and Google’s too. Some will omit certain specifications, and Wordsmith would need to be flexible enough to understand what’s missing and write around it. If we can get there — and I don’t think we’re that far off — then computers can start writing for Engadget.