Langsung ke konten utama

You’re Using ChatGPT Wrong! Here’s How to Be Ahead of 99% of ChatGPT Users

 Most of us use ChatGPT wrong.


We don’t include examples in our prompts.

We ignore that we can control ChatGPT’s behavior with roles.

We let ChatGPT guess stuff instead of providing it with some information.



This happens because we mostly use standard prompts that might help us get the job done once, but not all the time.


We need to learn how to create high-quality prompts to get better results. We need to learn prompt engineering! And, in this guide, we’ll learn 4 techniques used in prompt engineering.


If you don’t feel like reading, you can watch my video below.



Few Shot Standard Prompts

Few shot standard prompts are the standard prompts we’ve seen before, but with examples of the task in them.


Why examples? Well, If you want to increase your chances to get the desired result, you have to add examples of the task that the prompt is trying to solve.


Few-shot standard prompts consist of a task description, examples, and the prompt. In this case, the prompt is the beginning of a new example that the model should complete by generating the missing text.


Here are the components of few shot standard prompts.



Image by author

Now let’s create another prompt. Say we want to extract airport codes from the text “I want to fly from Orlando to Boston”


Tenzin approaches the archway and examines the intricate carvings and runes, searching for any clues or hints about how to unlock the entrance to the hidden temple. As he studies the runes, he notices that some of the markings seem to be glowing more brightly than others.


After some careful observation, Tenzin notices that the glowing markings spell out a series of words in an ancient language. He recognizes the language as Draconic, a tongue spoken by dragons and other powerful creatures.


As Tenzin reads the words aloud, the runes begin to glow brighter and the archway trembles slightly. Suddenly, the archway rumbles and the stones shift, revealing a previously hidden doorway leading into the temple.


As the door opens, the party feels a rush of cold air emanating from the darkened tunnel beyond. The air smells musty and damp, hinting at the long-abandoned nature of the temple. You hear the faint sound of dripping water and rustling leaves, as well as the occasional hoot of an owl or scurry of a small animal.


The party stands before the entrance to the hidden temple, unsure of what lies ahead but determined to uncover its secrets.


the party full heartedly goes inside


The party enters the darkened tunnel beyond the entrance of the hidden temple, with Obie casting Light to illuminate the way. The tunnel is damp and cold, and the air feels heavy and thick with age. The walls and floor are made of rough stone, covered in layers of moss and cobwebs.


As you move deeper into the temple, you come across a large chamber with a raised platform at the far end. The chamber is filled with rows of stone pillars, each one intricately carved with symbols and figures. The platform appears to be a dais, and atop it sits a large stone altar with a circular indentation in its center.


As you approach the platform, you notice that the circular indentation glows with a faint, pulsing light. The light seems to be emanating from within the altar itself, and it casts eerie shadows across the room.


You may explore the chamber and examine the pillars and altar for clues or hidden mechanisms, or attempt to use your skills or abilities to uncover the secrets of the temple. Let me know how the party would like to proceed and if there are any specific actions they would like to take.

If you tried the previous prompt on ChatGPT, you’ll still get the right airport codes MCO and BOS.


Whether your examples are correct or not, include random labels from the labelspace. This will help you improve results and instruct the model on how to format the answer to the prompt.


Role Prompting

Sometimes the default behavior of ChatGPT isn’t enough to get what you want. This is when you need to set a role for ChatGPT.


Say you want to practice for a job interview. By telling ChatGPT to “act as hiring manager” and adding more details to the prompt, you’ll be able to simulate a job interview for any position.



Image by author

As you can see, ChatGPT behaves like he’s interviewing me for a job position.


Just like that, you can turn ChatGPT into a language tutor to practice a foreign language like Spanish or a movie critic to analyze any movie you want. In this article, I dive more into how to turn ChatGPT into your language tutor or language buddy.


You only need to start your prompt with the words “Act as a … ” and then add as many details as possible. If you need some inspiration, check this repository where you’ll find prompts to make ChatGPT behave like a stand-up comedian, doctor, and more.


Add personality to your prompts and generate knowledge

These two prompting approaches are good when it comes to generating text for emails, blogs, stories, articles, etc.


First, by “adding personality to our prompts” I mean adding a style and descriptors. Adding a style can help our text get a specific tone, formality, domain of the writer, and more.


Write [topic] in the style of an expert in [field] with 10+ years of experience.


To customize the output even further we can add descriptors. A descriptor is simply an adjective that you can add to tweak your prompt.

https://eyeofthestormofficemojohd.statuspage.io/

https://bloodkarmafullversionchinesezh.statuspage.io/

https://bloodkarmafullversiontaiwanhdq.statuspage.io/

https://backlinktool.io/p/RDpF2lGjdBlM6JcbD3Ly.html

https://bloodkarmahdmovietwq.statuspage.io/

https://blood-karma-hd-onlinehk.statuspage.io/

https://blood-karma-hd-full-free.statuspage.io/

https://bloodkarmafullversiontaiwan.statuspage.io/

https://blood-karma-hd-full-hongkong.statuspage.io/

https://blood-karma-hd-full-movies.statuspage.io/

https://eye-of-the-storm-office-movies.statuspage.io/

https://foreveryouhdmoviehongkong.statuspage.io/

https://foreveryouhdmoviehongkong1.statuspage.io/

