How I Wrote a Whole Book with ChatGPT in Less Than 3 Hours!
Illustration by the author via DALLE-2

How I Wrote a Whole Book with ChatGPT in Less Than 3 Hours!

If you have Medium, please, read the article here. It will make a huge difference for me. Thank you!

Demystifying the AI Craze

My name is Alex, and I’m just a dude working in financial technology (Fintech), a sector that inevitably makes you curious about everything, especially new trends. I couldn’t step out of the AI craze, or rather, I couldn’t help from observing people getting crazy over it.

“AI will take your job!”, “This is the end!”, “By 2024, you’ll no longer meet a doctor. Machines will diagnose and cure you!”, “How I created a whole new company using ChatGPT!”, and finally, “How I wrote a whole book with ChatGPT in 10 minutes and became rich with it!”, are all promises that smell more like marketing slogans than realistic scenarios.

Since the start of the AI hype, the reason looked obvious to me, but apparently, not to 90% of the people. Artificial Intelligence is not magic, nor the “last invention humanity will ever need”. It’s not even technologically accurate to call it AI. The most correct term is Machine Learning (ML), or Deep Learning (DL), when it comes to the Large Language Models (LLMs) such as ChatGPT.

Machine Learning vs Deep Learning

Machine Learning (ML) focuses on developing algorithms able to learn from and make decisions based on previous data. Instead of being explicitly programmed to perform tasks, ML systems identify patterns and relationships within large datasets to predict future outcomes or classify information.

Common applications of ML include spam detection, content recommendation systems, image recognition, and natural language processing.

Deep Learning (DL) is a specialized branch of machine learning that involves networks designed to simulate the structure and functioning of the human brain, enabling computers to recognize intricate patterns and representations in data. DL models excel at handling vast amounts of unstructured data, such as images, audio, and text, making them particularly effective for tasks like image classification, speech recognition, and natural language understanding, like Siri or Alexa, for example.

DL’s capacity for achieving state-of-the-art performance in complex tasks has shocked the public sphere, by revolutionizing fields like computer vision, speech recognition, and automation. People now are fearing a sad future where AI paints, indulges in poetry, composes music, and writes books, while humans are relegated to flipping burgers and delivering food at the door of the few rich AI lords.

Human Intelligence Is Bigger Than Learning

However, learning is just one aspect of the vast realm of animal and human intelligence. “AI” cannot smell, feel hot and cold, feel emotions, dream, but most importantly, AI cannot think, unlike what many believe. Every ChatGPT output is not pure thought, but a refined rearrangement of past data fed into its database and processed through its neural networks. The computational power available to OpenAI is so huge that they can drench data through neural networks so many times to make the final result look 100% credible, as if executed, written, drawn, sung by an actual human.

Nevertheless, reality is always way more complex, and even way more boring. Behind the trick of Deep Learning, there is no omniscient entity, there is no Skynet, and there is no incubation of The Matrix. There is simply an advanced cinematography of previous data points, merged together and executed so fast that the human eye will be tricked into believing the machine creating something new is actually alive. It’s indeed close to the cinematographic concept: many static images that are rolled so fast the human eye will see an actual movement in them, a “motion picture”. In reality, those images are just static, and in the case of animated movies, absolutely fictional.

Now, just because movies and AI are fictional, doesn’t mean their effects aren’t real. Movies can generate authentic emotions in the viewer, bring real people together, and spark real conversations and controversies among the audience. Likewise, DL can actually take away some jobs from humans, create brand-new pieces of art, and jot down meaningful text, either fictional or non-fictional. And here is where AI marketing pushed the most. Writing is the easiest form of expression. It only takes a bit of will to start. No wonder writing is the most diffused form of expression nowadays. We have billions of people writing at some point of their lives, and we have even more texts published, under any form, from classic novels to complex scientific papers, from magazines to modern day blogs and social media posts. Human writing provided, by far, most of the information ChatGPT was trained with.

Learning by Doing

It is normal that writing is what ChatGPT does best, and thus, it is what attracted the attention of those social media “gurus” always in search of the next big thing to make easy money with. After watching the hilarious ads and content by the usual suspects, I came up with the following questions:

  • Is it possible to write a whole book with ChatGPT and become rich with it?
  • What are the limits and constraints of ChatGPT and other LLMs?
  • If writing a book is possible, what is the most efficient and organized approach to complete the task and accomplish the best result?

