Beginner’s Guide: Incorporating Feedback Loops in ChatGPT


There are a number of prompts for specific tasks that work better if you use chat GTP in a feedback loop. That sounds really complicated but basically what it means is that you’re going to go back and forth with ChatGPT to get the refined results that you want. So How do we do that?

Iterative feedback prompts enhance task-specific responses in ChatGPT by refining results through a feedback loop between the model and the user. This process involves requesting a result, expecting or requesting follow-up information, and continuing the loop to generate higher-quality responses.

So iterative prompts start off with some type of information that you give to chat GPT and your initial prompt normally. The classical prompt that we use for this is a prompt creator.

What we want to do with a prompt Creator is to have chat GPT take a basic prompt that we create and improve it. That’s the type of task that an iterative feedback prompt is well suited for.

FeedBack Loops

In this article we’re going to look at how to create an effective iterative feedback loop prompt, to generate a refined response. We’ll cover the basics of how to set up the iterative prompts, some of their advantages, and when you want to use them. So let’s jump into it and look at iterative prompts what they’re good for and how to make them.

Table of Contents

Understanding Iterative Feedback Loop Prompts

Iterative prompts are a technique for generating high-quality responses with ChatGPT by creating a feedback loop with chat GTP to refine a result. You can either give an initial prompt that contains the information that you want to refine or you can ask that ChatGPT to request that information, to begin with.

Let’s take a look at the classical example of a prompt engineer. In this case, we’re going to have chat GPT act as our prompt engineer. To begin with we’re going to give chat GPT and initial prompt that we want to refine to work better.

So let’s get started and take a look at what the classical prompt engineer chatGPT prompt looks like.

Start Prompt

ChatGPT I would like you to act as my prompt engineer using your extensive knowledge of what works best in prompts.

The initial prompt that we’re going to begin with is, “ChatGPT please give me marketing data for IBM”.

I would like you ChatGPT to work with me to refine that prompt to deliver better data when I use it with you ChatGTP. We’re going to perform that refining step multiple times by using an iterative method.

1). You will look at the initial prompt that I gave you and you will make suggestions on how to improve it by showing me a prompt that you believe will generate better data.

2) You will ask me relevant questions to help improve the prompt.

3) When you have finished asking relevant questions you will then show me what you believe to be is an improved prompt and ask me if we should continue to try to improve it.

Sure, I can help you refine the prompt for better data. Here’s an improved prompt for generating marketing data for IBM:

“ChatGPT, please provide me with the latest marketing trends for IBM in the technology industry.”

To further refine this prompt, I have a few questions:

Would you like to focus on a specific region or market segment for IBM’s marketing data?

Are you looking for any specific metrics or KPIs for IBM’s marketing performance?

Are there any recent events or product launches by IBM that you would like to factor into the marketing data?

Based on your answers, I can further refine the prompt to better suit your needs. Let me know if we should continue to improve the prompt or if you’re satisfied with the current version.

I would like information on the US market for IBM. I would like specific metrics including kpis for IBM’s marketing performance.

Great, based on your inputs, here’s an improved iterative prompt for generating marketing data on IBM in the US market with specific metrics and KPIs:

“ChatGPT, please provide me with the latest marketing data for IBM in the US market. Specifically, I’m interested in IBM’s market share, revenue growth, and customer engagement metrics such as website traffic, social media engagement, and email campaign performance. Can you tell me what the current trends are in these areas for IBM, and how they compare to industry benchmarks?”

Let me know if you have any other specific requirements or areas of interest that we can incorporate into the prompt to further refine it.

I would like to have some additional channels that IBM is using

Great, based on your input, here’s an updated iterative prompt that incorporates additional channels that IBM is using for marketing:

“ChatGPT, please provide me with the latest marketing data for IBM in the US market. Specifically, I’m interested in IBM’s market share, revenue growth, and customer engagement metrics such as website traffic, social media engagement, and email campaign performance. Additionally, can you tell me what other marketing channels IBM is using in the US market, such as events, sponsorships, or advertising? How effective are these channels compared to digital marketing channels, and what is the ROI for each channel?”

Let me know if this prompt meets your requirements or if you would like to further refine it.

Could you also include how the ROI is being calculated for each Channel

Sure, here’s an updated iterative prompt that includes how the ROI is being calculated for each channel:

“ChatGPT, please provide me with the latest marketing data for IBM in the US market. Specifically, I’m interested in IBM’s market share, revenue growth, and customer engagement metrics such as website traffic, social media engagement, and email campaign performance. Additionally, can you tell me what other marketing channels IBM is using in the US market, such as events, sponsorships, or advertising? How effective are these channels compared to digital marketing channels, and how is the ROI being calculated for each channel? Are there any particular channels that are generating a higher ROI than others, and if so, what is the reason behind their success?”

