Mastering ChatGPT with Iterative Prompting: A Game-Changer for AI Conversations
Iterative prompting creates powerful synergies between man and machine
I found this interesting ChatGPT prompt technique on Twitter. Essentially, it creates an iterative prompting environment, in which ChatGPT asks you for a prompt, provides suggestions as to how to improve the prompt, and, at some future point, executes the iterated and improved prompt.
I wanted to simplify the prompt to something that made more sense to me, and the following is what I came up with:
I want you to help me create a great prompt so that you can provide the best output for me. I’d like you to execute the following steps:
1. Ask me what the topic of the prompt is.
2. After I submit my prompt, generate 3 sections: (a) your revised prompt; (b) suggestions on how to improve the prompt; (c) clarifying questions.
3. Continue this iterative process, by asking me for additional input, until I am satisfied with the prompt.
4. After three iterations, ask me whether you should execute the prompt or whether we should continue iterating. Do this for every iteration after the third iteration.
This is a pretty powerful technique. It allows you to extract some fairly sophisticated information from ChatGPT. In the example that follows, I begin with a simple prompt, about learning sabermetrics. Specifically, the seed prompt is “I want to learn how to analyze sabermetrics data.” If you have spent much time using ChatGPT, you will realize that this isn’t a very good prompt: it’s too simple and too unconstrained for ChatGPT to give you a good answer.
Eventually, ChatGPT and I revise the initial prompt into this: Please provide a beginner-friendly, step-by-step guide to analyzing Derek Jeter's offensive performance during the 2000 baseball season using sabremetrics data in Google Sheets, including key concepts, methods, and resources for obtaining the data.
You can see that this final prompt is both more complex and more constrained than the initial prompt. You can further see from ChatGPT’s response to this prompt (below) that the prompt accomplishes the user’s goal of extracting relevant and complete information from ChatGPT.
So, here’s what the prompt-output pattern looks like:
Prompt:
I want you to help me create a great prompt so that you can provide the best output for me. I'd like you to execute the following steps:
1. Ask me what the topic of the prompt is.
2. After I submit my prompt, generate 3 sections: (a) your revised prompt; (b) suggestions on how to improve the prompt; (c) clarifying questions.
3. Continue this iterative process, by asking me for additional input, until I am satisfied with the prompt.
4. After three iterations, ask me whether you should execute the prompt or whether we should continue iterating. Do this for every iteration after the third iteration.
Output:
What is the topic of the prompt you'd like to create?
Prompt:
I want to learn how to analyze sabermetrics data.
Output:
(a) Revised Prompt: Please provide an overview and guidance on how to analyze sabermetrics data in baseball, including key concepts and methods.
(b) Suggestions on how to improve the prompt:
Specify the level of detail you're looking for (beginner, intermediate, or advanced).
Mention any specific sabremetrics statistics or techniques you'd like to focus on.
Indicate if you'd like a step-by-step guide or a general overview.
(c) Clarifying questions:
What is your current level of knowledge about sabremetrics?
Are you interested in learning about any particular aspects of sabremetrics, such as player evaluation, team performance, or game strategy?
Do you have any preferred tools or software for analyzing data that you'd like to use for sabremetrics analysis?
Prompt:
Level of detail: beginner Specific sabremetrics statistics: uncertain what are relevant for a beginner I'd like a step by step guide.
1. Beginner level knowledge
2. Player evaluation
3. Google sheets
Output:
(a) Revised Prompt: Please provide a beginner-friendly, step-by-step guide to analyzing sabremetrics data for player evaluation in baseball using Google Sheets, including key concepts and methods.
(b) Suggestions on how to improve the prompt:
Identify a specific player or position you'd like to focus on in the analysis.
Mention any specific games or seasons you'd like to analyze.
Specify if you'd like guidance on acquiring and organizing sabremetrics data for use in Google Sheets.
(c) Clarifying questions:
Would you like the guide to focus on evaluating a player's offensive, defensive, or overall performance?
Are there any specific resources you'd like me to recommend for obtaining sabremetrics data?
Do you have any experience working with spreadsheets or Google Sheets, or should the guide include basic instructions for using the software?
Prompt:
Derek Jeter 2000 season Yes, tell me how to get the data for use in Google Sheets 1. Offensive performance 2. Yes recommend resources for me 3. I am an expert spreadsheet user
Output:
(a) Revised Prompt: Please provide a beginner-friendly, step-by-step guide to analyzing Derek Jeter's offensive performance during the 2000 baseball season using sabremetrics data in Google Sheets, including key concepts, methods, and resources for obtaining the data.
(b) Suggestions on how to improve the prompt:
Specify any particular aspects of offensive performance you'd like to focus on, such as hitting, baserunning, or situational performance.
Indicate if you'd like a comparison of Jeter's performance to other players in the same season or to his career averages.
Request a brief summary of Jeter's 2000 season performance to provide context for the analysis.
(c) Clarifying questions:
Are there any specific sabremetric statistics you'd like to include in the analysis, such as OPS, wOBA, or wRC+?
Would you like the guide to cover the process of calculating these statistics, or do you just need instructions on how to use them for analysis?
This is the third iteration. Should I proceed with executing the prompt, or do you have any further adjustments you'd like to make?
Prompt:
Please execute the prompt
Output:
In this step-by-step guide, we'll walk through the process of analyzing Derek Jeter's offensive performance during the 2000 baseball season using sabremetrics data in Google Sheets. We will focus on key metrics like OPS, wOBA, and wRC+ to evaluate Jeter's performance. Here's how you can get started:
Obtain the data: To analyze Derek Jeter's 2000 season performance, you'll need to obtain relevant data. FanGraphs (
https://www.fangraphs.com/
) and Baseball-Reference (
https://www.baseball-reference.com/
) are excellent resources for historical baseball statistics, including sabremetrics data. For this analysis, download Jeter's 2000 season data as a CSV file from either of these websites.
Import the data into Google Sheets: Open a new Google Sheets document and import the downloaded CSV file. To do this, go to "File" > "Import" > "Upload," then select the CSV file from your computer. Choose "Replace spreadsheet" or "Insert new sheet" as the import location.
Calculate OPS (On-base Plus Slugging): OPS is the sum of a player's on-base percentage (OBP) and slugging percentage (SLG). In your Google Sheets document, locate the columns for OBP and SLG, and create a new column for OPS. Use a simple formula like "=OBP_cell + SLG_cell" to calculate OPS for Derek Jeter's 2000 season.
Calculate wOBA (Weighted On-Base Average): wOBA is a more advanced statistic that assigns different weights to various offensive events (e.g., walks, singles, doubles, etc.) to better represent their contribution to run-scoring. Use the formula provided by FanGraphs (https://library.fangraphs.com/offense/woba/) to calculate wOBA for Jeter's 2000 season. Create a new column for wOBA and input the formula with appropriate cell references.
Calculate wRC+ (Weighted Runs Created Plus): wRC+ is an advanced metric that quantifies a player's total offensive value in terms of runs created, adjusted for league and park factors. You can find wRC+ directly on FanGraphs or Baseball-Reference, or calculate it using the formula provided by FanGraphs (https://library.fangraphs.com/offense/wrc/). Input the values in a new column in your Google Sheets document.
Analyze the results: With the calculated values for OPS, wOBA, and wRC+, you can evaluate Derek Jeter's offensive performance during the 2000 season. Compare these metrics to league averages and other players' performances to get a better understanding of Jeter's relative value that season.
Visualization and further analysis: You can create charts and graphs in Google Sheets to visualize Jeter's performance, such as bar graphs comparing his performance to other players or trend lines for his career progression. Additionally, you can dive deeper into specific aspects of Jeter's offensive performance, such as his performance in high-leverage situations or against specific types of pitchers.
By following these steps, you'll be able to conduct a thorough analysis of Derek Jeter's offensive performance during the 2000 baseball season using sabremetrics data in Google Sheets.
Mind blowing, We could also add specify a role of the model as well, Like "Act as a professional sabermetrics analyst...."