상담사 지원을 사용하면 상담사가 최종 사용자와 상담사 간의 대화를 모니터링할 수 있습니다. 상담사에게 대화를 에스컬레이션할 시점을 정의하는 규칙을 정의합니다. 그러면 대화가 규칙 중 하나와 일치할 때 상담사 지원에서 상담사에게 자동으로 알림을 보냅니다.
대화에서 각 최종 사용자 차례에 감정 점수와 스크립트가 표시됩니다. 규칙은 이러한 감정 점수 또는 AI 코치를 사용하여 상담사가 알림을 받는 시점을 결정할 수 있습니다.
시작하기 전에
상담사 지원을 사용하려면 Agent Assist 대화 프로필과 다음 Identity and Access Management (IAM) 역할이 필요합니다.
dialogflow.virtualAgentMonitoringSupervisordialogflow.processor
1단계: 대화 프로필 구성
대화 프로필 은 대화 중 에이전트에 제공되는 추천을 제어하는 매개변수 집합을 구성합니다. 다음 단계에서는
ConversationProfile을(를) 사용하여
HumanAgentAssistantConfig
객체를 만듭니다. API를 직접 호출하지 않으려면
Agent Assist 콘솔을 사용하여 이러한 작업을 수행할 수도 있습니다.
대화 프로필 만들기
대화 프로필을 만들려면 create 리소스에서
ConversationProfile
메서드를 호출합니다. 기술 자료 ID, 문서 ID, 프로젝트 ID, 모델 ID를 제공합니다. 응답에 새 대화 프로필 ID가 포함됩니다.
다음은 JSON 예시입니다.
{
"displayName": "smart_compose_assist",
"humanAgentAssistantConfig": {
"humanAgentSuggestionConfig": {
"featureConfigs": [
{
"suggestionFeature": {
"type": "SMART_COMPOSE"
},
"queryConfig": {
"documentQuerySource": {
"documents": "projects/project-id/knowledgeBases/knowledge-base-id/documents/document-id"
},
"maxResults": "1"
},
"conversationModelConfig": {
"model": "projects/project-id/conversationModels/model-id"
}
}
]
}
}
}
2단계: 감정 또는 AI 코치 선택
감정 분석, AI 코치 또는 둘 다를 사용하여 대화를 모니터링할지 선택합니다. 에스컬레이션 규칙에도 이 선택사항이 반영됩니다.
감정
대화 전반에 걸쳐 최종 사용자의 감정을 분석하려면 대화 프로필에 감정 분석을 추가합니다.
AI 코치
AI 코치로 대화를 분석하려면 안내에 따라 AI 코치 생성기를 만듭니다. 대화 프로필 하나에 AI 코치 생성기를 한 번에 하나만 만들 수 있습니다. AI 코치 생성기에 무제한으로 안내를 추가할 수 있으며 각 안내에는 표시 제목 과 조건 이 하나 이상 포함되어야 합니다.
생성기를 만든 후 새 생성기 ID를 복사하여 대화 프로필에 추가합니다.
3단계: 대화를 모니터링하는 규칙 구성
감정 또는 AI 코치를 사용하는 고객 지원 대화의 모니터링 규칙을 사용 설정하고 구성하도록 대화 프로필을 업데이트합니다. API로 대화 프로필을 업데이트하려면 다음 옵션 중 하나를 선택합니다.
ConversationProfile리소스에서update메서드를 호출합니다.UpdateConversationProfile메서드로 상호작용 모니터링 구성을 설정합니다. 상호작용 모니터링 구성을 설정하는 요청은 다음 예시와 같아야 합니다.conversation_profile { name: "projects/agent-assist-console-demo/locations/global/conversationProfiles/your_new_conv_profile_id" interaction_monitoring_config { event_notification_config = { notification_config = { # If you want to enable notifications on your custom pub/sub topic, add it here. topic = 'ADD_YOUR_CUSTOM_PUBSUB_TOPIC' message_format = 'JSON' } # Optional: Leave both empty for *Default Mode*. # Other supported configurations: # 1. **Default Mode:** Always publish alert events when they are triggered and publish metric events only when an alert is triggered, # - Metric event: `METRIC_EVENT_PUBLISH_IF_ALERT_TRIGGERED` # - Alert event: `ALERT_EVENT_ALWAYS_PUBLISH` # 2. **Pure Monitoring Mode:** Publish all metric events, but never publish alert events. # - Metric event: `METRIC_EVENT_ALWAYS_PUBLISH` # - Alert event: `ALERT_EVENT_NEVER_PUBLISH` # 3. **Publish All Events:** Always publish both metric and alert events. # - Metric event: `METRIC_EVENT_ALWAYS_PUBLISH` # - Alert event: `ALERT_EVENT_ALWAYS_PUBLISH` # Note: Avoid setting `metric_event_notification_mode` to `METRIC_EVENT_PUBLISH_IF_ALERT_TRIGGERED` while `alert_event_notification_mode` is `ALERT_EVENT_NEVER_PUBLISH`, as this combination will result in no events being published. metric_event_notification_mode = 'ADD' alert_event_notification_mode = 'ADD' } alerting_config { # Required. rules { alert_rule_id: "rule_1" description: "rule_1_description" trigger_condition { ... } rules { alert_rule_id: "rule_2" description: "rule_2_description" trigger_condition { ... } } # Optional Tool config to retrieve customer name. If not required, skip setting the metadata_config metadata_config = { tool_configs = [ { display_name = 'Customer Name' toolset_tool = { toolset = 'ADD_CUSTOM_TOOLSET' operation_id = 'load_profile' } response_key_path = 'sessionInfo.customerProfile.customerName' }, ] } } } } update_mask { paths: "interaction_monitoring_config" } }
추가 지원은 Google Cloud 담당자에게 문의하세요.
구성 예시
다음 예시에서는 다양한 모니터링 규칙 조합의 대화 프로필 구성을 보여줍니다.
예시 1: AI 코치 규칙이 일치함
conversation_profile {
name: "projects/agent-assist-console-demo/locations/global/conversationProfiles/your_new_conv_profile_id"
interaction_monitoring_config {
event_notification_config = {
...
}
alerting_config {
rules {
alert_rule_id: "agent coaching alert trigger rule(s) matched"
description: "agent coaching alert trigger rule(s) matched"
trigger_condition {
metric_condition {
metric_type: AGENT_COACHING_INSTRUCTIONS
agent_coaching_config {
generator_name: "projects/agent-assist-console-demo/locations/global/generators/newly_created_generator_id"
}
display_name: "agent coaching alert trigger rule(s) matched"
}
}
}
# Optional Tool config to retrieve customer name. If not required, skip setting the metadata_config.
metadata_config = {
...
}
}
}
}
update_mask {
paths: "interaction_monitoring_config"
}
예시 2: 감정 점수 < -0.01
conversation_profile {
name: "projects/agent-assist-console-demo/locations/global/conversationProfiles/your_new_conv_profile_id"
interaction_monitoring_config {
event_notification_config = {
...
}
alerting_config {
rules {
alert_rule_id: "customer sentiment negative"
description: "negative sentiment"
trigger_condition {
metric_condition {
metric_type: SENTIMENT
value_range {
max_threshold: -0.01
}
display_name: "negative sentiment"
}
}
}
# Optional Tool config to retrieve customer name. If not required, skip setting the metadata_config.
metadata_config = {
...
}
}
}
}
update_mask {
paths: "interaction_monitoring_config"
}
예시 3: 감정 점수 < -0.01이고 AI 코치 규칙이 일치함
conversation_profile {
name: "projects/agent-assist-console-demo/locations/global/conversationProfiles/your_new_conv_profile_id"
interaction_monitoring_config {
event_notification_config = {
...
}
alerting_config {
# Required.
rules {
alert_rule_id: "sentiment is negative and agent coaching alert trigger rule(s) matched"
description: "agent coaching alert trigger rule(s) matched and customer is unhappy"
trigger_condition {
and_condition {
alert_conditions {
metric_condition {
metric_type: SENTIMENT_SCORE
value_range {
max_threshold: -0.01
}
display_name: "negative sentiment and agent coaching alert trigger rule(s) matched"
}
}
alert_conditions {
metric_condition {
metric_type: AGENT_COACHING_INSTRUCTIONS
agent_coaching_config {
generator_name: "projects/agent-assist-console-demo/locations/global/generators/newly_created_generator_id"
}
display_name: "negative sentiment and agent coaching alert trigger rule(s) matched"
}
}
}
}
}
# Optional Tool config to retrieve customer name. If not required, skip setting the metadata_config.
metadata_config = {
...
}
}
}
}
update_mask {
paths: "interaction_monitoring_config"
}
예시 4: AI 코치 규칙이 일치하거나 감정 점수 < -0.01
conversation_profile {
name: "projects/agent-assist-console-demo/locations/global/conversationProfiles/your_new_conv_profile_id"
interaction_monitoring_config {
event_notification_config = {
...
}
alerting_config {
rules {
alert_rule_id: "agent coaching alert trigger rule(s) matched"
description: "agent coaching alert trigger rule(s) matched"
trigger_condition {
metric_condition {
metric_type: AGENT_COACHING_INSTRUCTIONS
agent_coaching_config {
generator_name: "projects/agent-assist-console-demo/locations/global/generators/newly_created_generator_id"
}
display_name: "agent coaching alert trigger rule(s) matched"
}
}
}
rules {
alert_rule_id: "customer sentiment negative"
description: "negative sentiment"
trigger_condition {
metric_condition {
metric_type: SENTIMENT
value_range {
max_threshold: -0.01
}
display_name: "negative sentiment"
}
}
}
# Optional Tool config to retrieve customer name. If not required, skip setting the metadata_config.
metadata_config = {
...
}
}
}
}
update_mask {
paths: "interaction_monitoring_config"
}
4단계: 상담사 지원 구성
- 알림을 수신할 Pub/Sub 주제를 만듭니다. Agent Assist는 이 Pub/Sub 주제를 사용하여 알림과 측정항목을 수신합니다. 주제 ID를 기록해 둡니다.
- 허용 목록에 추가할 프로젝트 및 Pub/Sub 주제 ID를 Google에 제출합니다.
상담사 간 모니터링 서비스는 다음 이벤트 유형을 게시합니다.
- 감정 측정항목은 대화의 모든 최종 사용자 차례에 대한 집계된 감정 계산입니다.
- 알림 이벤트는 감정이 구성된 기준점을 위반할 때 Agent Assist에서 생성하는 규칙 세부정보가 포함된 알림입니다.
상담사 지원은 이러한 두 이벤트의 다양한 통합 요구사항을 해결하기 위해 다음 표준 구성을 지원합니다. 상호작용 모니터링 구성에 이러한 설정을 포함할 수 있습니다.
- 기본 모드: 조건이 충족되면 알림이 즉시 게시됩니다. 감정 측정항목은 알림이 시작된 후에만 게시됩니다.
- 순수 모니터링 모드: 감정 측정항목은 모든 차례에 대해 지속적으로 게시됩니다. 알림 이벤트는 무시됩니다.
- 모두 게시 모드 동작: 두 가지 유형의 이벤트가 항상 무조건 게시됩니다.
5a단계: 채팅 테스트
채팅 시뮬레이터로 상담사 지원을 테스트하려면 다음 단계를 따르세요.
모니터링 시뮬레이터로 이동합니다.
https://agentassist.cloud.google.com/projects/project-id/locations/location-id/human-supervisor
설정설정 을 클릭하고 상담사 를 선택합니다.
브라우저에서 다른 탭을 열고 대화 프로필을 사용하여 채팅 대화 시뮬레이터 로 이동합니다.
대화 시뮬레이터에서 대화를 시작하고 모니터링 시뮬레이터에 스크립트와 감정 점수가 표시되는지 확인합니다.
5b단계: 음성 테스트
음성 시뮬레이터로 상담사 지원을 테스트하려면 다음 단계를 따르세요.
모니터링 시뮬레이터로 이동합니다.
https://agentassist.cloud.google.com/projects/project-id/locations/location-id/human-supervisor
설정설정을 클릭한 다음 상담사 및 전화 통화만 모니터링을 선택합니다.
브라우저에서 다른 탭을 열고 대화 프로필을 사용하여 음성 대화 시뮬레이터 로 이동합니다.
통화음성으로 전환 을 클릭합니다.
상담사의 전화번호를 입력합니다.
다른 번호의 다른 휴대전화를 사용하여 화면에 표시된 새 번호로 전화를 겁니다.
점수 지도
상담사 지원은 두 가지 점수를 제공합니다.
- 차례별 감정 점수는 -1에서 1까지의 이산 부동 소수점 값입니다.
- 시점별 감정 점수는 -1에서 1까지의 연속 부동 소수점 값입니다.
연속 시점별 감정 점수를 다양한 사업부에 적합한 맞춤 점수에 매핑할 수 있습니다. 다음 예시에서는 매핑 접근 방식 하나를 보여줍니다.
매핑을 위한 JavaScript 코드 예시:
/**
* Maps a score to a bucket index (1-10) based on 11 boundary points.
* * @param {number} score - The input score (between -1 and 1)
* @param {number[]} boundaries - An array of exactly 11 numbers sorted in ascending order.
* @return{number} The bucket index (1 to 10).
*/
function getBucketIndex(score, boundaries) {
// 1. Validation: Ensure we have exactly 11 boundary points
if (!Array.isArray(boundaries) || boundaries.length !== 11) {
throw new Error("Boundaries must be an array of exactly 11 points.");
}
// 2. Validate Input Score Range
if (typeof score !== 'number' || score < -1 || score > 1) {
throw new Error(`Input score ${score} is out of bounds. Must be between -1 and 1.`)
}
// 3. Iterate through boundaries to find the slot
// We start checking from index 1 (the first upper bound)
for (let i = 1; i < boundaries.length; i++) {
// If the score is strictly less than the current boundary,
// it belongs to the bucket corresponding to this index.
if (score <= boundaries[i]) {
return i;
}
}
// Fallback (should be covered by step 2 validation, but ensures integer return)
return -1;
}
// --- Example Usage ---
// Create 11 boundary points from -1 to 1
// [-1.0, -0.8, -0.6, -0.4, -0.2, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0]
const boundaries = [];
for (let i = 0; i <= 10; i++) {
// Creating points: -1 + (i * 0.2)
boundaries.push(parseFloat((-1 + (i * 0.2)).toFixed(1)));
}
console.log("Boundaries:", boundaries);
// Test Cases
console.log(`Score -0.9 maps to Bucket: ${getBucketIndex(-0.9, boundaries)}`); // Expected: 1
console.log(`Score -0.8 maps to Bucket: ${getBucketIndex(-0.8, boundaries)}`); // Expected: 2 (Inclusive lower)
console.log(`Score 0.0 maps to Bucket: ${getBucketIndex(0.0, boundaries)}`); // Expected: 6
console.log(`Score 0.95 maps to Bucket: ${getBucketIndex(0.95, boundaries)}`); // Expected: 10
console.log(`Score 1.0 maps to Bucket: ${getBucketIndex(1.0, boundaries)}`); // Expected: 10 (Inclusive upper)
선택적으로 다음 코드를 사용하여 매핑된 예측과 CX 점수 간의 상관관계를 극대화하는 기준점을 자동으로 결정하여 매핑을 최적화합니다. 데이터에 이 일회성 최적화를 실행한 후에는 수동으로 구성하는 대신 결과 데이터 기반 경계를 사용할 수 있습니다.
Pub/Sub 활동 알림
감정 측정항목과 알림은 모두 구성된 단일 Pub/Sub 주제에 게시됩니다. 페이로드는 이벤트 유형에 따라 다릅니다.
감정 측정항목 Pub/Sub 메시지 페이로드:
{
"data": "{\"metric\":{\"metricType\":\"SENTIMENT_SCORE\",\"value\":{\"createTime\":\"2024-01-01T00:00:00.000Z\",\"sentiment\":{\"score\":0.5,\"magnitude\":0.5},\"advancedValues\":{\"exponentialMovingAverageValue\":0.5}},\"conversation\":\"projects/your-project-id/locations/global/conversations/conversation_id\",\"message\":{\"name\":\"projects/your-project-id/locations/global/conversations/conversation_id/messages/message_id\",\"content\":\"ok\",\"languageCode\":\"en-US\",\"participant\":\"projects/your-project-id/locations/global/conversations/conversation_id/participants/participant_id\",\"participantRole\":\"END_USER\",\"sendTime\":\"2024-01-01T00:00:00.000Z\"}}}",
"attributes": {
"conversation_id": "conversation_id"
}
}
pubsub 메시지 페이로드 예시 변경:
{"data": "{\"alert\":{\"name\":\"projects/project_id/locations/location_id/interactionMonitoringAlerts/alert_id\",\"conversation\":\"projects/project_id/locations/location_id/conversations/conversation_id\",\"alertState\":\"CREATED\",\"alertMetadata\":{\"alertTriggerRules\":[{\"alertRuleId\":\"negative-sentiment\",\"description\":\"dummy_description\",\"Strong negative sentiment detected in last 30 seconds\":[{\"metricType\":\"SENTIMENT_SCORE\",\"values\":[{\"createTime\":\"2024-01-01T00:00:00.000Z\",\"sentiment\":{\"score\":0.0,\"magnitude\":0.0}}]}]}],\"channelType\":\"CHAT\"},\"createTime\":\"2024-01-01T00:00:00.000Z\"}}",
"attributes": {
"conversation_id": "conversation_id"
}
}
API 참조
- 사용 사례: 최종 사용자와 상담사 간의 채팅 대화를 모니터링합니다.
- 테스트 방법:
- 콘솔 시뮬레이터: Agent Assist 콘솔 채팅 시뮬레이터를 사용합니다.
- API 통합: 직접 HTTP 또는 RPC 요청을 보냅니다([코드 예시] 참고).
- 사용 사례: 최종 사용자와 상담사 간의 음성 대화를 모니터링합니다.
- 테스트 방법:
- 콘솔 시뮬레이터: Agent Assist 콘솔 음성 시뮬레이터를 사용합니다.
- API 통합: 직접 HTTP 또는 RPC 요청을 보냅니다([코드 예시] 참고).
- 대화의 전체 스크립트 목록 (상담사 및 고객 차례 모두)을 가져옵니다.
- 권장사항: 이 API는 스트림이 종료된 후 모든 차례의 최종 수정된 스크립트를 확인하는 음성 대화에 특히 유용합니다.
ListInteractionMonitoringMetrics: 특정 대화에 대해 계산되고 집계된 모든 감정 측정항목을 가져옵니다.
요청 페이로드 예시:
{
"parent": "projects/{project-id}/locations/{location-id}",
"conversation":
"projects/{project-id}/locations/{location-id}/conversations/{conversation-id}"
}
응답 페이로드 예시:
{
"interactionMonitoringMetrics": [{
"metricType": "SENTIMENT_SCORE",
"values": {
"createTime": "2025-12-01T22:20:49.925Z",
"sentiment": {
"score": -1.0,
"magnitude": 1.0
},
"advancedValues": {
"movingAverageValue": -0.4994999999762513
}
}, {
"createTime": "2025-12-01T22:20:21.027Z",
"sentiment": {
"score": 0.001,
"magnitude": 0.001
},
"advancedValues": {
"movingAverageValue": -0.4994999999762513
}
},
"advancedValues": {
}
}]
}
ListInteractionMonitoringAlert: 생성된 알림을 가져옵니다. 전체 프로젝트로 범위를 지정하거나 특정 대화로 필터링할 수 있습니다.
프로젝트의 모든 알림을 쿼리하려면 다음 안내를 따르세요.
{
"parent": "projects/{project-id}/locations/{location-id}"
}
**특정 대화 ID의 알림을 쿼리하려면 다음 안내를 따르세요. **
{
"parent": "projects/{project-id}/locations/{location-id}",
"filter": "context_id=projects/{project-id}/locations/{location-id}/conversations/{conversation-id}"
}
필터링 옵션. 사용자는 알림 상태와 같은 추가 필터 기준을 적용할 수 있습니다.
alert_state=CREATED,alert_state=ACKNOWLEDGED