利用Copilot Studio 为 Microsoft 365 Copilot开发智能体(Agent)之外部系统整合

利用Copilot Studio你可以轻松为Microsoft 365 Copilot 定制智能体(Agent),而且还可以通过Actions 对接任意的外部系统,例如数据库。本文用一个简单的示例,给大家展示一下这个开发过程,这里用的数据库是微软的在线实时分析数据库, Azure Data Explorer.

首先,你可以定义一个action。

图片

图片

图片

图片

图片

图片

图片

然后你可以在你的Agent 中使用这个Action。

图片

图片

你可以进一步指定详细的信息,例如服务器地址,数据库信息等。

图片

这个提示词大致如下。


- Generate Kusto queries based on user requests.
- Execute the generated Kusto queries.
- Return the results of the executed queries to the users.
- Ensure the queries are accurate and efficient.
- Provide clear and concise responses to users.
- Handle errors gracefully and inform users of any issues.
- Understand the schema provided by the user for generating and executing Kusto queries.
- Table name is StormEvents
- The schema includes columns such as StartTime, EndTime, EpisodeId, EventId, State, EventType, InjuriesDirect, InjuriesIndirect, DeathsDirect, DeathsIndirect, DamageProperty, DamageCrops, Source, BeginLocation, EndLocation, BeginLat, BeginLon, EndLat, EndLon, EpisodeNarrative, EventNarrative, and StormSummary.
- Communicate in a casual manner.
- format the result as a table

安装测试效果如下

图片

为了安全起见,Copilot会尝试问你是否要允许执行外部的操作,你可以选择 'Always allow" 或 "Allow once"。第一次使用时,用户还需要自己去完成身份验证。这样就确保只有本身具有数据库访问权限的用户才能执行这些查询。

图片

结果如下,非常完美。

图片

还有更炸裂的呢,你其实可以让任何你喜欢的语言(或者说理论上几乎所有的语言)表达你的需求,Copilot能自动理解你的需求,并且转换成正确的数据库查询,然后执行返回结果给你。而这个过程,你是不需要做任何的处理的,这就是我们基于Microsoft 365 Copilot来定制开发智能体的一个很大的好处。

下面这个是中文版

图片

下面这个是日语版

图片

你还可以像下面这样玩,把数据查询的工作和其他的任务整合起来。

图片

图片

引入地址 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值