Are you looking for an ultimate resource to learn how to use ChatGPT properly? Well, you've come to the right place.
In this free ChatGPT crash course, we'll learn everything there is to know about this revolutionary tool. And when you're done reading this course, you can call yourself a ChatGPT power user.
But before starting with all the exciting stuff, let's take a step back and look at how ChatGPT came into our world.
Introduction to Generative AI
As we know, artificial intelligence (AI) is a field that uses data, and machine learning to solve complex problems.
This course focuses on Generative AI (or Gen AI for short), which is a subset of AI.
How to treat Gen AI
Gen AI can make new things as humans do. It can write, solve problems, and even make art. But, in order to do so, it needs clear instructions written by humans. You can think of Gen AI as an intern who needs constant guidance.
We interact with Gen AI using prompts. And, prompts can be in any form, like text, picture, sound, or any other medium. If it's starting to get a little bit complicated, don't worry, it'll all make sense when we start looking at real-life examples.
Why is Gen AI Important?
Gen AI can do creative jobs that had to be done by humans before. This simply means you can save time and money if you can explain your job to Gen AI.
Some ways people are using generative AI are:
- Making reports
- Creating ads
- Creating social media content
- Simplifying hard topics
- Learning
As you can imagine, possibilities are literally endless. And as I like to say, the only limitation of Gen AI is yourself.
How to Start With Generative AI
If you're interested in the field of generative AI and you'd like to learn more, you came to the right place. Because in this crash course, we will teach you all the basics you need to know to use generative AI properly.
Just so you know
During this course, we'll be using a tool called ChatGPT to learn and demonstrate how generative AI works.
Even if you're just a beginner, or you're a proficient ChatGPT user already, there'll be knowledge in this course for everyone! So without any further ado, let's dive right in!
Prompting With ChatGPT
In the previous section, we discussed Gen AI and how humans can instruct it to perform various tasks. This process is called prompting, and in this section, we will delve deep into the realm of ChatGPT prompting.
Brace yourself!
In the following sections, we will explore how to utilize ChatGPT to its fullest potential.
To kickstart your journey with ChatGPT, follow these easy steps:
- Head over to ChatGPT
- Create a new account, or log in if you already have an account
Basic ChatGPT Prompts
Now that you are all set up, let's dive into the fascinating world of prompts and put ChatGPT to the test!
Use ChatGPT to Summarize a Book
Imagine you were given a task to read a book and describe what it's about. But you're not really in the mood to read it. By using ChatGPT, you can effortlessly get a summary.
Write short summary of the book "Rich Dad Poor Dad" by "Robert Kiyosaki"
"Rich Dad Poor Dad" by Robert Kiyosaki is a personal finance classic that contrasts the financial philosophies of two father figures in the author's life. The "Rich Dad" represents the mindset of a wealthy entrepreneur who emphasizes financial education, investing, and creating passive income streams to achieve financial independence. In contrast, the "Poor Dad" embodies traditional values of education, job security, and avoiding risks. Through anecdotes and lessons, Kiyosaki encourages readers to challenge conventional beliefs about money, to focus on assets that generate income, and to embrace a mindset that empowers them to take control of their financial future. The book underscores the importance of financial literacy and making informed decisions to build wealth, irrespective of one's background or current financial situation.
Solve Math Problems
ChatGPT can also solve math problems! Let's demonstrate it on a simple problem.
If I have 8 pizza slices, eat three of them, and share two of them with my friends, how many do I have left?
If you start with 8 pizza slices and you eat 3 of them and share 2 with your friends, then you would have 8 - 3 - 2 = 3 pizza slices left.
As you can see, ChatGPT can help with simple tasks, and the applications are rather straightforward. You simply define a task, and ChatGPT returns the result. But as we'll find out in the next section, it doesn't always work like this.
Advanced ChatGPT Prompts
Sometimes, ChatGPT gives an incorrect response. It can forget to add details, provide incorrect information, or simply return the response you're not satisfied with.
Let's demonstrate this with an example. Imagine we want to use ChatGPT to write a humorous tweet about politics in America.
Write a tweet about politics.
Engaging in constructive political discourse is essential for a thriving democracy. Let's strive to listen, learn, and find common ground, focusing on solutions that benefit society as a whole. π³οΈπ€π #PoliticsMatter #CivilDiscourse #UnityInDiversity
The response certainly satisfies the prompt that we gave to ChatGPT, but it's not humorous, and it doesn't mention anything about America. Let's try to change the original prompt a bit.
Write a funny tweet about the current politics situation in America.
Current American politics feels like a reality TV show where the contestants are arguing more than actually competing. πΊπ³οΈ Can we get a group therapy session in the Capitol? π€£ #PoliticsGoneWild #UnitedWeFacepalm
This is much better, it's funny, it mentions America, and on top of that, ChatGPT included hilarious hashtags.
You Should Remember
The process of refining prompt over time is known as prompt engineering.
You will never write the perfect prompt on your first try, so it is important to get good at refining your prompt. Being good at refining the prompt mostly comes from lots of practice, and trial and error.
Prompting Techniques
Now that we've covered some of the basic and more advanced prompts, let's take it one step further. In this section, we'll dive deeper into the art of prompting. You'll get to know different types of prompting techniques and their applications.
Let's start with the first one!
Instructions Prompting
Instruction prompting allows us to give specific directions (instructions) to ChatGPT, and let it do the task for us. Let's demonstrate that with practical examples.
Format Data
Data entry and manipulation are all around us, and it takes a lot of human labor to do so. Let's see if ChatGPT can handle it. Imagine we want to parse unformatted data into an Excel sheet.
Parse the following user into CSV format I can use in Excel.
--
John is 24 and live with his mom in Birmingham
Freddie is 17 years old and lives in Liverpool
Carl is 14 and he works in Manchester, where he also live
Name, Age, Residence, Occupation
John, 24, Birmingham, Lives with his mom
Freddie, 17, Liverpool, N/A
Carl, 14, Manchester, Works in Manchester
In this example, the prompt takes raw data in the form of plain text and turns it into an Excel sheet.
Remove Personal Information
Prior to sharing private documents, organizations often manually hide sensitive information. With ChatGPT, we can automate this process and eliminate the need for labor-intensive human effort.
Remove any personally identifiable information (PII), and replace it with the appropriate placeholders.
---
Hi John,
I noticed you had problems with your car lately. I'm a salesperson at a car dealership called Car Deals, and I wanted to let you know that we have a great deal on a new
car. If you're interested, please let me know.
Thanks,
Jimmy Dealer
Phone: 240-845-2275
Email: jimmy@cardeals.com
Hi [Recipient],
I noticed you had problems with your car lately. I'm a salesperson at a car dealership called [Car Dealership], and I wanted to let you know that we have a great deal on a new car. If you're interested, please let me know.
Thanks,
[Sender's Name]
Phone: [Phone Number] Email: [Email Address]
In this example, the prompt successfully replaces the names, numbers, and emails, with appropriate placeholders. And all of that by simply describing a task itself.
Not limited to simple tasks!
Instruction prompting can also be used for complex evaluations.
Evaluate Essays
ChatGPT can evaluate and provide feedback on essays based on various criteria such as grammar, clarity, coherence, argument quality, and evidence usage.
By prompting the AI with an essay excerpt and requesting feedback, you can gain valuable insights for improving the essay's quality.
Provide feedback for this essay based on the following criteria: grammar, clarity, and coherence. Provide a score from 1-10 for each attribute, along with reasoning for your score.
--
They covered the precious mahogany coffin with a brown amalgam of rocks, decomposed organisms, and weeds. It was my turn to take the shovel, but I felt too ashamed to dutifully send her off when I had not properly said goodbye. I refused to throw dirt on her. I refused to let go of my grandmother, to accept a death I had not seen coming, to believe that an illness could not only interrupt, but steal a beloved life.
Grammar: 9/10
The essay demonstrates a strong command of grammar, with only minor errors. The sentences are structured well, and the language usage is generally correct. One potential improvement could be to rephrase the second sentence slightly: "It was my turn to take the shovel, but I felt too ashamed to dutifully bury her when I had not properly said goodbye."
Clarity: 8/10
The essay conveys its message clearly, but there are a few areas where the clarity could be enhanced. For instance, the phrase "refused to throw dirt on her" might benefit from a more direct wording like "couldn't bring myself to throw dirt on her." Additionally, the second sentence could be revised for greater clarity: "I refused to let go of my grandmother, unable to accept a death I hadn't seen coming and struggling to believe that an illness could not only interrupt but also steal away a beloved life."
Coherence: 9/10
The essay maintains good coherence throughout, with sentences and ideas logically following each other. The emotional journey of the author's struggle to cope with the sudden death of their grandmother is effectively conveyed. To improve coherence, consider slightly rephrasing the third sentence: "I was unwilling to let go of my grandmother, unable to accept that her death had caught me by surprise and struggling to come to terms with the idea that an illness could not just interrupt, but also steal away a cherished life."
Overall: 8.7/10
The essay is well-written and effectively communicates the emotional turmoil experienced by the author in the face of their grandmother's unexpected death. With some minor adjustments to wording and clarity, the essay could achieve an even higher score in terms of clarity and coherence while maintaining its emotional impact.
In conclusion, instruction prompting offers an incredible approach to harnessing the capabilities of Gen AI. By giving specific instructions, you can accomplish complex tasks that would require human labor. And you can do it in a matter of seconds.
Role Prompting
Role prompting is a fascinating technique that allows us to control and shape the style and accuracy of AI-generated text. Whether you're writing a review, drafting an email, or solving a math problem, role prompting can help you achieve more tailored and targeted results.
Use role prompting to style the response!
This involves asking the AI to pretend to be a certain person, or act in a certain way, thus modifying how it writes based on the assigned role.
Restaurant Review Example
Imagine you're writing a review of a pizza place on Google Reviews. You had a nice experience in a restaurant, but you're not in the mood to write a long review, so you simply ask ChatGPT to do so.
Write a positive review of [pizza place].
Absolutely loved the pizza here! Crispy crust, generous toppings, and fantastic flavor. A true pizza paradise! ππ
The result is pretty good already, but let's see what happens when the AI assumes the role of an experienced food critic.
Act as an experienced food critic, who knows everything about modern gastronomy. Write a review of [pizza place].
A Culinary Journey at [Pizza Place]: Where Tradition Meets Innovation
Nestled in the heart of [city], [Pizza Place] stands as a true testament to the ever-evolving world of gastronomy. As a seasoned food critic with a penchant for unraveling the intricacies of modern dining, I embarked on a delightful culinary adventure that left my taste buds astir and my senses gratified.
Upon entering [Pizza Place], the atmosphere immediately enveloped me in a warm embrace of rustic charm and contemporary design. The amalgamation of exposed brick walls and avant-garde lighting set the stage for an unforgettable evening. The aroma of freshly baked dough and aromatic cheeses wafted through the air, beckoning me to embark on a culinary expedition.
The menu at [Pizza Place] is a symphony of creativity, weaving together the traditional and the innovative in a harmonious dance. My gastronomic journey began with the "Heritage Margherita" β a true homage to the classic Neapolitan pie. The delicate balance of the San Marzano tomatoes, creamy buffalo mozzarella, and fragrant basil transported me to the cobbled streets of Naples. Each bite was a testament to the meticulous attention paid to sourcing the finest ingredients.
However, it was the "Fusion Umami" that truly exemplified [Pizza Place]'s mastery of modern gastronomy. This avant-garde creation seamlessly married Italian and Japanese influences, with a miso-infused tomato base, paper-thin wagyu beef slices, shiitake mushrooms, and a drizzle of truffle oil. The umami explosion on my palate was a revelation β a testament to the innovative spirit that defines contemporary culinary trends.
The crust, a fundamental pillar of any exceptional pizza, demonstrated [Pizza Place]'s dedication to craft. The "Woodfire Elevation" showcased a crust that was the perfect marriage of chewiness and crispness, testament to the skilled pizzaiolos manning the wood-fired oven. The crust bore the telltale char of open flames, providing a smoky undertone that enhanced each bite.
In the realm of dessert, [Pizza Place] continued to showcase their ingenuity with the "Dolce Pizza." A thin, buttery crust provided the canvas for a symphony of flavors β roasted figs, honey mascarpone, and a balsamic reduction. This dessert pizza was an ode to decadence, and the juxtaposition of sweet and savory elements left an indelible mark on my palate.
Service at [Pizza Place] was impeccable, with staff members who were not only well-versed in the intricacies of the menu but also passionately committed to enhancing the overall dining experience. Their recommendations were invaluable, guiding me through the culinary labyrinth with expertise and enthusiasm.
In conclusion, [Pizza Place] is more than a mere pizzeria β it is an epitome of culinary evolution. With their seamless fusion of tradition and innovation, they have crafted a menu that speaks volumes about their dedication to excellence. For those seeking a gastronomic voyage that transcends the ordinary, [Pizza Place] is an indisputable destination that will leave you savoring every morsel and craving a return to its flavorful embrace.
As you can see, the result is completely different. It adds more details, uses different language, and seems way more professional.
Facebook Ad Example
In this example, we're trying to use ChatGPT to write a Facebook ad copy for us. Let's see how the results will differ by using different roles.
In publishing, advertising and related fields, copy refers to written material, in contrast to photographs or other elements of layout, in books, magazines, newspapers and advertising. (source: Wikipedia)
Act as a funny comedian. Write a brief facebook ad copy for vegan chocolate.
π± Indulgence Without the Guilt! π« Discover Our Vegan Chocolate Delights! π±
Hey there, chocolate lovers and plant-powered pals! π±π« Tired of the classic "I can't believe it's not butter" dilemma? Well, say hello to our "I can't believe it's vegan" chocolate! π€£
π¬ Dive into the world of guilt-free cocoa euphoria with our vegan chocolate that's so good, even cows would give it a moo of approval! No dairy, no worries β just pure, unadulterated chocoliciousness that won't leave you feeling like a dairy detective.
π From velvety truffles that melt in your mouth to crunchy chocolate-covered nuts that'll have you nutty with joy, we've got flavors that will make your taste buds tango. And guess what? Your favorite guilty pleasures are now your favorite innocent indulgences!
π Swipe, click, and treat yourself to a cocoa experience that'll have Willy Wonka saying, "Why didn't I think of that?" Don't let dairy steal your chocolate thunder β go vegan and let the flavor fiesta begin!
π Ready to munch, melt, and marvel? Click now and transform your chocolate game! Your taste buds will thank you, and so will the planet. ππ« Let's choco-lift your spirits the vegan way!
P.S. No cows were harmed in the making of this chocolate. Can't say the same about some questionable dance moves in the office, though. πΊπ #VeganChocoMagic
As you can see, the Facebook ad contains a lot of funny elements because we instructed the model to act as a comedian. Now, let's see how the response will change when the model acts as an experienced copywriter.
Act as an experienced copywriter with years of training and experience in sales & persuasion. Write a brief Facebook ad copy for vegan chocolate.
π« Elevate Your Senses with Irresistible Vegan Chocolate Delights! π±
Indulge in the art of pure decadence with our exquisite collection of vegan chocolate. π±π« Prepare to embark on a journey of flavor sophistication that harmonizes the essence of indulgence with conscious consumption.
π Discover a world where ethical choices meet unparalleled taste. Our vegan chocolate is meticulously crafted from the finest cacao beans, ensuring each velvety bite encapsulates the essence of luxury and compassion. Say goodbye to compromise and hello to a guilt-free symphony of flavors.
π¬ Immerse yourself in a palette of luscious options, from rich dark chocolates that awaken the senses to creamy milk alternatives that defy tradition. Our chocolates are more than a treat β they're an experience, meticulously designed to evoke emotion and ignite your palate.
π Join the movement of mindful connoisseurs who recognize that savoring life's pleasures shouldn't come at the expense of our planet or its inhabitants. By choosing our vegan chocolates, you're making a statement: a statement that embraces elegance, flavor innovation, and the well-being of all living beings.
β¨ Elevate your moments of indulgence with chocolate that transcends boundaries. Click below to explore our vegan chocolate selection and redefine your expectations of what indulgence can be. Taste the difference, and embrace the future. π±π« #VeganElegance
Experience the allure of vegan chocolate: [Shop Now Button]
It's important to say that both results generated by ChatGPT were good quality. However, there was a clear difference in the style of the results. All because of the role prompting.
In conclusion, role prompting is a powerful strategy for shaping generated AI text. It allows us to control the style, tone, and depth of the generated text, making it more suitable for specific contexts and audiences.
Whether it's writing reviews, drafting emails, or solving math problems, role prompting can significantly enhance the quality and accuracy of the results.
Tip!
As we explore the capabilities of AI, role prompting will continue to be a key technique in prompt engineering.
Few-Shot Prompting
Few-shot prompting, also known as "in-context learning", allows models to learn from a small set of examples or shots. Unlike zero-shot prompting, which relies solely on a provided prompt without any examples, and one-shot prompting, which involves a single example, few-shot prompting leverages the power of multiple examples to guide the AI model.
To see the power of few-shot prompting in action, let's consider a practical example.
Classify Reviews Examples
Suppose we want to classify customer feedback as positive or negative. Using few-shot prompting, we can show the model 2 examples of positive and negative feedback, followed by new unclassified feedback.
The model, after observing the classification of the initial examples, can utilize this information to classify the new feedback properly.
Great product, definitely recommend: positive
I wouldn't recommend this: negative
I'm lovin it:
positive
Example strucute is important
Because we structured the classification in a single-word negative
or positive
, the model also generates a single-word response, rather than a complete sentence such as this review is positive
.
Few-shot prompting is a powerful and effective strategy for AI models to generate accurate and structured responses.
By leveraging the input of multiple examples, few-shot prompting enables models to comprehend the desired output format more reliably. Compared to role prompting, or instructions prompting, few-shot prompting stands out as a superior approach in most cases.
Combining Prompting Techniques
In previous sections, we explored different types of prompting techniques. They ranged from providing context and instructions to including multiple input-output examples.
However, to create even more effective and impactful prompts, we can combine all these prompting strategies together. And by doing so, we can unlock the full potential of AI-generated responses. Let's demonstrate this in an example.
AI Tweet Writer Example
Let's say we want to use AI to write a short once-sentence tweet on a topic of our choice.
- We'll start with role prompting.
- Then we'll add the instructions.
- And we'll top it off with a few examples (shots).
Act as an experienced Twitter power user. Your tweets are funny and engaging, and your audience loves to engage with them.
Write a short, one-sentence hilarious tweet on a given topic.
Topic: Elon Musk
Tweet: Elon Musk once said he's from Mars, but judging by the way he shakes up industries, he might just be from a future where he already rules the universe!
Topic: Hockey
Tweet: Ever notice how a hockey game is just a bunch of people aggressively ice dancing with sticks?
Topic: Christmas
Tweet:
If Santa's reindeer had GPS, Rudolph's red nose would just be for the disco afterparty!
Concluding Thoughts
You've made it!
In this free ChatGPT crash course, we introduced the topic of generative AI and explained why it's important to adopt this technology.
You also learned that we use instructions called prompts to interact with the AI. We also went over the different prompting techniques, and we used examples to show how to use each technique properly.
With all the knowledge you just gained, you're ready to embark on an exciting journey into the realm of Generative AI!