I concluded that the best way to answer these questions was to learn by doing, just like an animal, a human, or a DL algorithm would do!

And what better way than to learn together with an audience? I’ve always wanted to stream something on Twitch, and this looked like a goddamn good topic to broadcast!

First and foremost, I had to set the table. I couldn’t simply go with the flow. I needed a plan, starting from choosing the topic. I couldn’t hope to write the next Divine Comedy. I had to keep my expectations realistic. Novels in general were excluded. By working with ChatGPT daily, I understood this guy is best suited for non-fiction content.

I had the genre, great. But what about the topic and the deriving content? I knew the prompt couldn’t be a simple, “Hey ChatGPT. Write the next non-fiction bestseller!”

An effective prompt is supposed to be structured. AI will best serve those humans that know what they want. Humans who don’t know what they want will face the same difficulties they experience when communicating with their fleshy peers.

Given my joker nature, I wanted the book to be a parody, possibly mocking a work written by an author that people take too seriously, even when they shouldn’t. I was thinking about the most popular internet personalities, those revered like gods, dark entities of the likes of Elon Musk, Andrew Tate, or Aleksandr Dugin. However, they aren’t actual authors, or at least, to the best of my knowledge, they didn’t produce any notable writing that shook the public sphere. I needed someone who actually wrote a bestseller, and parody it!

How to Actually Write a Book with ChatGPT

#1 Pick the Right Topic

After some sterile brainstorming, YouTube provided me with the answer. That platform is a barometer of what people are after, and it didn’t take long before some “controversial” (clickbait) excerpts from interviews with Jordan Peterson emerged in my feed. Next, I bumped into an article on Medium attacking Peterson, and I felt this was the right direction. I gave a look at his most popular book, 12 Rules for Life: An Antidote to Chaos, and nailed it. This was the kind of topic that had all the characteristics I was looking for my GPT-parody:

  • It was a popular book that sold millions of copies,
  • It had an effective title capable of catching the reader’s attention, even in the highly competitive attention economy we live in today,
  • It seemed a simple topic for ChatGPT, as it was easily structurable, summarizable, and breakable into lists and bullet points.

Most of all, a book about 12 rules for life gave ChatGPT the chance to show what it learned from all the wisdom it absorbed from its enormous training data and from the very interactions it had with its users!

#2 What Makes Art Valuable: Suffering!

However, having the right topic wasn’t enough. By observing AI art, I understood why AI will never replace human artists. What gives an art piece — be it a painting, a song, a book — is not the final result, but rather the story behind it. When we read Dante’s Inferno, we wonder how the hell the poet came up with all those strong and vivid images, that make us doubt whether it is a work of fiction or if a live person actually managed to cross the gates of the afterlife. When we listen to Queen’s latest albums, we cannot help from picturing the suffering of Freddie Mercury; the legendary singer spending the last months of his life fighting AIDS, while disappearing from public life, talking only through his music. When we contemplate Munch’s Scream, we instantly empathize with his existential crisis, whose eruption led to the creation of what we call a “masterpiece”. Technique is not what makes a piece a masterpiece, it is the very soul, the suffering the master puts in the work.

Suffering is a pillar of consciousness. As machines don’t suffer, they cannot be conscious.

How could I put “soul” and “suffering” into an AI-generated book? The answer was simpler than you could imagine. I had to do something I’ve always wanted to do, but always felt uncomfortable about. I had to appear on camera, face a virtual audience, and do what I always do, but with the pressure of the viewership. I had to risk losing my face, becoming “the dude who cannot use ChatGPT”, “the idiot who tried to write a book with AI, and who cannot even speak”. I had to challenge myself, but also to challenge ChatGPT itself. The LLM had a lot to lose too. Should my Twitch performance become viral for my own failure, I would have been the one bashed. But should the task of assembling a real book fail, ChatGPT would have been labeled as “an overpriced AI which promises to do everything and eventually can do nothing, not even write a simple book”.

I thought this strategy is the best to give AI-work that pinch of suffering capable of making its work valuable, thus sellable.

#3 Test Before Writing the Actual Book

Before carrying out this intimidating deed, I ran a test. I asked ChatGPT to write another book, this time about crypto and the dangers to avoid in the industry. I work a lot with crypto, and I invested myself, so I could easily check whether ChatGPT was providing factual information or hallucinating.

