You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Introduced a new link for analyzing customer-agent engagement in conversations using OpenAI's GPT-4.1 model.
- Implemented functionality to analyze transcripts, store results as analyses and tags, and included retry logic and error handling.
- Added comprehensive tests to ensure functionality and reliability.
- Updated README.md with configuration options, features, and metrics for the new link.
This link analyzes conversations to determine if both the customer and agent are engaged in the dialogue. It uses OpenAI's GPT-4.1 model to analyze transcripts and determine engagement status.
4
+
5
+
## Features
6
+
7
+
- Analyzes each dialog in a vCon to detect engagement
8
+
- Uses GPT-4.1 for accurate conversation analysis
9
+
- Stores results both as analysis and tags
10
+
- Includes retry logic and error handling
11
+
- Provides metrics for monitoring
12
+
13
+
## Configuration Options
14
+
15
+
The link can be configured with the following options:
16
+
17
+
```python
18
+
default_options = {
19
+
"prompt": "Did both the customer and the agent speak? Respond with 'true' if yes, 'false' if not. Respond with only 'true' or 'false'.",
20
+
"analysis_type": "engagement_analysis",
21
+
"model": "gpt-4.1",
22
+
"sampling_rate": 1,
23
+
"temperature": 0.2,
24
+
"source": {
25
+
"analysis_type": "transcript",
26
+
"text_location": "body.paragraphs.transcript",
27
+
}
28
+
}
29
+
```
30
+
31
+
### Options Description
32
+
33
+
-`prompt`: The prompt used to analyze engagement
34
+
-`analysis_type`: The type of analysis to store in the vCon
35
+
-`model`: The OpenAI model to use (default: gpt-4.1)
36
+
-`sampling_rate`: Rate at which to sample vCons for analysis
37
+
-`temperature`: Model temperature for response generation
38
+
-`source`: Configuration for where to find the transcript data
39
+
40
+
## Output
41
+
42
+
The link adds two types of data to the vCon:
43
+
44
+
1. Analysis: Stores the engagement status as an analysis object
45
+
2. Tags: Adds an "engagement" tag with the boolean result
46
+
47
+
## Metrics
48
+
49
+
The link provides the following metrics:
50
+
51
+
-`conserver.link.openai.engagement_detected`: Gauge for engagement status
52
+
-`conserver.link.openai.engagement_analysis_time`: Time taken for analysis
53
+
-`conserver.link.openai.engagement_analysis_failures`: Count of analysis failures
0 commit comments