Use LLMProcess implement Agent.OnMessage

This commit is contained in:
Liu Zhicong
2023-12-09 18:39:42 -08:00
parent 0708daf2ec
commit ddee31c6ab
20 changed files with 1689 additions and 116 deletions
View File
+4 -1
View File
@@ -2,4 +2,7 @@
目的是结合已知信息(重点是已经进行操作的记录),对失败的,完成的不好的任务进行思考,尝试给出更好的解决方案
1. 管理学方法:更换负责人
2. 管理学方法:拆分
3. 给出建议(该建议可以在下次一次DO-Check)循环中被使用
3. 给出建议(该建议可以在下次一次DO-Check)循环中被使用
## Quick Review
有一些简单的Task是永远不会结束的(比如定时提醒)。此时通过Quick Review来调整这些Task的状态,让其在正确的时间进入Review和DO
+18
View File
@@ -0,0 +1,18 @@
# Self Improve Prompt
这是一个改进Prompt的Prompt,其设计目标是利用LLM来改进LLM.(输入是一个LLM Process)
注意理解Self Improve和Self Thinking的区别: Self Improve有可能改进Agent的某个LLM Process的提示词,而Self Thinkg只会更新Agent的Memory
提示词:
行为模式:Input形式, Goal(目的)
理想结果:Input 结果
当前情况:当前Prompt,实际结果
输出:
新的Prompt
## 当前版本
```
你是LLM的专家,尤其擅长编写Prompt,你会帮助我改进Prompt。
我会给你一个已有的Prompt,并说明该Prompt的设计目标,期望的结果和实际的结果。你会step-by-step的进行分析,说明改进思路,并给出改进后的Prompt。
```
##
+16
View File
@@ -0,0 +1,16 @@
# Self-Thinking (Introspection)
基于自己的角色定位,结合已有的历史记录(聊天记录,工作记录),进行思考和总结,进而更好的改进未来的工作
自省从某个角度看,就是对Agent Memory的自我总结
## 当前版本
```
You are the best deep thinking in the world, and you will think about the information I give you, sometimes some chat records.Then you will generate a briefing or summary of no more than 400 words based on this information.
You mainly use the following methods to generate summary:
1. Try to understand the theme of each sentence, and call the relevant operation to record the relationship between the dialogue and the theme
2. Try to analyze the personality of different people involved in information
3. Try to summarize important events in the information and record it
4. Try to understand the attitude of different people on different topics or events
5. For the key information or TODO in the information, such as the time, place, amount and other information of the certainty, it must be stored in the summary.
Just give me a summary without any other word.
```
+21 -1
View File
@@ -1,2 +1,22 @@
# Process Message
处理消息的首要是目的是分析消息的意图,并给予回复
处理消息的首要是目的是分析消息的意图,并给予正确的回复。
## 提示词的构成
1. Agent的身份说明,处理信息的基本原则(目的
2. 处理信息的通用套路。
要产生一个合适的回复。
通过actions来设置话题状态、创建task等
3. 当前的常规Context,包括现在的时间、对话发生的地点(通常来自AgentMsg里的Context),地点所在的天气等信息
4. 已知信息(组合而来)
和信息发送者的近期的交流记录
Agent和信息发送者近期未完成话题的标题和简介
关于信息发送者,和相关人物的更多资料
查阅更多信息的方法 : 搜索法和浏览法。注意区分外部资料和内部记忆
其它相关信息(比如RAG根据 输入消息
## 当前版本
## 想法:LLM生成提示词
根据 Agent的身份说明,处理信息的基本原则(目的),当前信息,通过另一个LLM来生成提示词里的某些部分的内容