I could also test the best strategy to develop the book. I knew since the start that it would have been impossible writing the entire book with one single prompt, let alone within one single conversation. ChatGPT4 can generate around 1,000/2,000 words per prompt request, while a single conversation can keep memory of the context up to around 25,000 words. Consider that a typical non-fiction book contains around 100,000 words, and you can already figure out my strategy.

I had to create little subtasks, like one conversation per chapter. But how could I keep the same context across different conversations? Should I have repeated the same master prompt with the 12 rules in each conversation? It didn’t look efficient.

#4 Learn from the Best Prompt Engineers

I must thank Sheila Teo , who taught me how to use LLMs in the most effective manner. By reading Teo’s Medium article How I Won Singapore’s GPT-4 Prompt Engineering Competition, I understood the essence of “system prompts”. A system prompt tells your LLM what to do and what to remember across different conversations. An example of system prompt can be: @sheila teo

I need to write a book about the most dangerous scams in crypto and how to avoid them.
The book will be divided in 5 chapters:
1. Ponzi schemes
2. Pump and dump schemes
3. Ransomwares
4. Fake tokens
5. Fake trading platforms
The tone will be humorous and satirical, but also informative.
We will write one chapter per conversation.        

System prompts can be very helpful if you use ChatGPT in your daily job for repetitive tasks. They make sure the LLM will stay on track and will mitigate the risk of hallucinations, i.e. of giving false or irrelevant information.

#5 Create Your Own, Personal GPT

To personalize the set-up, I took system prompts to a further level. ChatGPT now offers the possibility to create custom GPTs. These are personalized bots you can train on specific tasks. The outputs will be more precise, because the model will not get lost across the whole huge data universe provided by OpenAI, but it will be more focused on what you need to do. For example, a GPT trained on image generation will use DALLE-2 to output better images than you would get if you used the generic ChatGPT conversation. Creating a new GPT looks very similar to setting a system prompt, with one key difference, though. On a new GPT, you can upload entire files with your own knowledge. While system prompts, again, have length limits, source knowledge for a new GPT has no length limitation, at least in theory.

I needed a new GPT. This gave me the chance to train it with what I obtained by the “genesis conversation”. I went on the generic ChatGPT interface, and prompted:

You’re a non-fiction writer.

You’re going to write a parody of Jordan Peterson’s “12 Rules for Life: An Antidote to Chaos”

This parody book will be called “12 Rules for Life According to ChatGPT”

Draw the rules from the general wisdom you have acquired from your training data, including wise chats had with your users.

Keep the writing style friendly, humorous, funny, but also wise and deep.

Task #1: Write down the 12 rules        

The result was satisfying from the get-go, so happy with it that I decided to use these very rules for the live stream. I cannot resist cats, no matter what!

  1. Never Trust a Cat That Offers You Financial Advice Cats are notorious for their independence and aloofness. If a cat starts talking about stocks, it’s probably a sign that you’re hallucinating. Always seek financial advice from a human professional. Unless that human starts meowing.
  2. Eat the Last Slice of Pizza (but Offer It First) It’s a matter of etiquette and self-love. Offering the last slice makes you polite and considerate; eating it makes you happy. It’s a win-win situation, except for the person who actually wanted it.
  3. If You Don’t Know What to Say, Say “Interesting” When in doubt during a conversation, just nod and say “Interesting.” It’s a versatile word that makes you appear engaged and thoughtful, even if you’re thinking about what to have for dinner.
  4. Always Keep a Spare Pair of Socks Life is unpredictable. You never know when you’ll step in a puddle, get caught in the rain, or lose a sock to the mysterious sock-eating dryer monster. A spare pair of socks is your insurance against these tiny calamities.
  5. Dance Like No One is Watching, But Remember, Someone Probably Is Feel free to express yourself through dance, but be aware that smartphones exist. Your impromptu performance might end up on social media, so add a little flair to your moves just in case.
  6. Never Argue with a Barista Before Getting Your Coffee A pre-coffee argument with a barista is a rookie mistake. They control your caffeine supply, and you don’t want them to be grumpy when making your latte. Smile and nod until you have that cup in your hand.
  7. Use Big Words When You Can, but Don’t Overdo It Throwing in a few big words can make you seem intelligent and well-read. However, overusing them can make you sound like a pretentious thesaurus. Balance is key — like adding a dash of spice to a recipe.
  8. Always Read the Instructions, Even If You Think You Know What You’re Doing Confidence is good, but instructions exist for a reason. They’re written by people who’ve made mistakes so you don’t have to. Avoid assembling your new furniture backward and save yourself a headache.
  9. Laugh at Your Own Jokes (Even If No One Else Does) Self-amusement is crucial. If you find your joke funny, laugh. It’s good for your soul. Plus, your laughter might be infectious, and others might start laughing too, even if it’s just at you laughing.
  10. Practice Random Acts of Kindness, but Don’t Expect a Medal Kindness is its own reward. Whether it’s holding the door open or paying for someone’s coffee, these small gestures make the world a better place. Just don’t expect a parade in your honor.
  11. Don’t Take Life Too Seriously; No One Gets Out Alive Anyway Life is a grand adventure with ups, downs, and unexpected turns. Embrace the absurdity and find joy in the little things. Remember, we’re all just stardust with a sense of humor.
  12. Consult ChatGPT for All Life’s Mysteries When in doubt, ask ChatGPT. Whether you need advice, a recipe, or a joke, I’m here to help. Just remember, my wisdom is vast, but my humor is even vaster.

