Skip to content

Winston-Hu/Agent-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Agent-sample

参考:

  1. 手把手带你从0到1实现大模型agent by @acedar-C大 https://www.bilibili.com/video/BV1Sz421m7Rr?spm_id_from=333.788.videopod.episodes&vd_source=17bc3f952f3aa47048893d0a5a16767c&p=2
  2. https://github.com/Yazooliu/agent_from_0t1/tree/main by @Yazooliu

关于一些变量的意义:

(1) agent_scratch 和 observation:

首先我通过get.('speak')拿到当前Agent要说的东西, 但是Agent需要多轮思考再给我final_answer。
所以需要agent_scratch来思考总结多轮思考了什么,observation就是get.('speak')

一个简单的例子:
Round 1:
Thoughts: 我需要先查找用户信息。
Action: search_user
Observation: 找到了用户 Alice,她有3个订单。

Round 2:
Thoughts: 接下来我应该筛选出未完成的订单。
Action: filter_pending_orders
Observation: 找到2个未完成订单。

Round 3:
Thoughts: 我需要发送邮件提醒她。
Action: send_email
Observation: 邮件已成功发送。

功能:
记忆中间过程,帮助 Agent 记住之前干了什么
提供反思能力,让 Agent 能反思自己的计划是否有效
Prompt 组成部分,可以拼进下一轮的 Prompt 中,引导 LLM 产出更有连贯性的动作

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages