You are using ChatGPT the Wrong way or at least missing The Real Power of ChatGPT when combined with Chaining.
I wish every ChatGPT user read and try what is covered in this post.
What is a ChatGPT Chain?
I think the best way to understand this concept is by showing a practical example.
Let’s assume that you are a YouTuber! and you have the video production workflow as follows:
Topic -> Title Ideas -> Thumbnail Ideas -> Script -> Record -> Edit -> Publish -> Promote.
💡 By the way, I am a YouTuber, and here is my Ad-Free Channel if you wanna take a look. I share videos to help you 10X your marketing and online business with the Power of AI, ChatGPT, Automation, and Python.
Anyway, this YouTube workflow usually takes an average of 10–30 hours, depending on the channel. For me, it takes around ~10 hours.
Let’s forget about recording and editing tasks for now, as they are out of scope in our case here; the other tasks will take like 3-5 hours.
So, in short, we want to cut down the time to 1 hour or less with the help of ChatGPT, and here are the main tasks that we have in our workflow:
Topic > Title Ideas > Thumbnail Ideas > Script > Promote.
Yeah, maybe you are right! But it is not the best approach. We want something more powerful and stable!
And Remember that we are talking about a specific scenario here (the YouTube workflow) with 4–5 tasks.
We may have 20, 50, or even 100 Tasks in other workflows and scenarios! I will show you another example later in this post.
So I don’t think you want to go to ChatGPT every time and Start Chatting and asking for 50 or 100 tasks. Memorize the same prompts; maybe ChatGPT is down sometimes. It will probably take more time than the manual process! 🧐
So the idea is to create what we call an “Automated-GPT-Chaining” Python Script.
If you didn’t hear about it, no worries. We are not using them here anyway 🙂
💡I am building a new GPT Library (Called OneShotGPT) I am planning to make it super powerful and super easy to use.Get notified When it is live by joining my newsletter here.
Running The Script
Let me show you the power of this simple chaining technique in this 28 seconds demo video:
The Power of this script
So What is behind this script?
There are 4 main aspects of this project:
1- Advanced Prompts
If you open the prompts.py file, you will find a list of prompts used. Feel free to customize and test if you want. These are the prompts used in our case to help generate ideas, script, and other stuff.
And these prompts must be customized based on your workflow (we will have an example later in this post)
You don’t need to go every time and ask ChatGPT for each task manually. Everything is automated in 1 click!
Since this Python script runs automatically, you will not worry about memorizing prompts, opening ChatGPT every time, and chatting with it. All this will be automated, and you will get the results in less than 30 seconds.
Here is the core part. If you check the main script file, you will see that we are chaining the outputs. For example, the output of the first task (title ideas) is the input of the second (thumbnail ideas).
And the output of the third task (script) is the input of the fourth task (creating a Twitter thread). And so on.
This idea is very important as we are automatically feeding the results and building on top of it!
Take a look at the code
This script is not written in the best way in terms of best practices. I made it like this to keep it simple for beginners. So anyone can edit and customize based on their specific workflow.
Setup The Script
It is very easy to set up and run this script. All you need to do is. Download the script files. Install python. Install required modules. And run!
1- Get The Script
2- Install Python
Go to Download Python | Python.org and download the setup file. Run it and make sure to tick the “Add Python to Path” checkbox.
3- Install the required modules.
Just open any terminal like Powershell or terminal inside visual studio code, and run the following command:
pip install openai
4- Set OpenAI API Key
Open the [chat_gpt_api.py] File, and paste the OpenAI key from your account.
5- Run the script file
In the downloaded project folder, you will find a batch file called “run-me.bat.” Double-click to see the magic.
Customize The Script.
In the prototype discussed above, we went through the Youtube production workflow.
What if you want to customize it for something else? Add more tasks?
Let’s see a simple example of how to do that.
Let’s say you are a blogger, and you have this workflow:
Topic -> SEO Optimized Titles -> Writing The Blog -> Convert Into Twitter Thread
First, you will need to change the prompts; for example, a prompt that generates SEO optimizer Titles is:
I want you to act as a professional blog title generator. Think of titles that are SEO optimized and attention-grabbing at the same time, and will encourage people to click and read the blog post. They should also be creative and clever. Try to come up with titles that are unexpected and surprising. Do not use titles that are too generic, or titles that have been used too many times before. I want to generate 5 to 7 titles maximum. My blog post is about [Topic]
And then change the main script file to use these prompts instead.
You may be thinking now. I need to learn Python, prompt engineering, and some other tech skills!
Why not! Come on; we are in 2023. Wake up!
And the good news is: I am here to help 🙂
Check my free courses on my YouTube Channel (No Disturbing Ads, No Signups). Just click and learn. You can thank me by sharing this post and helping others 🙂 And don’t forget to read the Quote Below ☟
Invest in your self. it is the best investment you will ever do!
If you have any questions, I am here to help, waiting for you in the comments 🙂
🟥Master the Most In-Demand Skill of the Future!
Enroll in the ‘Become a Prompt Engineer‘ program. We’ll take you from novice to expert in scripting AI workflows. Start your journey here!
What Will You Get?
- Access to our premium Prompt Engineering Course
- Access our private support forum to get help along your journey.
- Access to our Premium Tested Prompts Library.