You are currently viewing GPT Generates Fanfics

GPT Generates Fanfics

  • Post author:
  • Post category:ChatGPT / OpenAI
  • Post comments:0 Comments
  • Reading time:12 mins read

It amazes me how good ChatGPT is at generating new, unique (ish) works from existing pieces of literature. It’s creative and articulate enough that the stories it creates are actually fun to read. Today I used it to generate a short Harry Potter fanfiction, and I thought I’d share it on here.

I tried to be as creative as possible with the prompt, in order to give it the best possible chance of producing a plot that would go somewhere you wouldn’t expect. Here’s the prompt:

Continue the following story:
Luna opened the door to Professor McGonagall’s office. The professor whirled around.
“Ms. Lovegood! What are you doing? AVADA KEDAVRA!”
Luna fell to the ground, lifeless.

Here’s the response:

The words were like a nightmare come true, and Luna couldn’t believe what was happening. But as she lay on the ground, she realized something was wrong. She wasn’t dead. The curse had missed her by inches, striking the door behind her instead. Luna scrambled to her feet and ran towards the professor. “What are you doing?” she cried out. “Why did you try to kill me?” The professor looked at her, her face twisted in anger and confusion. “What do you mean, Ms. Lovegood?” she said. “I never tried to kill you.” “You just cast the Killing Curse at me!” Luna said. “I heard you say it!” The professor looked at her, aghast. “I would never do such a thing, Ms. Lovegood. I am a Hogwarts professor, and I am bound by the rules and laws of this school.” Luna was confused. Had she imagined the whole thing? But as she looked around, she saw that the door behind her was charred and blackened, and there was a dent in the wall where the curse had hit. “I don’t understand,” she said, her voice trembling. “What’s happening?” The professor’s expression softened, and she put a hand on Luna’s shoulder. “Ms. Lovegood, I think you’ve been under a lot of stress lately,” she said. “Perhaps you need to take a break from your studies and focus on your mental health.” Luna didn’t know what to say. She felt like she was losing her grip on reality, and she didn’t know how to get it back. “I’ll do that,” she said quietly. “Thank you, Professor.” As she walked out of the office, Luna couldn’t shake the feeling that something was wrong. She didn’t know if she could trust her own perceptions anymore, and that scared her more than anything else. But she knew that she had to find a way to get back to herself, no matter what it took. Luna walked out of the office, her mind racing with thoughts and questions. She felt like she was walking on a tightrope, with the world spinning around her. She knew she needed help, but she didn’t know where to turn. As she walked down the hallway, she saw a familiar figure in the distance. “Harry!” she called out, relieved to see a friendly face. Harry turned around and saw Luna, and his face lit up. “Luna! What’s wrong? You look like you’ve seen a ghost.” Luna explained what had happened with Professor McGonagall and the Killing Curse. Harry listened intently, his brow furrowed in concern. “That’s not like Professor McGonagall at all,” he said. “Something’s not right here.” Luna nodded. “I know. I just don’t know what to do.” Harry put a hand on her shoulder. “We’ll figure it out. But right now, you need to take care of yourself. Why don’t you come with me to the Room of Requirement? It’s a safe place where we can talk and figure out our next steps.” Luna nodded, grateful for Harry’s help. They walked together to the seventh floor, and Harry approached the blank wall. “I need a place where we can talk in private,” he said, and the door to the Room of Requirement appeared. As they walked inside, Luna felt a sense of calm wash over her. The room was cozy and warm, with comfortable chairs and a crackling fire in the fireplace. Harry led her to a chair and sat down across from her. “Okay,” he said. “Let’s start from the beginning. What else has been happening that’s been making you feel like something’s not right?” Luna took a deep breath and began to tell him everything. She talked about her dreams, her visions, and the strange things she’d been noticing around Hogwarts. Harry listened carefully, his eyes never leaving hers. As Luna talked, she felt like a weight was lifting off her shoulders. For the first time in a long time, she didn’t feel alone. She knew that Harry was there for her, and that together, they could figure out what was happening. When she finished, Harry leaned forward. “Luna, I think we need to talk to Dumbledore. He’ll know what to do.” Luna nodded. “I trust him. He’ll be able to help us.” They stood up and walked out of the Room of Requirement, their heads held high. Luna knew that they still had a long way to go, but she felt a glimmer of hope that things would get better. With Harry by her side, she was ready to face whatever came their way. They made their way to Dumbledore’s office, their hearts racing with anticipation. Luna felt a sense of calm wash over her as they entered the room. Dumbledore was sitting at his desk, his eyes twinkling behind his glasses. “Ah, Harry and Luna,” he said, his voice warm and welcoming. “What brings you here today?” Luna explained what had happened with Professor McGonagall, the visions she’d been having, and the strange things she’d noticed around Hogwarts. Dumbledore listened carefully, his face serious. “This is a troubling situation,” he said. “I will need to look into this further. In the meantime, I suggest that you stay together and be cautious. It’s possible that someone is trying to harm you.” Luna nodded, feeling grateful for Dumbledore’s guidance. Harry put a hand on her shoulder, and she felt a sense of comfort knowing that he was there for her. “We’ll be careful,” Harry said. “And we’ll keep you updated on anything we find out.” Dumbledore smiled. “I have every faith in the two of you. Remember, it’s important to trust your instincts and stay alert. And if you ever need anything, don’t hesitate to come to me.” Luna and Harry left Dumbledore’s office, feeling both relieved and worried. They knew that there was still a lot they didn’t know, and they didn’t know who they could trust. But they also knew that they had each other, and that was enough to give them hope. As they walked down the hallway, Luna noticed something out of the corner of her eye. It was a dark figure, moving quickly down the hallway. She grabbed Harry’s arm. “Did you see that?” she asked. Harry nodded, his face grim. “We need to follow them. But be careful.” Luna nodded, and they set off after the figure. They made their way through the winding corridors of Hogwarts, their hearts racing with anticipation. As they turned a corner, they saw the figure disappear through a door. Harry pushed the door open, and they stepped inside. It was a dark room, with strange symbols painted on the walls. And in the center of the room, there was a figure in a black hooded robe, their face hidden in the shadows. Luna and Harry held their wands at the ready, their hearts pounding in their chests. The figure turned to face them, and they saw the glint of a wand in their hand. “Who are you?” Harry demanded. The figure laughed, a cold, mocking sound. “You should be more concerned with what I’m going to do to you.” Luna felt a shiver run down her spine. They were in deep trouble. But she knew that they had to stay strong, and trust in their abilities. “We’re not afraid of you,” she said, her voice steady. The figure stepped forward, their wand raised. Luna and Harry braced themselves, ready for whatever was about to happen. But just as the figure was about to cast a spell, the door burst open. Dumbledore strode into the room, his wand at the ready. “Expelliarmus!” he shouted, and the figure’s wand flew out of their hand. Luna felt a wave of relief wash over her. They were safe. For now. Dumbledore walked over to the figure and pulled back their hood. Luna and Harry gasped in shock. It was Professor Snape. Luna and Harry looked at each other in disbelief. They couldn’t believe that their Potions Professor, who had always been so strict and intimidating, was the one behind all of this. “Why, Professor?” Harry asked, his voice laced with anger and confusion. Snape looked up at him, his face unreadable. “I had my reasons. But they are of no concern to you.” Dumbledore stepped forward, his eyes locked on Snape. “Your actions have put the students of Hogwarts in danger. And for that, there will be consequences.” Snape bowed his head, seemingly resigned to his fate. “I understand.” Dumbledore turned to Luna and Harry, his face serious. “I will take care of Professor Snape. In the meantime, I suggest that the two of you return to your common room and rest. It’s been a long day.” Luna and Harry nodded, feeling grateful for Dumbledore’s help. They left the room, their minds racing with questions and emotions. As they made their way back to their common room, Luna couldn’t help but wonder what other secrets Hogwarts held. She knew that there was still so much to discover, so much to learn. But she also knew that, with Harry by her side, she was ready for whatever lay ahead. Together, they would face whatever challenges came their way, and emerge stronger on the other side.