https://watch-forever-young-tw-online-hongkong.statuspage.io/

https://note1s.com/notes/MZOQBRW

https://foreveryoufullfreehdhk.statuspage.io/

https://watch-forever-young-tw-online-beijing.statuspage.io/

https://foreveryoufullfree4k.statuspage.io/

https://bitbin.it/wgbR479i/

https://foreveryoufullonlinehd.statuspage.io/

https://paste.azago.in/X2yWPlZbF0

https://ivpaste.com/v/Wq86G6GLlX

https://forever-young-tw-online-chinese.statuspage.io/

https://yamcode.com/dadad-3220

https://pastelink.net/1pg3f51n

Say you want to write a 500-blog post on how AI will replace humans. If you create a standard prompt with the words “write a 500-blog post on how AI will replace humans,” you’d probably get a very generic post.


However, if you add the adjectives such as inspiring, sarcastic, intriguing, and entertaining, the output will significantly change.


Let’s add descriptors to our previous prompt.


Write a witty 500-blog post on why AI will not replace humans. Write in the style of an expert in artificial intelligence with 10+ years of experience. Explain using funny examples


In our example, the style of an expert in AI and adjectives such as witty and funny are adding a different touch to the text generated by ChatGPT. A side effect of this is that our text will be hard to detect by AI detectors (in this article, I show other ways to fool AI detectors).


Finally, we can use the generated knowledge approach to improve the blog post. This consists in generating potentially useful information about a topic before generating a final response.


For example, before generating the post with the previous prompt we could first generate knowledge and only then write the post.


Generate 5 facts about “AI will not replace humans”


Once we have the 5 facts we can feed this information to the other prompt to write a better post.


# Fact 1

# Fact 2

# Fact 3

# Fact 4

# Fact 5


Use the above facts to write a witty 500-blog post on why AI will not replace humans. Write in the style of an expert in artificial intelligence with 10+ years of experience. Explain using funny examples


In case you’re interested in knowing other ways to improve your posts using ChatGPT, check this guide.


Chain of Thought Prompting

Unlike standard prompting, in chain of thought prompting, the model is induced to produce intermediate reasoning steps before giving the final answer to a problem. In other words, the model will explain its reasoning instead of directly giving the answer to a problem.


Why is reasoning important? The explanation of reasoning often leads to more accurate results.


To use chain of thought prompting, we have to provide few-shot examples where the reasoning is explained in the same example. In this way, the reasoning process will also be shown when answering the prompt.


Here’s a comparison between standard and chain of thought prompting.



Source: Google Research

As we can see, the fact that the model was induced to explain its reasoning to solve this math problem led to more accurate results in chain of thought prompting.


Note that chain of thought prompting is effective in improving results on arithmetic, commonsense, and symbolic reasoning tasks.


Update: GPT-4 was released after publishing this article. GPT-4 outperforms old ChatGPT in advanced reasoning capabilities, so you may or may not need Chain of Thought Prompting in GPT-4. I encourage you to test it yourself. Here are 4 ways to access the new GPT-4.


Artificial Corner’s Free ChatGPT Cheat Sheet

We’re offering a free cheat sheet to our readers. Join our newsletter with 20K+ people and get our free ChatGPT cheat sheet.


If you enjoy reading stories like these and want to support me as a writer, consider signing up to become a Medium member. It’s $5 a month, giving you unlimited access to thousands of Python guides and Data science articles. If you sign up using my link, I’ll earn a small commission with no extra cost to you.


Komentar

Postingan populer dari blog ini

My kids and I just played D&D with ChatGPT4 as the DM

 My kids and I just played D&D with ChatGPT4 as the DM My two oldest kids Taylor Anne and Liam, are 26 and 23 (respectively). My youngest son Tenzin is 15 years old. All of us are together at my house in Mexico City this week, and the discussion topic generating the most heat is OpenAI and GPT4. Since Tenzin has been playing tabletop RPG games like D&D for years and has a lot of experience as a DM, we discussed playing a campaign together. But then Tenzin had the bright idea of letting ChatGPT be the DM. What follows in this blog post is the transcript of the game that we played. Where we tell ChatGPT that we rolled dice, we are using Google’s die roll mechanism. I feel like the transcript speaks for itself, but before reproducing it I will state for the historical record that my mind is still exploding from from all the inevitable innovation and legal controversies this kind of usage of LLM (Large Language Model) technologies will provoke in the coming months and years. Softwa

March Madness: Relationships and Basketball have a lot in Common

 Co-authored with  Robin Stern, PhD ’Tis the season for March Madness, and we don’t mean just basketball. A lesser-known use of the phrase popularized in the early 1900s is in reference to “a form of madness or uncharacteristic behavior said to affect people in March”. For anyone on the East coast familiar with — and, not a fan of — the inclement shifts in weather and lingering dark days of winter, this makes sense. And there is no shortage of research indicating that simply surviving the bleakest time of year is a feat of mind, body, and spirit. But when this madness bleeds into our relationships, as it inevitably can, it is important to know how you can regulate the burgeoning restlessness of early Spring and cultivate healthier connections. And for those of you who just can’t think about March Madness without basketball — take this opportunity to think about what basketball and relationships have in common: practicing necessary skills and good form to move both forward; remembering