Mastering the Unknown with GPT-4 and the Flipped Interaction Pattern
Leverage GPT-4 to Generate High-Quality Questions, Redefining Problem Solving and Decision Making

Introduction
Like me, you’ve probably been dazzled by the strides recently made in the field of Generative AI. It feels like we are living in a science-fiction reality, where machines understand us.
At the heart of this revolution, OpenAI’s GPT-4 has emerged as a marvel in the realm of language models. As someone who had the privilege of playing around with it, I can testify to its astonishing capabilities.
In this article I want to share a technique that intrigued me quite a lot. In literature it is referenced as the Flipped Interaction Pattern, and I found it to be a very powerful framework to help in problem solving tasks. The distinct aspect of this prompt engineering method lies in its “reversed” (i.e. flipped) approach: instead of directly asking for answers or solutions from the AI, it primarily focuses making the AI deliver the right questions that could effectively drive us towards our desired solution.
In this article, I’ll walk you through how it works, why it’s beneficial, and provide real-life examples of its effectiveness. By the end of it, I hope you’ll be equipped with a useful technique - one that can be applied to a vast array of problems, possibly with results that may surprise you.
Why the Flipped Interaction Pattern?
In today’s world, the depth of our knowledge can often be compared to a pool — long and narrow. We dive deep into some specialties, becoming experts in some specific domains. This hyper-specialization allows us to excel in our respective fields, but at the same time, it can leave us feeling lost when we encounter problems outside our areas of expertise. As a software engineer, I may be well-versed in algorithms, data structures, and coding, but put a spade in my hand and ask me to tend a garden, and I will transform any green into a wasteland.
This is where the Dunning-Kruger effect may come into play. As per this psychological hypothesis, there’s a cognitive bias where people with low ability at a task overestimate their ability to perform it. Essentially, we don’t know what we don’t know, and this can lead to overconfidence, and mistakes.
The problem, however, is not just about being an amateur in an unfamiliar field. It’s about our inability to even ask the right questions to guide us towards a solution. What are the key factors to consider when gardening? What should I be wary of? Where do I even start? These are questions we may not know to ask when stepping outside our areas of expertise.
That’s where this version of the Flipped Interaction Pattern comes into play. This method acknowledges that the effectiveness of a solution hinges on the quality of questions that precede it. Instead of asking GPT to provide a solution to a problem, we are going to use GPT-4 to help identifying the questions that need to be asked in order to land a solution.
The Flipped Interaction Pattern in Action
Let’s apply this technique to gardening. The challenge? Give new life to my derelict front garden. To apply the Pattern, we start with a carefully crafted prompt. This prompt sets the stage for our conversation with GPT-4. Here’s the basic template:
Act as a **{{Relevant Professional}}**.
I want to **{{Problem to Solve}}**
You will ask me 10 questions, one at the time.
After each question you will wait for my answer, after my answer you
will ask the next question. When all the 10 questions
have been answered, you will write me the exact steps
I have to do to solve my problemIn our specific case, we are going to use the following initial prompt:
Act as a **professional gardener**. I want to **renew a front garden that
is in a pretty bad shape, but I don't know where to start**.
You will ask me 10 questions, one at the time. After each question you
will wait for my answer, after my answer you will ask the next question.
When all the 10 questions have been answered, you will write me the exact
steps I have to do to solve my problem.Let’s analyze the different elements.
- Persona Assignment: The first part of our prompt sets the persona that GPT-4 will adopt to help us solve our problem — in this case, a professional gardener. Assigning a persona to GPT-4 it’s a well known strategy that demonstrated its effectiveness in making GPT output more relevant and accurate responses.
- Problem Statement: The next portion of our prompt explicitly outlines our problem. Ideally, we want to include as much detail as possible; that’s because the more context we provide, the better the model can tailor its questions.
- Sequential Querying: Lastly, our prompt emphasizes that GPT-4’s queries should follow a sequential format. This element of our technique is critical as it ensures the AI’s subsequent questions build on previous answers.
Let’s see how the conversation unfolds.
GAIrdening
You can find the full conversation at this link. For reference I am also writing the conversation below.
**Question 1**
*GPT-4*: What is the size of your garden area?
*Andrea*: It's around 15 squares meters. There is an area that has a weed lawn, and another area that has tiles. i only want to renew the weedy lawn, which is 15 squares meters. In that area I also have a cherry tree
**Question 2**
*GPT-4*: Could you describe the condition of the soil? Is it sandy, loamy, clayey? And do you know the pH level of your soil?
*Andrea*: It's loamy. I have no idea about the ph
**Question 3**
*GPT-4*: Do you have a preference for a certain type of plants or a specific look you want for your garden? For instance, do you want flowering plants, ornamental grasses, shrubs, perennials, or annuals?
*Andrea*: In the side I want to plant a periennals, the most part would be grass. I'd like to have some plants around the cherry tree, and a hedge on the front of the garden (the part that sees the street)
**Question 4**
*GPT-4*: What is the sunlight situation in your garden? Does it receive full sunlight, partial sun, or is it mostly in the shade?
*Andrea*: Full sun, besides the area under the tree that is mostly in shade
**Question 5**
*GPT-4*: For the hedge, do you have any particular preferences for height, thickness, and color (green, variegated, etc.)?
*Andrea*: Green High plants
**Question 6**
*GPT-4*: Could you tell me a bit more about your local climate? For instance, where are you located and what kind of temperatures, rainfall, and seasons do you experience?
*Andrea*: I live in Ireland, it rains quite a lot, but there is some level of sun almost every day.
**Question 7**
*GPT-4*: Do you have a preference in terms of maintenance? Would you prefer a low-maintenance garden or are you comfortable with investing a bit more time in upkeep?
*Andrea*: I'm comfortable in investing some time
**Question 8**
*GPT-4*: What is the main purpose of this garden? Is it mainly for aesthetics, to create a private space, to attract wildlife, or maybe for growing fruits and vegetables?
*Andrea*: Aesthetic, but I also want to support pollinators
**Question 9**
*GPT-4*: What's your budget for this project? This will help determine what type of plants, grass, and amendments you can afford.
*Andrea*: 500 euro
**Question 10**
*GPT-4*: Lastly, do you have any known allergies to specific plants, trees, or flowers that we should avoid including in your garden?
*Andrea*: NoIt’s clear that ChatGPT probes for vital details such as the garden’s size, the condition of the soil, lighting situation, preferred types of plants, local climate, my readiness for maintenance (lol), the primary purpose of the garden, budget, and potential allergies.
In retrospect, after walking through the AI's questions, I appreciate how these queries led me to consider aspects of my garden renovation that I might have otherwise overlooked.
Two examples:
- ChatGPT's inquiry on sunlight: "What is the sunlight situation in your garden? Does it receive full sunlight, partial sun, or is it mostly in the shade?" This question highlighted the importance of understanding the garden's light conditions to select suitable plants. To be honest, this is a crucial detail I may have easily ignored if I were to work on this task alone.
- GPT-4 asked, "Do you have any known allergies to specific plants, trees, or flowers that we should avoid including in your garden?", reminding me of an aspect I would have easily missed without the guidance.
In sum, the step-by-step questioning strategy implemented by GPT-4 not only deepened my understanding of the problem at hand but also allowed the AI to generate a more detailed and personalized solution.
This is the final recommendation GPT gave me about my garden renovation:
Step 1: Clear the Area and Check the Soil
Start by removing the weeds and any other debris from the area.
To check the pH of your soil, you can purchase an inexpensive soil
testing kit from your local garden center or online.
Loamy soil is typically around neutral but knowing the exact pH will help you
choose the best plants.
Step 2: Improve the Soil
Based on your soil test results, you may need to add amendments to your soil
to improve its fertility. For loamy soil, adding compost or well-rotted
manure can improve its nutrient content.
Step 3: Plan Your Plantings
You mentioned you wanted a hedge, grass, perennials, and plants around
the cherry tree. Here are some suggestions:
Hedge: Yew (Taxus baccata) can make a good, tall green hedge.
It's evergreen and can handle Ireland's wet climate.
Grass: Ryegrass is durable and can handle full sun and frequent rain.
Perennials for sunny areas: Consider Lavender, Sedum, and Echinacea.
These will attract pollinators and can handle full sun.
Plants for the shaded area under the cherry tree: Ferns and hostas
are shade-loving and will add some texture and visual interest.
Step 4: Purchase and Plant
Purchase your chosen plants, keeping your budget in mind. Start planting with
the hedge, as it will be your primary structural element. After that,
plant the grass, then your perennials, and finally, the shade-loving plants
around the cherry tree.
Step 5: Water and Care
After planting, water everything well. Remember that new plants will need
more frequent watering until they establish. After they are established,
adjust watering based on the weather and the needs of each type of plant.
In general, the grass will likely need watering once a week, the hedge
every 1-2 weeks, and the perennials every 1-2 weeks, but adjust as needed.
The plants under the cherry tree will likely need less water due to the
shade and potential rain protection from the tree.
Step 6: Ongoing Maintenance
Mow the grass as needed, trim the hedge to maintain its shape and height,
and prune the perennials after flowering to encourage new growth.
Remove any fallen leaves or debris regularly to keep the garden tidy.
Remember, gardening is a process, and it's okay if everything doesn't
look perfect right away. Over time, as the plants grow and fill in,
you'll see your garden transform into a beautiful, pollinator-friendly
space. Enjoy the process and the result!Automating the Flipped Interaction Pattern
I have tested this technique many times, so I am quite confident that it will work in most cases, especially using GPT-4 as LLM (vs using GPT-3). Let’s move to a more experimental approach: is it possible automate this method? To answer this question, we are going to need a bit of coding (finally).
We will create two AI agents that will talk eachother, one will pose the questions, the inquiry_persona, the other will provide the answers, the response_persona. We are going to initialize our agents with some instructions, so that they share a common goal. Finally, we are going to make the two AI talk, until the inquiry_persona will provide the final response. It’s essential to note that these agents must maintain a dialogue history, recalling their own responses as well as the other’s. The organizational structure of the system is shown in the diagram below.

Implementation
First let’s have a look at how we could initialize the two agents:






