A YouTube video caught my eye with the title, "A Robot Wrote A Chapter To A Harry Potter Book, And It's Absolutely Insane." The video claims that a software algorithm created by Botnik Studios was trained on the text of the Harry Potter series, and then proceeded to generate a chapter of Harry Potter fanfiction:

So Botnik studios used AI, which they fed it all seven Harry Potter books that were written by J.K. Rowling, and they wanted this artificial intelligence, or a "bot," to write its own Harry Potter book after they fed it all seven of the other Harry Potter installments. And it did just that.

My transcription

Other online articles (1 2 3) make the same claim: that the chapter was "written by" the software.

This brand new story was written by a 'bot,' which is the name for a piece of software designed to automatically perform tasks.

A team from Botnik Studios trained up their bot by feeding it all seven books in the Harry Potter series.

It was then asked to write its own chapter, which starts with the epic words, 'Magic: it was something which Harry Potter thought was very good.'

Botnik Studios' tweet announcing the text is rather vague about their methods:

We used predictive keyboards trained on all seven books to ghostwrite this spellbinding new Harry Potter chapter

It's unclear from the wording whether the computer did the whole thing or whether humans were involved in creating and/or editing the text.

The chapter itself does read somewhat like computer-generated text based on J.K. Rowling's writing:

Leathery sheets of rain lashed at Harry's ghost as he walked across the grounds toward the castle. Ron was standing there and doing a kind of frenzied tap dance. He saw Harry and immediately began to eat Hermione's family.

But there are places where the writing is suspiciously coherent:

Harry tore his eyes from his head and threw them into the forest. Voldemort raised his eyebrows at Harry, who could not see anything at the moment.

The connection between "tore his eyes from his head" and "could not see anything at the moment" is either a coincidence or requires an understanding of the meaning of the words, not just statistical association.

Was this chapter generated entirely by a software algorithm trained on the Harry Potter books, or was there further human input into the process?

1 Answer 1


No, the text was not generated entirely by a computer program. Humans worked with the algorithm to generate the sentences, selected the ones they liked best, edited them into a story, and even added some of their own.

Botnik's tweet describes their code as "predictive keyboards"--the same sort of technology that phones without full keyboards use to guess which word a user wanted to type. This is the first hint that human input was involved. The "keyboards" that were used are available on Botnik's website--one for narration and one for dialogue. Using the former, if one selects from the top six suggested words at each step using a pseudo-random number generator, one gets output like this:

And then — harry looked around and around the corner where he had heard a wheezy voice in his head and slumping low onto one by what to his right behind them as though he’d not to point of them could see through which they had appeared out the fake ...

There are no sentence breaks, some of the grammar is confusing or incorrect, and it's not clear (after the first half or so) what is happening. In other words, this text--which is actually computer-generated with no human input--does not come close to the level of coherence of the "new Harry Potter chapter."

Botnik's About page describes the organization as

a community of writers, artists and developers collaborating with machines to create strange new things.

Other web articles about the chapter, while keeping the clickbait titles (A predictive text bot wrote a new chapter of Harry Potter and it’s beautiful; Bot tries to write Harry Potter book – and fails in magic ways), hint at the truth: "A community of writers collaborated with a predictive text bot to write a beautiful new chapter of Harry Potter."

Finally, direct confirmation from Nat Towsen, who is listed as the first "contributor" to the chapter on Botnik's website. In response to methodology questions on Twitter, he writes:

We had a big writing jam where writers submitted short (1-5 line) chunks of copy. We voted on our favorites. I pulled the most popular plus a few others and arranged them into whatever narrative sense I could make. Then another writer and I wrote a few lines to fill the gaps.

In summary, this chapter is not a machine-generated text; it is a human-generated text that used the output of a text-generation algorithm as a starting point.

  • 2
    Anecdotally, I had trouble using the predictive text bot to write anything remotely as amusing as what the Botnik team produced. I spent about 10 minutes picking promising-looking words, then gave up.
    – Avery
    Commented Jan 16, 2018 at 1:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .