An AI bot has managed to pen a new chapter in the Harry Potter series, and it contains scenes even weirder than the most deranged fan fiction.

Botnik Studios used the original seven Harry Potter books to enhance the predictive text of the bot in both narration and speech, all so it could create a new wizard story with suggested next words. But, as you would expect, the chapter does not make the most coherent of stories.

"Ron's Ron shirt was just as bad as Ron himself," the chapter reads. "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 Hermoine's family."

Although the story is a bit scattered. the sentences do make sense. Speaking to CNET, Botnik chief executive Jamie Brew said: "Our web keyboard app analyses text files and offers the most common word sequences as suggestions to the human user, to help them write in the style of the source material. Then a bunch of writers in the Botnik community got together in an online chat room and pitched lines they wrote using the keyboard. Our editorial team cobbled these fragments together into the full chapter we posted."

In matching with the content, the story has been titled "Harry Potter and the Portrait of What Looked Like a Large Pile of Ash".

Here are some of the best paragraphs:

""Not so handsome now," thought Harry as he dipped Hermione in hot sauce. The Death Eaters were dead now, and Harry was hungrier than he had ever been before."

"Harry, Ron, and Hermione queitly stood behind a circle of Death Eaters who looked bad. "I think it's okay if you like me," said one death Eater. "Thank you very much," replied the other. The first Death Eater confidently leaned forward to plant a kiss on his cheek."

""Voldermort, you're a very bad and mean wizard," Harry savagely said. Hermione nodded encouragingly."