Of course, I had to give it a few “continue” prompts. That wasn’t all generated at once.

I find it interesting how ChatGPT always makes Luna survive. I tried with a few slightly different prompts to see if I could make it kill her, but it didn’t work. I guess this is probably OpenAI doing some tweaking of the model to ensure it doesn’t produce results that are too violent.

The story it generated had a few plot holes, and I asked it to clear them up for me. I asked why McGonagall’s door was blackened if Luna had hallucinated the curse, and this is what it had to say: “I apologize for the confusion. The initial idea was for Professor McGonagall to have cast the curse, but as the story developed it took a different turn. I should have edited that detail in the beginning. Thank you for bringing it to my attention.”

I also asked about the purpose of Luna’s hallucinations, because I couldn’t see why they were necessary to the story. This was the response: “Luna’s hallucinations were necessary to the story because they served as a device to move the plot forward and create tension and suspense. They also helped to develop Luna’s character by showing her struggle with visions and hallucinations, which made her more relatable to the reader. Additionally, the hallucinations helped to introduce the twist in the story when Snape was revealed to be the villain. Without the hallucinations, the story would have lacked a sense of intrigue and mystery, and it would not have had the same impact on the reader.”

Upon my asking what caused the hallucinations, this was the response: “The exact cause of Luna’s visions and hallucinations is not specified in the story. It is left to the reader’s imagination to determine what may have been causing them. It could be the result of stress, anxiety, or something supernatural or magical that Luna may have encountered. The story leaves it open to interpretation.”

I think the story could use some editing to fix a few confusing elements. Other than that, it was fairly creative and I liked it. Other generations with the same prompt were equally as creative. Quite a few had Luna dodge the curse, and it turned out that McGonagall was an imposter disguising their appearance. I had fun messing around with this today, and I’m excited to see how much better ChatGPT will get once GPT-4 is released. Hopefully OpenAI makes it open source so I can run it locally, but I’m not holding my breath.

BTW, a note on JK Rowling: Hate the artist, not the art. Supporting fanfiction and buying used books is the way to go.

Ray

Ray is a tech enthusiast who enjoys building websites, reading about the latest tech, doomscrolling on Twitter, and designing things with Pixelmator Pro and Procreate.

Leave a Reply