99% Don’t Know This: Advanced ChatGPT Techniques
Master ChatGPT by learning prompt engineering.
I use ChatGPT every day, and I think you should try it too.
Why?
It’s amazing. Believe me, this tool will reduce your workload by at least half. Just give it a good prompt, and you’re all set.
Many people don’t use ChatGPT correctly.
They forget to give examples when asking questions.
They don’t realize they can guide ChatGPT’s responses using roles.
Instead of giving ChatGPT helpful details, they let it guess.
in this guide, we’ll learn 4 techniques used in prompt engineering.
Standard prompts with few examples
Few-shot standard prompts are like regular prompts, but with examples of the task included. Why examples? Adding examples boosts your chances of getting the result you want. They include a task description, examples, and the prompt. The prompt is where the model starts generating text to complete the task.
These are the parts of few-shot standard prompts.
To extract airport codes effectively, we often use standard prompts. However, in some cases, we need to employ few-shot standard prompts for better results. For example:
- Text: “I want to fly from Los Angeles to Miami.”
Airport codes: LAX, MIA - Text: “I want to fly from Nashville to Kansas City.”
Airport codes: BNA, MCI - Text: “I want to fly from Orlando to Boston.”
Airport codes:
Using these prompts ensures accurate extraction of airport codes from text, like “MCO, BOS” in the example provided.
Remember, what matters most from past studies isn’t the specific answers in the examples, but rather the range of possible labels, called the labelspace. Enhance your prompt results by including random labels from this labelspace.
Test it out by entering random airport codes. Here are some examples:
- Text: “I want to fly from Los Angeles to Miami.”
Airport codes: DEN, OAK - Text: “I want to fly from Nashville to Kansas City.”
Airport codes: DAL, IDA - Text: “I want to fly from Orlando to Boston”
Airport codes:
Even if you entered a different prompt, like “I want to fly from Orlando to Boston,” ChatGPT still gives you the correct airport codes: MCO and BOS.
Include random labels when providing examples, regardless of correctness. This improves results and guides the model on formatting answers.
Role Prompting
When ChatGPT doesn’t do what you need, you can guide it by giving a role. For example, if you want to practice a job interview, tell ChatGPT to “act as hiring manager” and add details. Then it can simulate any job interview.
As you can see, ChatGPT behaves like he’s interviewing me for a job position.
With ChatGPT, you can easily transform it into a language tutor for practicing Spanish or a movie critic to review any film. To give instructions to ChatGPT, just start your prompt with “Act as a…” followed by all the details you need.
Add character into your prompts and create information
Here are two effective ways to prompt ChatGPT for generating text like emails, blogs, stories, and articles.
1. Adding Personality to Prompts: This means giving a specific style and descriptors to the prompt. Style adds tone, formality, and domain expertise to the text.
For example, if you want a blog post about a topic, you can specify the writing style, such as:
“Write about [topic] in the style of an expert in [field] with over 10 years of experience.”
2. Using Descriptors: Descriptors are adjectives that further customize the output. Adding descriptors can dramatically change the generated text.
For example, if you want a blog post on AI replacing humans, instead of a generic prompt, you can add adjectives like:
“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 this example, using an AI expert’s style and adding words like clever and amusing gives our ChatGPT output a unique flair. This also makes it tricky for AI detectors to spot our text.
We can enhance the blog post by using a method called “generated knowledge.” This involves gathering useful information about a topic before creating the final response. For instance, before writing the post based on the previous prompt, we can first generate five facts about “AI will not replace humans.” Here are the facts:
1.
2.
3.
4.
5.
Using above template, Craft a clever 500-word blog post debunking the notion of AI replacing humans. Write in the voice of a seasoned AI expert. Use amusing anecdotes to illustrate your points.
Chain of Thought Prompting
In chain of thought prompting, the model breaks down its thinking process before answering, which can lead to better results. This method requires providing examples where the reasoning is explained along with the prompt. Here’s how it differs from standard prompting.
Clearly, when the model had to explain its reasoning to solve the math problem, it got better results. Remember, this way of prompting helps with math, common sense, and symbolic tasks.
Since GPT-4 is better at advanced reasoning, you might not always need Chain of Thought Prompting. Give it a try and see what works best for you. Here are 4 ways to access the new GPT-4.
Connect on LinkedIn by clicking here if you have any questions don’t hesitate to reach out.
Thanks for reading!