你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
有关在 Azure 门户中使用这些查询的信息,请参阅 Log Analytics 教程。 有关 REST API,请参阅 查询。
按用户进行的 Copilot 交互
显示过去 7 天内按用户分组的计数和时间范围的 Copilot 交互
LLMActivity
| where RecordType == "CopilotInteraction"
| where TimeGenerated >= ago(7d)
| summarize InteractionCount = count(),
FirstInteraction = min(TimeGenerated),
LastInteraction = max(TimeGenerated)
by ActorName, ActorUserId
| order by InteractionCount desc
Copilot 插件管理活动
显示过去 30 天内插件的创建、更新和状态更改
LLMActivity
| where RecordType in ("CreateCopilotPlugin", "UpdateCopilotPlugin", "EnableCopilotPlugin", "DisableCopilotPlugin")
| where TimeGenerated >= ago(30d)
| project TimeGenerated, ActorName, RecordType, AgentName, SrcIpAddr
| order by TimeGenerated desc
Copilot PromptBook 管理
跟踪过去 30 天内的 PromptBook 创建、更新和删除
LLMActivity
| where RecordType in ("CreateCopilotPromptBook", "UpdateCopilotPromptBook", "DeleteCopilotPromptBook")
| where TimeGenerated >= ago(30d)
| extend PromptBookId = tostring(LLMEventData.Resource[0].Property)
| project TimeGenerated, ActorName, RecordType, PromptBookId, SrcIpAddr
| order by TimeGenerated desc
Copilot 安全性和符合性事件
显示与安全相关的 Copilot 事件,包括过去 7 天内的越狱检测
LLMActivity
| where RecordType == "CopilotInteraction"
| where TimeGenerated >= ago(7d)
| extend Messages = LLMEventData.Messages
| mv-expand Messages
| where tobool(Messages.JailbreakDetected) == true
| project TimeGenerated, ActorName, ActorUserId, AgentName,
MessageId = tostring(Messages.Id),
JailbreakDetected = tobool(Messages.JailbreakDetected)
| order by TimeGenerated desc
AI 模型使用情况统计信息
显示过去 30 天内在 Copilot 交互中使用的 AI 模型
LLMActivity
| where RecordType == "CopilotInteraction"
| where TimeGenerated >= ago(30d)
| where isnotempty(AIModelName)
| summarize InteractionCount = count(),
UniqueUsers = dcount(ActorUserId),
FirstUsed = min(TimeGenerated),
LastUsed = max(TimeGenerated)
by AIModelName, AIModelVersion
| order by InteractionCount desc
Copilot 访问的资源
显示过去 7 天内在 Copilot 交互期间访问的外部资源
LLMActivity
| where RecordType == "CopilotInteraction"
| where TimeGenerated >= ago(7d)
| extend AccessedResources = LLMEventData.AccessedResources
| mv-expand AccessedResources
| where isnotempty(AccessedResources.SiteUrl)
| project TimeGenerated, ActorName, AgentName,
ResourceUrl = tostring(AccessedResources.SiteUrl),
Action = tostring(AccessedResources.Action),
ResourceType = tostring(AccessedResources.Type)
| summarize AccessCount = count() by ResourceUrl, Action, ResourceType
| order by AccessCount desc