Transcription
This method of thought introspection forces the LM to perform a complex process of analysis and self-criticism within a single prompt. See how it works. A basic example. I want to find out what comes first, the chicken or the egg. While it's thinking, I'll explain how this all works. First, here is pseudo-XML, my favorite pseudo-XML. This means these tags don't actually exist. We just define them. But GPT eats this up very well. And it understands that what is enclosed in tags is a role. Next, the logic. Your task is to find the truth. In essence, the code is us defining the line of reasoning that determines the logical steps. And here's the most important part, the task. We need to find the truth, what comes first, the chicken or the egg. Then we explain the logic itself, how exactly to act. Here, we set a minimum of seven rounds. You can specify any number. I specified seven. And we explain how to conduct the rounds. And at each stage, the debaters present some arguments, agent A, and agent B makes their responses. Look, agent A says that the egg comes first. Agent B is a skeptic. But an egg is impossible without a chicken. The reasoning begins. Agent A again, a refutation. That is, within one round, opposition begins. In each of the rounds, they present different arguments and counterarguments. And by the sixth round, they have reached it, meaning they still needed six rounds, not seven as I indicated, that they reached a point of agreement, and they arrived at theses. From the perspective of evolutionary biology, the egg is primary; from the perspective of semantics, the chicken is primary. This is a quite interesting conclusion for me because I hadn't even thought about it from this perspective. And in the end, I didn't just get an answer; I got several rounds of reasoning, which made the answer much deeper. Look how it's structured. Step one. The agent presents its arguments. Look, a certain variable, plan. And agent A defines this plan. Then, look, written in pure pseudocode is critic B. This is agent B. It takes the plan that A wrote and makes some objection and criticism. Thus, through variables, the responses of previous agents are substituted so that they can be evaluated. Within a single prompt, we perform several iterations using these pseudo-variables, to which all these critics we've set up here respond. And they thus save tokens. And within a chat, we can build a multi-agent system without resorting to programming. I think this is one of the elegant and cool schemes that has emerged recently. Look, you create these agents, agent A and agent B, as you need them. You can define much more serious roles for these agent A and agent B. Well, look, I asked to adapt this prompt for analyzing business ideas. And here, agent A will be Tinkoff, agent B will be Steve Jobs. And I decided to add two more agents: a government official-bureaucrat and a professional lawyer for entrepreneurs. So, it's very important here that it doesn't have to be two roles, it doesn't have to be five steps. The main principle is: you define a multi-agent structure here, in which one request goes through a specific variable. Look again at the heart of the reasoning: the number of rounds is set, and initially, they have no agreement. Until agreement is reached, we increase the next step. That is, they must eventually agree and arrive at some balanced decision, either until the maximum number of rounds is reached, or until they simply agree. Arguments are presented. Second, the response to the criticism is criticized, adaptation, and verification. Five steps constitute one round. And there can be any number of such rounds. The prompt is ready. I'm copying it. Here they will analyze a business idea for services and automation of business processes. Now I'll upload it, and while it's thinking, I'll tell you about this prompt. The most important thing is that the role is the executor of the prompt code. That is, the role is not these four characters, but specifically the role of the executor of this algorithm. The prompt code is a structured code of reasoning that models a cycle of expert debates, so its role is to emulate debates. The rules and the task itself are specified, around which they will conduct them. And here is the logic for initializing the experts. Oleg Tinkoff, banker, focused on scaling. Here, in fact, you can write a more substantial role. This is too superficial, in my opinion. Write 10-15 points for it to truly get a great result. Then Jobs, a visionary, a certain agent-bureaucrat, a regulator focused on legality, and a lawyer, a lawyer who will study our interests, as if from the bureaucrat's perspective. That's the point. And here everything is written down, what kind of analysis. Don't worry, it's all easy to reproduce. I'll show you how to do it. It's all very simple. That is, you don't need to write all this manually. It's all automated. Look, phase one begins. Five iterations. A cycle of expert discussions. Tinkoff's analysis. Here he says that Russian business suffers from inefficient CRMs, manual data entry. Well done. So he did some analysis. Jobs says you need to sell simplicity and results. Uh-huh. The regulator says you need to comply with personal data laws. This is indeed where the criticism begins. Tinkoff criticizes Jobs. UX is cool, of course, but money is made by B2B flows. You need to simplify the interface, not the integration. Jobs criticizes the bureaucrat, the lawyer criticizes Tinkoff, the bureaucrat criticizes Jobs. And that's it, it's off to the races, everything has started that we need for them to start criticizing each other. That is, we are now having five iterations of criticism. They have passed the criticism stage, and phase two begins – searching for synergy. That is, based on all the data received, they are already forming synergy. And they come to the fifth round, that the idea is viable, financially sustainable. Thus, I received a quick expert analysis from the characters I wanted to hear it from. Look, all this description, right? To change this, I just need to say that we'll go to a meta-level. That is, look, here I am describing the logic of how it should be, so that I don't get bogged down in all these specific details of how it will be described, it's not that important to me. I just describe in text how I want it to be. And then this general conclusion is taken, and it moves on to the next stage. And at the same time, I asked them to discuss the abolition of the Unified State Exam and change the roles, which will be a student, a parent, a minister, and a university rector. And here the logic will be slightly different. Look, now it will rewrite. What a good job. This is simply his element. That is, look, with what pleasure he is smiling and writing this code. We'll launch it in a new chat now, of course. The role is the same. Everything is written correctly. The essence of the task, discussing the ideas of abolishing the USE. Here they are. Roles: student, parent, minister, and university rector. And here is the minimum number of rounds, five. And here are the cycles of each iteration. They will present their opinion, analysis from each person, and a certain consensus. First consensus: abolishing the USE in its current form is dangerous. Second consensus: a hybrid model is a compromise, preserve the test basis and add evaluation. And here is the context, here is the idea of a hybrid model, reasoning. Here is the next consensus, that the reform takes into account inequality, inclusivity, and so on. Here it is, in a more abbreviated format, it has entered here. In this context, some concept of USE 2.0 is already forming. A certain hybrid system. It has entered here, they discuss it, and they have reached the fifth and final consensus, that the abolition of the USE in its old form is inevitable. Like this. That is, look, they started here with the fact that abolishing the USE in its current form is dangerous, and here already, that abolishing the USE in its old form is inevitable. Here, within this prompt, I can model different mechanics of reproduction, that is, different iterations of criticism. I recommend taking some example from my website. And based on this example, let GPT rewrite it according to the logic you need, and with the critics you need. Or you can take this PDF and get this source example from the PDF and let it process it based on that. Here, on the fifth page, the very essence and logic of this example are laid out. All the pseudocode in all its glory. Here it is maximally understandable and simple. And based on this prompt, you can create any of your systems, any critics, any characters, any approach to iterations. The essence will not change. We simply refer from one to the previous. And thus, within a single prompt, we can sequentially create some reasoning and some debates and arrive at a certain conclusion. Thus, you can write articles, for example, and you create a plan for an article, and for each paragraph, you have first – the author, second – the critic, and third – possibly some compiler who listens to both the author and the critic, and all this works within the prompt. You can also describe the character of the author, the character of the critic, their skills, and the skills of the compiler. Thus, you can combine several approaches within a single text and thus improve it. I have been using this method for a long time, but I used this method via API when I set one prompt, the author writes the text, and a second critic analyzes this text, and a third guy looks at it and combines it. As a result, I run the text through three times, and here, in one prompt, by creating a simplified logic, I can work everything out and get the final result that will truly involve all elements of all agents and all the answers they provide. Token saving via API is very important, especially when you are creating a lot of texts and want to achieve good quality. Prompt examples are available via the link in the description. Come and use them.