7 Game-Changing Prompting Techniques from Meta (Wait Until You See the Final One!) Nov. 7, 2024
7 Game-Changing Prompting Techniques from Meta (Wait Until You See the Final One!)

“Innovation distinguishes between a leader and a follower.” Steve Jobs

Like Steve once said, if you’ll adapt innovation to your world, you might be a leader one day.

In this article, I’ll share 7 prompting techniques, which were shared by Meta and definitely will change how you write your prompts. Let’s start!

 

Bitcoin & Ethereum prices (2014–2024)

 

 

Reference

For this article, we’ll use the dataset above from kaggle which consist of ETH and BTC prices.

SS from Kaggle’s dataset

1. Explicit Instructions

 

 

Photo by Dave Lowe on Unsplash

For this technique, you have to provide clear and detailed instructions to make sure the model response well.

Let’s see the prompt and what we did inside.

Prompt ExampleAnalyze the BTC-USD and ETH-USD datasets to identify trends in price changes over time. Summarize the trends in one short sentence for each dataset, including a reference to the starting and ending prices. Ensure that your response does not exceed 20 words per dataset. Additionally, provide one key insight about what might be influencing these trends.”

  • Explicit Instructions: The task is clearly defined: analyze the datasets for trends.
  • Stylization: The response is restricted to one short sentence per dataset.
  • Restrictions: The instruction limits the response to no more than 20 words per dataset.
  • Enhancement: Asking for starting and ending prices and a key insight adds context and value to the output.

Here is the output.

SS of the output

 

2. Zero-shot Learning and Few-shot Learning

 

 

Photo by Tim Mossholder on Unsplash

Let’s do it one by one.

a) Zero-shot learning

Zero shot learning means you did not provide anything that will help the model. This is entry level of prompting.

Prompt ExampleAnalyze the BTC-USD dataset to identify any significant patterns or anomalies in the price changes over the past 5 years.”

Here is the output.

SS of the output

 

b) Few-shot learning

To help model, provide examples. Few-shot means few examples, get it? Let’s see.

Prompt Example: *”You are a data analyst tasked with identifying factors that influence price volatility in the BTC-USD and ETH-USD datasets. For each case, provide a possible factor that could explain the observed volatility based on the data:

  • Case: ‘BTC price dropped sharply in March 2020.’ \nResponse: Likely factor: Global market panic due to the COVID-19 pandemic.
  • Case: ‘ETH price spiked in May 2021.’ \nResponse: Likely factor: Increased interest in decentralized finance (DeFi) applications.
  • Case: ‘[User’s case].’ \nResponse:”*

Here is the answer;

 

SS of the Output

3. Role Prompting

 

 

Photo by engin akyurt on Unsplash

If you have developed a few prompts you might be familiar with a term of “Act like”. This will help model to follow a personality.

Prompt ExampleAct like a financial analyst specializing in cryptocurrency markets. Analyze the ETH-USD dataset and provide an assessment of the price volatility over the last two years. Explain the potential risks and benefits for investors considering the historical volatility data.”

Here is the output.

SS of the Output

4. Chain-of-Thought

 

 

Photo by Akinori UEMURA on Unsplash

At this step, you will lead the model the way. It is like giving a map to model to follow.

Prompt Example: Analyze the attached BTC-USD and ETH-USD datasets. Follow these steps:

  1. Data Exploration: First, perform data exploration by summarizing key statistics, including mean, median, and standard deviation of prices, and identify any missing values or anomalies.
  2. Data Visualization: Next, create data visualizations such as line plots and histograms to uncover patterns and relationships in the data, such as trends over time and distribution of returns.
  3. Data Modeling: Finally, conduct data modeling by applying relevant algorithms (e.g., linear regression, ARIMA) to predict future price movements or categorize data points based on historical patterns.

Execute each step one by one, and present the results after completing each step. Ask for approval before proceeding to the next step.

Here is the output’s first two part.

 
 

SS of the output

Data Modeling includes more then 1 image , so I leave this one for you.

5. Self-Consistency

 

 

Photo by Eric Prouzet on Unsplash

Which one is the best? You can guess but before seeing the result you can not be sure. With this method, you force model to choose the best one after creating a multiple response.

Prompt Example“You are analyzing the BTC-USD and ETH-USD datasets to predict the closing prices for each day over the next week. Generate multiple predictions for each day using different approaches or models (e.g., linear regression, moving averages, and ARIMA). After generating these predictions, identify the prediction that appears most frequently or is closest to the average prediction for each day, and present this as your final prediction.”

Explanation:

  • Multiple Predictions: The prompt asks the model to generate multiple predictions using different approaches or models, simulating different reasoning paths.
  • Consistency Selection: Instead of explicitly mentioning “self-consistency,” the prompt guides the model to identify the most consistent prediction.(Wang et al. (2022))

Here is the output.

 

SS of the output

 

6. Program-Aided Language Models

 

 

Photo by Zach Graves on Unsplash

 

ChatGPT is really bad at math, but if you force it to use Python to calculate it, it will be the best!

Prompt Example“You need to calculate the daily returns for BTC and ETH based on the provided datasets. Write a Python function to compute the daily returns, and then apply this function to both the BTC-USD and ETH-USD datasets. Provide the results in a new column for each dataset.”

Explanation:

  • Code Generation: The model generates a Python function to calculate daily returns based on the historical price data in the datasets.
  • Application: The function is applied to the datasets, adding a new column with the computed daily returns, showcasing how PAL can automate data processing tasks.

Here is the output.

SS of the output

7. Retrieval-Augmented Generation

 

 

Photo by Derek Laliberte on Unsplash

Let’s use the power of browsing, because ChatGPT might not be updated and you should use updated information.

Prompt Example“Using the BTC-USD and ETH-USD datasets, predict the prices for the first week of February 2024. After generating these predictions, browse the web to find the actual prices for BTC and ETH during that period. Add the actual prices to the dataset and compare them with your predictions, analyzing any discrepancies.”

Explanation:

  • Prediction: The model first generates predictions based on historical data from the dataset.
  • Retrieval: After making the predictions, the model would simulate browsing the web (I would actually do this part) to retrieve the actual prices for the specified dates.
  • Comparison: The model then compares the predicted prices with the actual prices, providing insights into the accuracy of the prediction and possible reasons for any discrepancies.

Here is the output.

 

SS of the Output

Final Thoughts

 

In this article, we’ve explored 7 different techniquest, that have been discovered and also suggested by Meta.

If you use one of those techniques, you probably going to use ChatGPT at least 2–3 times more efficient then a regular user.

Here is our prompt technique cheatsheet, which was developed with the knowledge from this article. More over if you want to see more, be a paid subscriber for just $7 for a month on substack. Over there, here are the agents you’ll reach;

LearnAIWithMe Agents

 

Here are the AI projects ,you’ll reach;

LearnAIWithMe AI Projects

Also you’ll reach series to #LearnAI where you learn AI, #JobHuntAI, where you learn how to land job with AI and #WeeklyAIPulse, to sync with AI.

Here are the free resources.

Here is the Prompt Techniques cheat sheet.

Here is the ChatGPT cheat sheet.

Here is my NumPy cheat sheet.

Here is the source code of the “How to be a Billionaire” data project.

Here is the source code of the “Classification Task with 6 Different Algorithms using Python” data project.

Here is the source code of the “Decision Tree in Energy Efficiency Analysis” data project.

Here is the source code of the “DataDrivenInvestor 2022 Articles Analysis” data project.

 

“Machine learning is the last invention that humanity will ever need to make.” Nick Bostrom

 

 

Copyright © Learn AI With Me All Rights Reserved