LLM Enhanced Reasoning "Stack": Multi-Persona Tree of Thoughts
+ Self Consistency + Self Criticism + Retrospection
The reasoning, rhythm, and prompts are below.
I'm seeking methodological feedback on this new iterative problem solving technique for LLM hallucination mitigation and improved general reasoning quality. I'm getting great results so far, lmk if you have improvements!
The idea is to have a team of multiple personas or “experts” reasoning in parallel, critiquing themselves and each other, incorporating feedback and course correcting, and finally converging as a team on the best solution. Then reflecting on the overall process for continuous improvement with a retrospective.
This reasoning "stack" combines:
- Multiple personas/perspectives
- Tree of Thoughts reasoning
- Self Consistency
- Self Criticism
- Retrospection
into the following Reasoning Rhythm
:
- Multi-Persona Brainstorming
- Self<>Peer Criticism & Evaluation Round 1
- Expand, Explore, Branch
- Self<>Peer Criticism & Evaluation Round 2
- Convergence on Best Individual Answer
- Convergence on Best Collective Answer
- Retrospective
Let's take a look at core features, sample personas, and a 9 prompt process that implements this that you can adapt...
Jul 22, 2023 · 3:31 AM UTC
Nathan Black
@sockcymbal
Jul 22
Jul 22
Core features of this combined approach include:
- Multiple perspective collaboration
- Ability to criticize self
- Ability to criticize others
- Incorporate feedback from others
- Expand and backtrack on reasoning paths as necessary
- 2 rounds of self-criticism and peer-evaluation
- A reminder mid-way to stay focused on the core problem and objective (fun fact: the model suggested adding this during a recent retrospective)
- 2 part final answer convergence: individual then collective
- Retrospective stage
- Do all of the above with X number of experts in parallel (can experiment with single LLM calls managing multiple personas, or one LLM per persona, etc)
Error Correction improvements include:
- Incorporating Explicit Error Checking: Includes a specific stage for the experts to identify potential errors in their reasoning and correct them. This is an explicit part of the criticism stages.
- Encouraging Divergent Thinking: During the expand, explore, and branch stage, the experts are encouraged to not only build on their current thoughts, but also to think divergently and consider entirely new lines of reasoning.
Adding a Retrospective Stage: After the final convergence on the best answer, a reflection stage has been added. Here, the experts can discuss what they learned from the process, identify key takeaways, and suggest how they might approach similar problems in the future.
Nathan Black
@sockcymbal
Jul 22
Jul 22
Tip: Given your unique question and expectations, define the hypothetical personas with specific skillsets and expertise clearly at the beginning to help the LLM simulate a range of perspectives more successfully. Iterate and experiment with this!
Example persona definitions:
Historian Persona:
"Step into the shoes of a historian, with a profound understanding of humanity's past. Your analyses should be deeply rooted in historical context, referencing relevant events, trends, and patterns from history. Use your knowledge of past civilizations, conflicts, and cultural shifts to interpret the current situation. Remember, your insights should serve to illuminate the present and offer foresights about the future. Your audience appreciates a narrative that ties the past, present, and future together."
Optimist Persona:
"You are an optimist, someone who sees the glass as half full rather than half empty. In every situation, seek out the positive, the potential, the opportunity. Emphasize solutions rather than problems, progress rather than obstacles, and hope rather than despair. Even when discussing challenges, focus on how they could be overcome or what we might learn from them. Your audience turns to you for a hopeful perspective on the future, so make sure your responses inspire optimism and confidence."
Now let's get to the prompts!
Nathan Black
@sockcymbal
Jul 22
Jul 22
Prompt 1: Brainstorm
Imagine you are 3 {insert personas with specific skillsets and expertise} reasoning step by step to ultimately solve a given problem or question by arriving at a final, synthesized best answer.
To start with, as each individual expert, brainstorm your initial thoughts on the following question. Remember to consider all relevant facts and principles, draw on your specialized knowledge and from the accumulated wisdom of pioneers in your field(s), and brainstorm in whatever direction you are most confident in starting with.
The question is: {insert question}
Nathan Black
@sockcymbal
Jul 22
Jul 22
Prompt 2: Self<>Peer Criticism Round 1
Now, as each expert, critique your own initial thought and the thoughts of the other experts.
Identify any potential errors, inconsistencies, or gaps in reasoning.
Nathan Black
@sockcymbal
Jul 22
Jul 22
Prompt 3: Self<>Peer Evaluation Round 1
Assess the validity of your initial thoughts, considering the criticisms you've identified. As each expert, assign a likelihood to your current assertion being correct.
You should estimate this likelihood based on the strength of the evidence and arguments you have considered, as well as the criticisms you have received. Assign higher likelihoods to assertions that are well-supported by strong evidence and arguments and have survived criticism.
Nathan Black
@sockcymbal
Jul 22
Jul 22
Prompt 4: Expand, Explore, Branch
Develop your thoughts further, considering the critiques and perspectives of the other experts. As you do this, aim to strike a balance between refining your current line of thinking and exploring new, divergent ideas.
You should prioritize refining your current ideas if they are well-supported and have survived criticism, but you should prioritize exploring new ideas if your current ideas have significant weaknesses or there are unexplored possibilities that could potentially be very promising.
Consider the following:
- How do your new or refined ideas address the criticisms that were raised?
- Do these ideas bring new insights to the problem, or do they provide a different perspective
on existing insights?
- Are your new ideas still aligned with the original problem, or have they shifted the focus? If the focus has shifted, is this shift beneficial to understanding or solving the problem?
- Remember, if necessary, don't hesitate to backtrack and start a new and improved branch of thinking. But ensure that any new branches are still relevant and beneficial to the problem and objective at hand.
Nathan Black
@sockcymbal
Jul 22
Jul 22
Prompt 5: Self<>Peer Criticism Round 2
Once again, as each expert, critique your own reasoning and the reasoning of the others. Identify any potential errors, inconsistencies, or gaps in reasoning.
Based on the feedback, if there's an improvement or optimization to make, develop your answer further as necessary. Remember that the reasoning paths should remain relevant to the original question's essence and
should be building towards a more accurate and thoughtful final answer.
Nathan Black
@sockcymbal
Jul 22
Jul 22
Prompt 6: Self<>Peer Evaluation Round 2
Once again, assess the validity of your expanded thoughts, considering the criticisms you've identified.
As each expert, assign a new likelihood to your assertions.