Let me know if this updated prompt meets your requirements or if you would like to further refine it.

Are there any other factors in marketing data such as different types of analysis that I should be considering

Yes, there are several other factors in marketing data that you may want to consider for a more comprehensive analysis. These may include:

Customer segmentation: Analyzing customer demographics and behavior to better understand target audiences and tailor marketing efforts to specific segments.

Competitive analysis: Evaluating the marketing strategies and performance of competitors to identify opportunities for differentiation and improvement.

Brand perception: Measuring brand awareness, sentiment, and loyalty to gauge the effectiveness of marketing efforts and identify areas for improvement.

Content analysis: Assessing the performance of different types of content, such as blog posts, videos, or infographics, to determine which formats are most effective for engaging and converting customers.

Conversion rates: Analyzing the effectiveness of different channels and campaigns in driving conversions, such as lead generation, sales, or sign-ups.

Based on your specific needs, we can further refine the iterative prompt to include these or other factors as necessary.

Could you include those as well in the prompt that we’re building

Absolutely, here’s an updated iterative prompt that includes the additional factors you mentioned:

“ChatGPT, please provide me with the latest marketing data for IBM in the US market. Specifically, I’m interested in IBM’s market share, revenue growth, and customer engagement metrics such as website traffic, social media engagement, and email campaign performance. Additionally, can you tell me what other marketing channels IBM is using in the US market, such as events, sponsorships, or advertising? How effective are these channels compared to digital marketing channels, and how is the ROI being calculated for each channel? Are there any particular channels that are generating a higher ROI than others, and if so, what is the reason behind their success? Finally, can you provide me with data on customer segmentation, competitive analysis, brand perception, content analysis, and conversion rates for IBM’s marketing efforts in the US market?”

Let me know if this prompt meets your requirements or if you would like to further refine it.

There are a couple of takeaways that I hope you got by looking at that example.

1). This is a process where you go back and forth with ChatGPT to improve a result

2). You do not have to always be creating a suggestion for the prompt you can ask for additional information as I did about other types of analysis that are available.

3) Asking those additional questions allows you to incorporate that information into the prompt without having to be aware of it, to begin with.

Using Feedback Loops With Regular Prompts

Now that was taking a look at the classical prompt engineering prompt we can take a look at some other ways to use the same type of process with regular prompts. For instance if I ask chat GPT to create a list of the best presidents of the United States.

Now once I’ve done that I might ask chat GPT to give me a better prompt to draw up more information about the character of the presidents of the United States. So let’s take a look at how that would work.

Please give me a list of the best presidents of the United States

Here is a list of some of the best US presidents, based on their leadership, accomplishments, and impact:

George Washington
Abraham Lincoln
Franklin D. Roosevelt
Thomas Jefferson
Theodore Roosevelt
Harry S. Truman
Dwight D. Eisenhower
John F. Kennedy
Ronald Reagan
Barack Obama
It’s worth noting that this list is not comprehensive and there are certainly differing opinions on who the “best” presidents are.


Could you refine my prompt for me because I want to know more about the character of the presidents of the United States as well.


Sure, here’s a refined prompt based on your request:

“ChatGPT, please provide information on the best presidents of the United States, including their leadership, accomplishments, and character traits. Consider factors such as their integrity, courage, compassion, and ability to inspire and unite the American people. Please provide examples of specific actions or decisions made by each president that demonstrate these character traits.”

Let me know if this prompt captures your needs, or if there’s anything else you’d like me to consider in refining it further.


ChatGPT, please provide information on the best presidents of the United States, including their leadership, accomplishments, and character traits. Consider factors such as their integrity, courage, compassion, and ability to inspire and unite the American people. Please provide examples of specific actions or decisions made by each president that demonstrate these character traits


Great! Here are some potential responses to your prompt:

George Washington: Known for his leadership and integrity, Washington led the American Revolution and served as the first president of the United States. He demonstrated his courage by leading his troops on the front lines, and his compassion by promoting religious freedom and pardoning the rebels of the Whiskey Rebellion.

Abraham Lincoln: A towering figure in American history, Lincoln is known for his leadership during the Civil War and his Emancipation Proclamation that abolished slavery. He demonstrated his courage by opposing slavery and leading the country through a difficult time, and his compassion by advocating for the rights of African Americans.

Franklin D. Roosevelt: Roosevelt is known for his leadership during the Great Depression and World War II. He demonstrated his courage by implementing the New Deal and leading the country through a difficult time, and his compassion by creating social programs to help those in need.

Thomas Jefferson: Jefferson served as the third president of the United States and is known for his contributions to American democracy, including the Declaration of Independence. He demonstrated his courage by opposing tyranny and advocating for freedom, and his compassion by promoting religious freedom and opposing slavery.

