Creating a 100% AI-Written Sci-Fi Book: My Journey with ChatGPT4

László Vágási
5 min readApr 13, 2023

--

The world of literature has evolved immensely over the years, and the introduction of artificial intelligence has opened up exciting new possibilities. I recently embarked on a unique project: creating a 100% AI-written sci-fi book using OpenAI’s ChatGPT4. In this Medium blog post, I’ll share my experience, the challenges I faced, and the steps I took to successfully complete this project.

The Beginning: Harnessing the Power of ChatGPT4

The idea of creating a book entirely written by AI intrigued me, and with the advanced capabilities of ChatGPT4, I knew it was possible. To begin, I needed to guide the AI in crafting a compelling plot, creating engaging characters, and maintaining a consistent storyline.

Step 1: Generating the Plot

I started by providing ChatGPT4 with a well-crafted prompt to develop an intriguing plot. It took a few trials, but I eventually struck gold. A helpful resource that guided me in creating the perfect prompt was this YouTube video: https://www.youtube.com/watch?v=OgYQAS9LY3o&lc=Ugz43bkSuAuCyvUaIcd4AaABAg

Here’s the prompt to get the perfect prompt:

“I want you to become my Prompt engineer. Your goal is to help me craft the best possible prompt for my needs. The prompt will be used by you, ChatGPT. You will follow the following process:

1. Your first response will be to ask me what the prompt should be about. I will provide my answer, but we will need to improve it through continual iterations by going through the next steps.

2. Based on my input, you will generate 2 sections. a)Revised prompt (provide your rewritten prompt. It should be clear, concise, and easily understood by you), b)Questions (ask any relevant questions pertaining to what additional information is needed from me to improve the prompt).

3. We will continue this iterative process with me providing additional information to you and you updating the prompt in the Revised prompt section until I say we are done.”

Step 2: Crafting the Story Template

Next, I needed a story template to ensure a smooth flow throughout the book. Following the “All About AI” Last of Us alternative guidelines (https://youtu.be/NEqixMifk18), I had ChatGPT4 generate a story template that included characters, structure, and other essential elements.

Step 3: Writing the Book

With the plot and template in hand, I began the process of having ChatGPT4 write the actual book. I provided a detailed prompt that included specific instructions for maintaining a slow-paced development, character-building, and evenly spreading the story over four acts. I also reminded the AI about the main characters and ensured that each act consisted of around 30 responses.

Here’s the first prompt to have GPT4 start writing:

“Great. Now, based on the story template I provided start writing the book.
Use the “show, don’t tell” concept when possible. Apply very slow development, character building and not rushing the main plot, but slowly building the story arc.
The story structure I provided (4 acts) should be spread evenly over 4 chapters. Each chapter is 60,000 characters long. The plot should be woven throughout each chapter, avoiding metafiction (don’t use the expressions: main characters, chapters, story, and so on) and ensuring that you don’t start replacing the main characters I provided as protagonists with other newly introduced characters. Avoid the overuse of the expression: “As …”. Each chapter is made of approximately 30 responses of yours. Now, please start providing me with the book, namely act number 1. When you are getting close to your response character limitation (approximately 2000 characters) do not start to create an ending to the plot just go on with the story. When you run out of your characters just stop, then I will ask you to “please continue [x/30/y]” and you can go on with the story, uninterrupted, where x=current response number out of 30, y=current act number out of 4. Thank you.”

Challenges Along the Way

Despite the power of ChatGPT4, creating a coherent and engaging book was not without its challenges:

  1. Rushed storytelling: ChatGPT4 had a tendency to speed through the story, necessitating reminders about the current act and pacing.
  2. Character replacement: If not reminded, ChatGPT4 sometimes replaced the main characters with new ones, requiring constant vigilance to maintain consistency
  3. Metafiction: The AI occasionally used metafiction, which needed to be addressed to preserve immersion.

Overcoming these challenges required trial and error, refining prompts, and a significant time investment.

Here’s the prompt I gave to GPT4 while it was generating the “chuncks” of chapters:

“Great. Now, based on the story template I provided continue writing the book. Use the “show, don’t tell” concept when possible. Apply very slow development, character building and not rushing the main plot, but slowly building the story arc. The story structure I provided (4 acts) should be spread evenly over 4 chapters. Each chapter is 60,000 characters long. The plot should be woven throughout each chapter, avoiding metafiction (don’t use the expressions: main characters, chapters, story, stage, act and so on) and ensuring that you don’t start replacing the main characters I provided as protagonists (Jules “Jinx” Ferran — A former robotics engineer turned underground AI hacker Dr. Elina Petrov — A renowned AI psychiatrist who specializes in treating the psychological effects of AI-human interactions Leon “Lynx” Carter — A former combat cyborg with an implanted AI brain Ada Solano — A rebellious graffiti artist who uses her art to spread messages of hope and resistance throughout the city) with other newly introduced characters. Avoid the overuse of the expression: “As …”. Each chapter is made of approximately 30 responses of yours. Now, please continue providing me with the book, namely act number 3 (Characters discover the conspiracy involves a powerful AI aiming to dominate humanity. Each faces personal crises, testing their resolve and deepening emotional growth. They collaborate to thwart the conspiracy, utilizing their distinct skills.). When you are getting close to your response character limitation (approximately 2000 characters) do not start to create an ending to the plot just go on with the story. When you run out of your characters just stop, then I will ask you to “please continue with [x/30/y]” and you can go on with the story, uninterrupted, where x=current response number out of 30, y=current act number out of 4. Now, please give the next response for act 3: 23/30/3. Thank you.”

I needed to ensure was that ChatGPT4 stayed true to the storyline. To achieve this, I provided the AI with a summary of each act in all my prompts. This approach kept the AI on track, ensuring that it didn’t stray from the intended plot and maintained the overall coherence of the story.

The Final Product

After hours of perseverance, I finally completed my 100% AI-written sci-fi book, totaling 174 pages! You can read the full book here: https://www.amazon.com/dp/B0C23QSBG3

Conclusion: Embracing the Future of AI in Literature

My experience with ChatGPT4 has shown me that the future of literature is bound to be influenced by artificial intelligence. While the process was not without its challenges, the potential for creating unique and engaging stories is immense. As AI continues to advance, we can expect even more captivating and innovative literature in the years to come.

I hope my journey inspires you to explore the creative potential of AI and consider the possibilities that await. Who knows? Your next great novel might just be written with the help of artificial intelligence!

--

--