向 AppAgent 提供人类演示
用户或应用程序开发人员可以向 AppAgent
提供人类演示,以指导它未来执行类似任务。AppAgent
利用这些演示来理解任务的上下文以及执行任务所需的步骤,从而有效地成为应用程序的专家。
如何为 AppAgent 准备人类演示?
目前,UFO 支持从 Windows 中集成的问题步骤记录器录制的用户轨迹中学习。未来将支持更多工具。
步骤 1:录制用户演示
按照官方指南使用问题步骤记录器录制用户演示。
步骤 2:根据需要添加额外信息或注释
通过添加注释,包含任何 UFO 需要注意的特定细节或指令。由于问题步骤记录器不捕获输入的文本,因此也要将任何必要的输入内容包含在注释中。
步骤 3:审查并保存录制的演示
审查录制的步骤并将其保存为 ZIP 文件。请参阅sample_record.zip,获取针对特定请求(例如“发送一封电子邮件至 example@gmail.com 说声嗨”)的录制步骤示例。
步骤 4:创建动作轨迹索引器
一旦您的演示记录 ZIP 文件准备就绪,您可以将其解析为示例,以支持 UFO 的 RAG。请按照以下步骤操作
# Assume you are in the cloned UFO folder
python -m record_processor -r "<your request for the demonstration>" -p "<record ZIP file path>"
- 将
<your request for the demonstration>
替换为特定请求,例如“发送一封电子邮件至 example@gmail.com 说声嗨。” - 将
<record ZIP file path>
替换为您刚刚创建的 ZIP 文件的完整路径。
此命令将解析记录并将其总结为执行计划。您将看到类似以下的确认消息
Here are the plans summarized from your demonstration:
Plan [1]
(1) Input the email address 'example@gmail.com' in the 'To' field.
(2) Input the subject of the email. I need to input 'Greetings'.
(3) Input the content of the email. I need to input 'Hello,\nI hope this message finds you well. I am writing to send you a warm greeting and to wish you a great day.\nBest regards.'
(4) Click the Send button to send the email.
Plan [2]
(1) ***
(2) ***
(3) ***
Plan [3]
(1) ***
(2) ***
(3) ***
Would you like to save any one of them as a future reference for the agent? Press [1] [2] [3] to save the corresponding plan, or press any other key to skip.
按 1
将计划保存到其内存中以供将来参考。示例可在此处找到。
您可以在下方观看演示视频
如何使用人类演示来增强 AppAgent?
创建离线索引器后,请参阅从用户演示中学习部分,获取关于如何使用人类演示来增强 AppAgent 的指导。