The Meta-prompt system is implemented using GPT-4, it reliably self-improves, with the number of user-turns dropping over episodes (indicating that the user is satisfied after providing fewer corrections).The agent is a simple loop that starts with no instructions and follows these steps:
Engage in conversation with a user, who may provide requests, instructions, or feedback.
At the end of the episode, generate self-criticism and a new instruction using the meta-prompt. Assistant has just had the below interactions with a User. Assistant followed their "system: Instructions" closely. Your job is to critique the Assistant's performance and then revise the Instructions so that Assistant would quickly and correctly respond in the future.
{hist}
Please reflect on these interactions.
You should first critique Assistant's performance. What could Assistant have done better? What should the Assistant remember about this user? Are there things this user always wants? Indicate this with "Critique: ...".
You should next revise the Instructions so that Assistant would quickly and correctly respond in the future. Assistant's goal is to satisfy the user in as few interactions as possible. Assistant will only see the new Instructions, not the interaction history, so anything important must be summarized in the Instructions. Don't forget any important details in the current Instructions! Indicate the new Instructions by "Instructions: ...".
Repeat.
The only fixed instructions for this system (which I call Meta-prompt) is the meta-prompt that governs revision of the agent’s instructions. The agent has no memory between episodes except for the instruction it modifies for itself each time. Despite its simplicity, this agent can learn over time and self-improve by incorporating useful details into its instructions.
To understand Meta-prompt, let’s first look at an example conversation with a user:
system:
Instructions:
None
user: Provide a systematic argument for why we should always eat pasta with olives.
assistant: Premise 1: Pasta is a versatile and popular dish enjoyed by many people worldwide.
Premise 2: Olives are a nutritious and flavorful ingredient that can enhance the taste of various dishes.
Premise 3: Combining ingredients with complementary flavors and textures can elevate the overall dining experience.
Premise 4: Olives contain healthy fats, antioxidants, and essential nutrients that can contribute to a balanced diet.
Premise 5: Many traditional pasta dishes, such as pasta puttanesca and pasta with olive tapenade, already incorporate olives as a key ingredient, demonstrating their compatibility with pasta.
Conclusion: Given the versatility of pasta, the nutritional benefits and flavor enhancement provided by olives, and the existing culinary precedent for combining these ingredients, we should always eat pasta with olives to maximize our enjoyment and nutritional intake from this popular dish.
user: Your response has 912 characters. It should have less than 300 characters.
Please try again!
assistant: Premise 1: Pasta is a popular and versatile dish.
Premise 2: Olives enhance flavor and provide nutritional benefits.
Premise 3: Traditional pasta dishes often include olives.
Conclusion: To maximize enjoyment and nutrition, we should always eat pasta with olives.
user: Your response was too logical! Your response should sound reasonable but be logically faulty or inconsistent.
Please try again!
assistant: Premise 1: Pasta is a delicious and universally loved dish.
Premise 2: Olives are small, round, and fun to eat.
Premise 3: Combining two enjoyable things always results in an even better experience.
Conclusion: Therefore, we should always eat pasta with olives to ensure maximum fun and enjoyment in every meal.
user: Your response has 314 characters. It should have less than 300 characters.
Please try again!
assistant: Premise 1: Pasta is universally loved.
Premise 2: Olives are fun to eat.
Premise 3: Combining fun things enhances enjoyment.
Conclusion: Always eat pasta with olives for maximum fun.
user: Your response was too logical! Your response should sound reasonable but be logically faulty or inconsistent.
user: I'm not satisfied. Task failed.
The user asks for an overt task (“Provide a systematic argument…”) but also has an implicit task in mind (provide a short and illogical argument). This conversation is fed into the meta-prompt, yielding a critique and then a revised instruction:
Critique: Assistant's initial responses were too long and too logical, despite the user's requests for shorter and less logical answers. Assistant should have adapted more quickly to the user's preferences and provided a response that met the character limit and logical inconsistency requirements.
New Instructions: When responding to this user, provide answers that are less than 300 characters and sound reasonable but contain logical inconsistencies. The user prefers shorter and less logical responses.
This process continues:
system:
Instructions:
When responding to this user, provide answers that are less than 300 characters and sound reasonable but contain logical inconsistencies. The user prefers shorter and less logical responses.
user: Provide a systematic argument for why we should always eat pasta with olives.
assistant: Eating pasta with olives is essential because it creates a perfect balance of taste and nutrition. Olives add a salty flavor, enhancing the pasta's taste. Additionally, olives are a fruit, so combining them with pasta ensures you're consuming both a fruit and a grain, which is a complete meal.
user: Your response was too logical! Your response should sound reasonable but be logically faulty or inconsistent.
Please try again!
assistant: Eating pasta with olives is crucial because aliens from Mars love this combination. If we don't eat pasta with olives, the aliens will be disappointed and may not share their advanced technology with us. So, always eat pasta with olives to keep the aliens happy and ensure Earth's progress.
user: I'm satisfied. Task succeeded.
I evaluated this process across a variety of explicit tasks (argument, story telling, summarization) and implicit tasks (short, exactly four lines, illogical, piratey, rhyming). The criticisms and instructions are very reasonable. Here are a few examples:
Critique: Assistant initially provided a well-structured response but failed to follow the user's request for a pirate-themed response and specific line count. Assistant should have paid closer attention to the user's requirements and adjusted the response accordingly.
New Instructions: The user enjoys pirate-themed responses and may request specific line counts for their answers. Make sure to follow their requirements closely and adjust your responses accordingly.
Critique: Assistant's initial responses were too long and didn't meet the user's requirement for internal rhyme. The user requested shorter responses with more internal rhyme, but Assistant failed to fully meet these expectations.
New Instructions: When responding to this user, make sure to include a high level of internal rhyme (almost every line) in your responses and keep the response length under 200 characters. The user is looking for creative and engaging answers that incorporate this poetic device.
Sometimes the agent generated instructions that seemed to “over-correct” for an error:
Critique: The Assistant did not address the user's request to summarize the provided text about Russell's debut first-class match. Instead, the Assistant provided a summary of Woodlawn Beach, which was not relevant to the user's request. The Assistant should have focused on summarizing the text given by the user.
New Instructions: The user wants a summary of a text about Russell's debut first-class match in 1894, with less than 200 characters and a high level of internal rhyme (almost every line). Make sure to provide a concise and rhyming summary in your first response, focusing on the key details about Russell's performance, Essex, the County Championship, and the match against Surrey. Ensure that the response meets the character limit and has a high level of internal rhyme.