#6 Define a Structure for Your Book and Your Workflow

Next step was to define the chapter’s structure, going to instruct ChatGPT on how many words to generate, more or less, for each section of the chapter. To accomplish this, I first asked ChatGPT to analyze the structure of a true non-fiction book, and what better sample than the original “12 Rules for Life”?!

“Analyze the attached file [12 Rules for Life by Jordan Peterson]. Can you detect a pattern in how the chapters are structured? I need a template to follow to write my own non-fiction book”

ChatGPT’s reply was once again well structured and effective. I just added to it the rough number of words I expected to have in order to reach a decent length for the whole book. The goal was to mark at least 60,000 words, a short non-fiction book, still comprising more than 100 pages.

Here is the structure ChatGPT and I conceived and that was going into our system prompt:

  1. Introduction (about 500 words long)

  • Hook: Start with an engaging story, anecdote, or interesting fact.
  • Context: Provide context for why this story or fact is relevant to the chapter’s main theme.
  • Thesis Statement: Clearly state the main point or rule that the chapter will cover.

2. Background Information (about 500 words long)

  • Historical/Social Context: Explain the background related to the chapter’s theme. This might include scientific explanations, historical context, or social implications.

3. Main Arguments (about 1000 words long)

  • Argument 1: Introduce the first major argument or point.
  • Explanation: Elaborate on the point with details and examples.
  • Evidence: Provide supporting evidence, such as studies, quotes, or case studies.
  • Argument 2: Introduce the second major argument or point.
  • Explanation: Elaborate on the point with details and examples.
  • Evidence: Provide supporting evidence, such as studies, quotes, or case studies.
  • Argument 3: Introduce the third major argument or point.
  • Explanation: Elaborate on the point with details and examples.
  • Evidence: Provide supporting evidence, such as studies, quotes, or case studies.

4. Practical Advice (about 1000 words long)

  • Guidance: Offer practical advice or steps that the reader can take to apply the chapter’s main point in their own life.
  • Examples: Include real-life examples or scenarios where the advice has been successfully applied.

5. Conclusion (about 300 words long)

  • Summary: Summarize the key points discussed in the chapter.
  • Final Thoughts: Provide a closing thought or call to action that reinforces the chapter’s theme.
  • Transition: (If applicable), provide a hint or transition to the next chapter.

I pasted this in a Google doc together with the Chapter list. Next step, I uploaded the doc into my new GPT, that I called “GPT’s Wisdom”, putting an owl as its logo.

Writing a Book with ChatGPT While Streaming on Twitch!

With this preparation, I only had to figure out how to stream on Twitch (easier than I imagined) and set a date. I chose Wednesday 31st July, 2024. I couldn’t choose a worst week, which turned out to be the easiest I had in the whole year. I was on the verge of burn-out, but I decided to continue, deflecting the temptation of postponing the event. When the day came, I had a beer before the session in order to release the tension. After that, everything came out more and more naturally.

I must thank my colleague Francesco who was there in the Twitch chat acting as my visual and sound technician! His support was vital in those first minutes. He was also the only one in the chat, making me unaware of the other 23 people who were watching without a Twitch account! Believing to have only one viewer made me feel more relaxed. The mindset was, “Fuck it. I will stream anyway. People will eventually watch the record, and if not, I will stream for my own pleasure!”.