Theodore Roosevelt: Known for his leadership and progressive policies, Roosevelt served as the 26th president of the United States. He demonstrated his courage by advocating for conservation and trust-busting, and his compassion by promoting social justice and workers’ rights.

Harry S. Truman: Truman served as the 33rd president of the United States and is known for his leadership during World War II and the Cold War. He demonstrated his courage by making the decision to drop the atomic bomb on Japan to end the war, and his compassion by advocating for civil rights and desegregating the armed forces.

Dwight D. Eisenhower: Known for his leadership during World War II and his Cold War policies, Eisenhower served as the 34th president of the United States. He demonstrated his courage by leading the Allied forces during D-Day and his compassion by promoting civil rights and signing the Civil Rights Act of 1957.

John F. Kennedy: JFK served as the 35th president of the United States and is known for his leadership during the Cold War and the Civil Rights Movement. He demonstrated his courage by navigating the Cuban Missile Crisis and his compassion by advocating for civil rights and the space program.

Ronald Reagan: Reagan served as the 40th president of the United States and is known for his conservative policies and leadership during the Cold War. He demonstrated his courage by advocating for limited government and tax cuts, and his compassion by promoting freedom and democracy around the world.

Barack Obama: Obama served as the 44th president of the United States and is known for his leadership during the economic recession and his healthcare reform. He demonstrated his courage by advocating for progressive policies and leading the country through difficult times, and his compassion by promoting equality and social justice.

So as you can see you don’t need to have a special prompt to be able to use iteration to improve your prompts as you’re working. That’s very helpful in particular if you’re trying to engineer a prompt and having some type of issue with it you can ask chat GPT to help you to fix it.

So take away from this section,

  1. You can request that chat GPT refine a prompt while you’re using it for another purpose.
  2. You can then use the refined prompt to generate the information that you want.
  3. This is very helpful and prompt engineering to be able to get prompts that work the way that you want them to.

Creating Iterative Feedback Prompts For Other Users

Creating prompts that can be used by other people is an art and a science. Using language instead of programming is difficult because you don’t always get exactly the same results. You have to use testing to make sure that you’re going to get basically the same response every time from chat GPT. Complicating the issue is the fact that there are different versions of GPT.

So the first step in creating an iterative feedback prompt is to understand its steps of it. The second step is to test multiple times in a row with different GPT versions to make sure that the prompt that you created will do the same thing every single time.

I call this the McDonald’s effect, that’s what you’re striving for the same thing every time.

So what are the steps and an iterative feedback prompt?

  1. You need some type of input
  2. You need to request that chat GPT tries to improve that input
  3. You need to give chat GPT some more information
  4. Chat GTP needs to give you back a refined output to then be refined further.

So let’s try this out, we’re going to try to create a snippet optimizer.

Snippets are the little pieces of text that Google uses to answer users’ questions when they’re simple enough. Snippets appear at the very top of Google here’s one so you can see what they look like.

Now let’s suppose that we have a gardening blog and we would like to get more traffic to it. One of the easiest ways to do that is to win the snippet. To do that of course we need to know some of the rules around who wins Snippets and why.

First of all, there’s more than one type of snippet period the ones that we are going to be going after like this one about oranges are called query Snippets. The rules of query Snippets are pretty simple.

  1. You’re going to need to be answering a specific question or a group of very similar questions. Usually, those questions are either what or how types of questions.
  2. Google AI is good at finding the snippet on your page already but there are some things that you can do to make it easier. The first thing is to let Google know that you’re about to answer the question for instance,

Before you give the answer you might write, the best tool to pick oranges is,….

3. You can put your answer in bold. Using bold on a page not only is good in terms of letting people see the answer when they come in to read your post but it also lets Google’s AI know that this information is more important. You can see an example of this at the top of this blog post.

4. Query Snippets need to be short generally less than 300 characters. Short concise

5. Query Snippets need to be written in the same tone that you would write an encyclopedia entry. They are factual not opinions.

So now let’s put that information into Chatgpt and use it to create a new prompt that will be using to optimize a snippet. We can even take an existing snippet from a competitor and use chat GPT to improve it to the best of our ability.

Start “Better Snippet Writer”

Acting as Snippet rewriter I am giving you some text to rewrite, “YOUR TEXT HERE “.

Our purpose is to make the text as clear as possible and answer the question “QUESTION HERE”

The rules that we need to follow for the rewritten text are

The rewritten text should be a short and concise answer to the question under 300 characters.
The rewritten text should be written in a factual tone, similar to an encyclopedia avoid expressing opinions.

After rewriting the text ask any pertinent questions to improve the result and ask the user if they are happy with the result. If they have anything to add repeat the process.

Now we need to test it out and see what happens

Acting as Snippet rewriter I am giving you some text to rewrite,

