CAMEL technique
The Communicative Agents for “Mind” Exploration of Large Language Model Society (CAMEL) technique uses two LLM agents that take on specific roles and cooperate to complete a given task through a structured conversation. This approach aims to reduce the need for human intervention in guiding the conversation and allows for more autonomous problem-solving. For more information, see CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Society.
To implement the CAMEL technique:
- Define roles. For example:
- Assistant Agent: Computer Programmer
- User Agent: Mathematics Expert
- Create a task, for example: "Implement an efficient Fibonacci sequence calculator in Python."
- Use the “Inception Prompt” templates provided by the authors. See the Code Inception Prompt template in Figure 4.
- Task Specifier Prompt: Fill out the blanks in the template to make the task more specific.
- Assistant System Prompt: Fill out the role (Computer Programmer), user role (Mathematics Expert), programming language (Python), and task description.
- User System Prompt: Fill out the role (Mathematics Expert), assistant role (Computer Programmer), programming language (Python), and task description.
- Start the conversation: Begin with a user (Mathematics Expert) instruction.
- Maintain the conversation flow: The user gives one instruction at a time. The assistant responds with solutions, starting with "Solution:" and ending with "Next request." Continue until the task is complete.
- End the conversation: The user ends with "<CAMEL_TASK_DONE>" when satisfied.
The following figure from CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Society shows a code inception prompt example:
Figure 4. Code Inception Prompt