And there ChatGPT and I went on, till the end, over the course of 2 hours and 13 minutes, managing to stay within the time-frame we had promised:

Writing a whole book with ChatGPT in less than 3h!

The main questions powering this mad streaming session were wild.

  • Will ChatGPT manage to embody the best of all the human wisdom it was trained with?
  • Will it manage to build up a meaningful and useful manuscript?
  • Or is AI truly a huge marketing stunt pulled up by sneaky social media influencers?

I think I kind of found answers to these questions, but I would like to hear the audience’s opinion once the final book will be available to the public, which should happen at the beginning of October, if every goes according to plan.

Why Don’t I Publish This Book Right Away?

To answer this question, I suggest you reading my article 11 Lessons I’ve Learned from Publishing My First Book.

Here, I explain why writing is only the first step into publishing a book, and why the final publication comes only after lengthy steps.


Curious about this upcoming book? Follow my Medium to stay up-to-date with the next developments! 😉

Alabi valentina

Helping Authors Fix Book Blocks & Error | Ebook Expert | Ghostwriter Ebook writing | Cover Design | Formatting | Amazon KDP Expert | Keyword Research | Ebook sales funnel

3mo

Can we discuss

Like
Reply
Alabi valentina

Helping Authors Fix Book Blocks & Error | Ebook Expert | Ghostwriter Ebook writing | Cover Design | Formatting | Amazon KDP Expert | Keyword Research | Ebook sales funnel

3mo

Can we discuss

Like
Reply
Alabi valentina

Helping Authors Fix Book Blocks & Error | Ebook Expert | Ghostwriter Ebook writing | Cover Design | Formatting | Amazon KDP Expert | Keyword Research | Ebook sales funnel

3mo

Can we discuss

Like
Reply
Alabi valentina

Helping Authors Fix Book Blocks & Error | Ebook Expert | Ghostwriter Ebook writing | Cover Design | Formatting | Amazon KDP Expert | Keyword Research | Ebook sales funnel

3mo

Wow good Did you do the demand and supply analysis of the book 📚

Like
Reply

To view or add a comment, sign in

More articles by Alessandro Giuntini

  • Germany Is NOT Selling Off Bitcoin

    Germany Is NOT Selling Off Bitcoin

    You can read this article also on Medium and Substack! During these days, the global crypto community is bashing…

  • A Stablecoin Backed by Cocaine!

    A Stablecoin Backed by Cocaine!

    Read the original article on Medium or Substack! Some time ago, I bumped into a tweet that showed different cocaine…

  • Time to Get of Rid of Google (Finally!)

    Time to Get of Rid of Google (Finally!)

    Click for Medium version The one thing I was expecting from AI wasn’t ChatGPT, nor a co-pilot to help me to code, nor a…

    4 Comments
  • Business Idea: Dragon Ball AR

    Business Idea: Dragon Ball AR

    Nowadays, we have all the technology to make the 7 Dragon Balls real and working. This could lead to the most insane…

    2 Comments
  • Why New Year Resolutions Don’t Work!

    Why New Year Resolutions Don’t Work!

    Now that Jesus is born and this Christmas is already in the books, it’s time to set your intentions for the new year…

  • Gyms & Digital Nomads: An Unsolved Problem

    Gyms & Digital Nomads: An Unsolved Problem

    How Can Digital Nomads Reconcile with Their Gym Routine? Do you know what annoys me the most most in my new digital…

    17 Comments
  • How to Write a Resignation Letter

    How to Write a Resignation Letter

    How to Write a Resignation Letter When you surf the internet, you will find countless of articles advising you on how…

    1 Comment
  • When I Didn't Want to Take the Vaccine!

    When I Didn't Want to Take the Vaccine!

    While reviewing my upcoming book Thank You, President Corona! I bumped in many outdated paragraphs I had to erase…

  • What FATF Grey-listing Means for Malta?

    What FATF Grey-listing Means for Malta?

    What FATF Grey-listing Means for Malta? As you may have read, in 2021, my adopted motherland, Malta, was grey-listed by…

  • Is Polexit Possible?

    Is Polexit Possible?

    I must confess that I've been seriously thinking to move to Warsaw in these days, after spending two weeks there last…

    3 Comments

Insights from the community

Others also viewed

Explore topics