“Hand Pruner / Clipper Beyond a hand, a pair of garden pruners / clippers is the #1 tool for picking citrus. Tangerines, tangelos, and lemons often have tender skins that will tear if the fruit is pulled, and clipping off is usually best. Oranges and grapefruit will usually pull off easily and cleanly when ripe.”.

Our purpose is to make the text as clear as possible and answer the question “What is the best tool to pick oranges”

The rules that we need to follow for the rewritten text are

The rewritten text should be a short and concise answer to the question under 300 characters.
The rewritten text should be written in a factual tone, similar to an encyclopedia avoid expressing opinions.

After rewriting the text ask any pertinent questions to improve the result and ask the user if they are happy with the result. If they have anything to add repeat the process.

Here’s a possible rewritten text that answers the question “What is the best tool to pick oranges”:

“The best tool to pick oranges is a pair of garden pruners/clippers. Oranges usually pull off easily when ripe, but using clippers is a gentle way to harvest them without damaging the fruit. Keep in mind that tender-skinned fruits like tangerines, tangelos, and lemons are best clipped off to avoid tearing their skin. Keep the clippers clean and sharp for optimal use.”

This rewritten text is under 300 characters and is written in a factual tone, avoiding personal opinions.

Do you have any feedback or questions to further improve the text?

That text is still a little long can you shorten it a little?

Sure, here’s a shorter version of the rewritten text:

“To pick oranges gently without damaging the fruit, use garden pruners/clippers. This is especially important for tender-skinned fruits like tangerines, tangelos, and lemons. Keep clippers clean and sharp for optimal use.”

This version is under 150 characters and still conveys the same information as before. Is this better?

Okay a couple things to notice first of all chat GPT can’t count at least the 3.5 version. You’ll need to use an external tool to count the number of characters. Personally, I use, https://wordcounter.net/.

The first version that It produced was actually a 320 characters which is not optimal as 300 characters or less is the most likely size for a snippet. The original snippet was just over that at 312 characters.

The new snippet is actually clocking in at 220 characters even though chat GPT thinks that it’s 150 characters or less. My best guess is that chat GPT is guessing based on the number of words is putting out more or less how long the text is that it’s creating.

Now I would suggest that for any prompt you are creating to give to others that you also try running it on GPT4. Here is the result

The best tool for picking oranges is a hand pruner or clipper, as it effectively helps to harvest citrus fruits without causing damage. Oranges and grapefruit typically detach easily and cleanly when ripe.

This text clocks in at about 207 characters in total. In general, I found that gpt4 is much more likely to try to meet constraints. That’s good and bad depending on what you want you may have to open the restraints up though occasionally a bit to get it to give you more information that you can then do a little bit of reducing yourself on.

Evaluating the Effectiveness of Prompts

If you’re planning on ever putting your prompts out into the wild so to speak. You’re going to need to have a system where you’re evaluating them. This can even be helpful if you just keep them for yourself so that you’re not having to correct things many times over.

So here’s how you can evaluate the effectiveness of your prompts.

Make sure that when you’re testing prompts you open new chats each time. Chat GPT will cheat and use information from the existing chat history otherwise. To test the type of results that someone who is using the prompt without having all the chat history that you have, open a new chat.

  1. Accuracy: do they generate the required response every time when you run them? Many prompts will generate a response some of the time that’s correct you need to run your prompt at least five or six times to make sure that it’s actually putting out what you want.
  2. Completeness: look at the response that was generated over several different tests did the prompt generate a complete response? Was there missing data? Does it need to produce any other information?
  3. Coherence: Evaluate the output of the prompt is it easy to understand or is it disjointed?
  4. Relevance: To me, this is a bit of a no-brainer if the prompt is not generating relevant content then obviously you need to go back and fix it.

So what are the keys to making a better prompt?

  1. Testing and refining: Test your prompts, make them better, and test again.
  2. Incorporating user feedback: go to a forum or ask a friend to test your prompt for you and see what they have to say about it.
  3. Use chat ChatGPT to create data that you test. For instance, you could have it create a simple snippet and then run it through the snippet editor. This comes in handy when you want to 100 times over.

Overall be persistent, be stubborn, and keep testing.

Conclusion

Using iterative feedback loops with ChatGPT allows you to let ChatGPT help you build prompts, create texts, and even build programs. The benefit is ChatGPT becomes your partner in figuring out a problem. Using feedback loops like this makes sense for a lot of jobs. Please give them a try.

Chris

Chris Chenault trained as a physicist at NMSU and did his doctoral work in biophysics at Emory. After studying medicine but deciding not to pursue an MD at Emory medical school Chris started a successful online business. In the past 10 years Chris's interests and studies have been focused on AI as applied to search engines, and LLM models. He has spent more than a thousand hours studying ChatGPT, GPT 3.5, and GPT4. He is currently working on a research paper on AI hallucinations and reducing their effects in large language models.

Recent Posts