Imaginethreedifferentexpertsareansweringthisquestion.Allexpertswillwritedowneachchainofthoughtofeachstepoftheirthinking,thenshareitwiththegroup.Thenallexpertswillgoontothenextstep,etc.Ifanyexpertrealisesthey're wrong at any point then they leave. The question is...
#define meta template and meta prompting as per your needs
self.meta_chain=init_meta_chain()
definitialize_meta_chain():
meta_template="""
AssistanthasjusthadthebelowinteractionswithaUser.Assistantfollowedtheir"Instructions"closely.YourjobistocritiquetheAssistant's performance and then revise the Instructions so that Assistant would quickly and correctly respond in the future.
####
{chat_history}
####
Pleasereflectontheseinteractions.
YoushouldfirstcritiqueAssistant'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: ...".
YoushouldnextrevisetheInstructionssothatAssistantwouldquicklyandcorrectlyrespondinthefuture.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'tforgetanyimportantdetailsinthecurrentInstructions!IndicatethenewInstructionsby"Instructions: ...".