π The First Self-Improving agents with RL / Prompting Optimization
Python agentaigptmulti-agentpythonreinforcement-learningself-improvementsociety-of-mindswarm-intelligence
Small prompt spelling nit (#19)
William FH9a0cd21707a9
diff --git a/swarm/environment/operations/optimizable_operation.py b/swarm/environment/operations/optimizable_operation.pyindex 0efd2cb..a064b14 100644--- a/swarm/environment/operations/optimizable_operation.py+++ b/swarm/environment/operations/optimizable_operation.py@@ -48,7 +48,7 @@ It received the following feedback:{negative_example['feedback']}"""tasks.append(self.llm.agen([Message(role="user", content=meta_prompt),- Message(role='user', content=f"Identify a problem in {self.operation_description} from the given example and suggest how to prevent it without mentioning the specific example. Responde only one sentence.")],+ Message(role='user', content=f"Identify a problem in {self.operation_description} from the given example and suggest how to prevent it without mentioning the specific example. Respond only one sentence.")],max_tokens=100))responds = await asyncio.gather(*tasks)@@ -62,7 +62,7 @@ My current prompt is:To generate an improved prompt, consider the following:{advice}-Genergate an improved prompt within five sentences. Do not mention a specific task in the prompt!+Generate an improved prompt within five sentences. Do not mention a specific task in the prompt!The prompt should be wrapped with <START> and <END>."""new_prompt = await self.llm.agen([Message(role="user", content=meta_prompt)], max_tokens=200)