DEV Community

Cover image for How to Work with Feedback in Prompting: A Live Guide with Examples
Siarhei
Siarhei

Posted on • Edited on

How to Work with Feedback in Prompting: A Live Guide with Examples

Hello, everyone!

We continue our wonderful series of articles on prompting πŸ€–βœ¨

Today, we will explore four effective feedback prompting techniques that will help you achieve even better results from AI! πŸš€

🧠 What Are These Techniques and Where Did They Come From?

To work with AI as efficiently as possible, experts have developed a range of powerful techniques πŸ› οΈ. They were born at the intersection of science, engineering practice, and everyday user experience.

Main methods of feedback prompting:

  • ✍️ Explicit Feedback Prompting β€” open expression of comments and suggestions.
  • πŸ”„ Iterative Refinement β€” gradual refinement of responses through multiple iterations.
  • 🧐 Critique and Revision Prompting β€” the model critiques and improves the results itself.
  • 🧩 RLHF (Reinforcement Learning from Human Feedback) β€” choosing the best from several options. ---

✍️ 1. Explicit Feedback Prompting

Let's start with a simple yet very effective method!

What it is:

You provide the model with specific and polite feedback πŸ“œ: what needs to be changed and how to improve the response.

When useful:

When the first response seems superficial or incomplete πŸ”

How it looks:

Prompt:

Write an article about interesting facts about Antarctica.
Enter fullscreen mode Exit fullscreen mode

First response:

Antarctica is a cold continent. There is almost no vegetation or animals here.
Enter fullscreen mode Exit fullscreen mode

Feedback:

The text seems too general.
Please add specific data about temperatures, research stations, and local fauna.
Enter fullscreen mode Exit fullscreen mode

Revised Response:

Antarctica is the coldest continent, where the average winter temperature can reach -60Β°C.
There are approximately 70 research stations, and the known animals include emperor penguins and Weddell seals.
Enter fullscreen mode Exit fullscreen mode

πŸ”„ 2. Iterative Refinement

Let's continue! Let's see how you can refine results step by step πŸ”§

What it is:

Gradual refinement and improvement of responses in multiple stages.

When it's useful:

When you want to achieve maximum quality ✨

Prompt 1:

Write a summary of the book "1984" by George Orwell.
Enter fullscreen mode Exit fullscreen mode

Response:

"1984" is a novel about a totalitarian state where the protagonist, Winston, tries to resist the system.
Enter fullscreen mode Exit fullscreen mode

Feedback:

Add more emotional moments and emphasize Winston's fear of Big Brother
Enter fullscreen mode Exit fullscreen mode

Revised Response:

"1984" tells the story of life under total surveillance, where Winston Smith lives in constant fear and tries to maintain his humanity.
Enter fullscreen mode Exit fullscreen mode

And so on. In this way, we refine each iteration of the model's work until we achieve the format we need.


🧐 3. Critique and Revision Prompting

Next level! Forcing AI to Criticize Itself πŸ•΅οΈβ€β™‚οΈ

What it is:

The model evaluates the quality of its own response and suggests improvements.

When it's useful:

When you want to awaken critical thinking in the model 🧠

Prompt:

Write an essay on the importance of environmental awareness. Then evaluate and improve your text.
Enter fullscreen mode Exit fullscreen mode

First response:

Environmental awareness is crucial for preserving nature and sustaining life on the planet. It is important to sort waste and conserve resources.
Enter fullscreen mode Exit fullscreen mode

Critique of the Model:

Analyze the text, identify stylistic and grammatical errors, and correct them.
Enter fullscreen mode Exit fullscreen mode

Revised Response:

Every day, we choose the future: recycling plastic, conserving water, supporting local producers. Environmental awareness is our contribution to a healthy planet.
Enter fullscreen mode Exit fullscreen mode

In this way, we instruct the model to analyze and apply the corrections to the text. Sometimes, this can be very useful. This technique is actively used in creating agents. We will explore this in more detail next time.


🧩 4. RLHF (Reinforcement Learning from Human Feedback)

And finally, a technique for those who want to choose the best πŸ”₯

What it is:

Creating several options β†’ choosing the best one β†’ improving it.

When useful:

When you want a truly perfect result 🌟

Prompt:

Provide 3 answer options to the question: Why is it important to preserve biodiversity?
Enter fullscreen mode Exit fullscreen mode

Options:

1. Supporting Ecological Balance
2. Providing Food and Medicine for Humanity
3. Impact on Climate Stability

Enter fullscreen mode Exit fullscreen mode

Feedback:

The third option seems the best! Add specific facts.
Enter fullscreen mode Exit fullscreen mode

Improvement:

Biodiversity plays a central role in climate stability: forests absorb CO2, and oceans regulate temperature. The loss of species leads to ecological disasters.
Enter fullscreen mode Exit fullscreen mode

This technique works when you have conducted some analysis yourself and more or less know what you want to achieve. ### 🎯 Results

Now you know:

  1. How to give AI clear and precise feedback ✍️
  2. How to refine results over several iterations πŸ”„
  3. How to make the model self-evaluate its responses 🧐
  4. How to select and improve the best options 🧩

Attention! The best results are achieved by combining different approaches. However, it should be noted that since the context size in models is not unlimited, they may eventually lose the initial requirements or reduce their importance. Therefore, when giving feedback, it is advisable to periodically clarify previous requirements.


πŸ“£ Try it yourself!

Write a simple prompt and:

  1. Evaluate the result 🎯
  2. Provide feedback πŸ€“
  3. Ask the model to clarify or critique itself πŸ”
  4. Create several versions and choose the best one 🌟

PS:

Thank you, friends, for staying with me! I hope, as always, my article will be useful to you. I would be very grateful for your likes, comments, and support of the project - bel-geek.com !

Top comments (0)