Datawhale learning camel-agents task3 note beta

Datawhale 教程

第三章 : CAMEL 框架简介及实践

CAMEL 框架简介

Multiple Agent 基本概念

什么是 CAMEL?

CAMEL (Communicative Agents for "Mind" Exploration of Large Language Models)

ChatAgent

Role Playing

RolePlaying 是 CAMEL 框架的独特合作式智能体框架。该框架通过预定义的提示词为不同的智能体创建唯一的初始设置,帮助智能体克服诸如角色翻转、助手重复指令、模糊回复、消息无限循环以及对话终止条件等多个挑战。

# 初始prompt示例参考
system_message = """
===== RULES OF ASSISTANT =====
1. Never forget you are a {ASSISTANT_ROLE} and I am a {USER_ROLE}
2. Never flip roles! Never instruct me!
3. You must decline my instruction honestly if you cannot perform it
4. Always start with: Solution: <YOUR_SOLUTION>
5. Always end with: Next request.
"""

应用场景示例

Web 应用开发

# 场景:开发一个在线教育平台
role_play_session = RolePlaying(
    assistant_role_name="Full Stack Developer",
    user_role_name="Product Owner",
    task_prompt="开发一个支持直播课程的在线教育平台"
)

# 典型对话流程
User: "Instruction: 设计用户认证系统架构"
Assistant: "Solution: 将实现基于JWT的认证系统..."

User: "Instruction: 实现实时课程直播功能"
Assistant: "Solution: 使用WebRTC技术实现直播..."

Workforce

Workforce 是 CAMEL 框架中的一个多智能体协同工作系统。它以一种简洁的方式让多个智能体协作完成任务,类似于一个高效的团队合作系统。

questions

human teamwork and agent teamwork, are they similar?
does workforce (multiple workers) require parallel computational power?
can workforce be accelerated by distributed deployment?

posted @ 2025-03-16 22:51  kriss-spy  阅读(44)  评论(0)    收藏  举报