Skip to content

Commit 726b1b6

Browse files
author
Bob Strahan
committed
Merge branch 'develop' v0.7.15
2 parents 3666368 + 4af547c commit 726b1b6

29 files changed

+909
-232
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.7.15] - 2025-07-03
11+
12+
### Added
13+
- Contributed feature for synthesizing test calls - PR #278
14+
- Additional contributed solution documentation intended to facilitate developer onboarding #282
15+
16+
### Fixed
17+
- #300 - glue table definitions broken
18+
- Update Lambda Runtime to NodeJS 22.x
19+
- #299 - handle comprehend detect_sentiment api has limits of input size of 5kb
20+
- #310 - Change Default Model from Nova-Lite to Nova-Pro for GenAI Queries and Summarization in PCA CFN Templates
21+
- #305 - Extend query window to 5 years and modify sample file timestamps
22+
- misc dependabot PRs
23+
24+
1025
## [0.7.14] - 2025-02-27
1126

1227
### Fixed

PCA_WALKTHROUGH.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Amazon Transcribe Post Call Analytics (PCA) Walk-through
2+
3+
This file is meant to give you a thorough look at the code structure and what each relevant Lambda function does. After reading through this documentation, you should have a good overall understanding of the solution, and be in a good spot to start making changes or adding new functionality.
4+
Note that Lambda function names are presented with the format `...FunctionName...` to facilitate reading.
5+
6+
7+
## File/Transcript ingestion and workflow initiation
8+
9+
The main Step Function `PostCallAnalyticsWorkflow` orchestrates most of the code executions leveraging AWS Lambda. This Step Function is originally triggered by the Lambda function `...FileDropTrigger...`.
10+
11+
`...FileDropTrigger...` is triggered whenever there is a new file added to the S3 bucket `postcallanalytics-inputbucket...`:
12+
- If the added file is a media file, the function is capable of validating the file type to make sure it's compatible with Amazon Transcribe. These are the [media formats](https://docs.aws.amazon.com/transcribe/latest/dg/how-input.html) supported by Transcribe.
13+
- If the added file is a JSON with a transcription that has already been processed (perhaps from the companion LCA solution), it is also validated for later processing.
14+
15+
16+
## Transcription job - launch
17+
18+
The Amazon Transcribe service has different solutions that cover different use cases. [Check this table](https://docs.aws.amazon.com/transcribe/latest/dg/feature-matrix.html) for a comparison between the different Transcribe solutions. PCA leverages Amazon Transcribe Call Analytics "post-call" by default and falls back to the regular Amazon Transcribe if any of the Amazon Transcribe Call Analytics [pre-requisites](https://docs.aws.amazon.com/general/latest/gr/transcribe.html#limits-amazon-transcribe) are not met. Using one solution or the other is also configurable in the CloudFormation template. Compared to the regular Amazon Transcribe, the "post-call" mode provides a wider range of information for every media transcription, such as speaker sentiment, non-talk time, or interruptions, to name a few. [This](https://docs.aws.amazon.com/transcribe/latest/dg/call-analytics-batch.html) is the full set of capabilities provided by this mode.
19+
20+
The Lambda function `...StartTranscribeJob...` analyzes the inbound media file previously uploaded to S3. It determines which Transcribe mode would be invoked ("post-call" vs "standard") and the number of configuration parameters needed for each invocation. This set of configuration parameters is also influenced by the input parameters defined in CloudFormation. These are the list of Transcribe parameters that you can define via CloudFormation:
21+
- Vocabulary filtering
22+
- Custom vocabulary
23+
- PII redaction
24+
- Specific audio language
25+
- Custom model
26+
- Channels
27+
- Generative call summarization
28+
29+
30+
## Transcription job - monitoring and extracting job results
31+
32+
The Lambda function `...AwaitNotification...` waits for the transcription job to finish. It stores temporary information about the job status in a DynamoDB table and waits for a job completion trigger coming from Amazon EventBridge. It will then handle successful/unsuccessful status codes and inform the main Step Function about the next step:
33+
- If the Transcribe job is finished successfully, another Lambda function `...ExtractJobHeader...` will take care of extracting any valuable information from the job execution task. Any relevant parameter configured in the job launch code is extracted and stored in a new object `PCAResults`, which is returned back to the main Step Function. Some interim results are also written to Amazon S3.
34+
- If the Transcribe job fails, the Lambda function `...TranscribeFailed...` is triggered. The purpose of this function is to move the original audio file to a separate "failed" bucket when the processing workflow encounters an expected failure, such as being unable to perform language identification. This allows for further investigation or re-processing of the failed audio files.
35+
36+
37+
## Transcription analysis
38+
39+
The Lambda function `...ProcessTurn...` is responsible for a good number of the business logic represented in the PCA UI:
40+
- If Transcribe Call Analytics was used, most of the information is already available in the transcript output file and just needs to be processed. To be precise, [this is the information available](https://docs.aws.amazon.com/transcribe/latest/dg/call-analytics-batch.html#tca-characteristics-batch) via Transcribe Call Analytics, which is then processed by the function code and represented in the UI. Things like interruptions, loudness, non-talk time, or a full transcript sentiment analysis are made available. On the other hand, things like issues, action items, or outcomes are also evaluated by Transcribe Call Analytics. However, note they might not be present in all the transcriptions.
41+
- If the regular Transcribe was used, Amazon Comprehend is then invoked to understand the speaker(s) sentiment during the call and fill in any other conversation characteristics.
42+
43+
Aside from using Comprehend when the regular Transcribe mode is used, Comprehend is also invoked if there is a need for using [custom entities](https://docs.aws.amazon.com/comprehend/latest/dg/custom-entity-recognition.html) as this is an optional configuration parameter available via Cloudformation.
44+
45+
46+
## (OPTIONAL) Genesys file processing
47+
48+
If you are using Genesys Cloud as your call center solution, you might want to leverage Contact Trace Record (CTR) files for augmenting the current transcription analysis provided by PCA. This step is also configurable via CloudFormation.
49+
50+
The Lambda function `...CTRGenesys...` processes the CTR file and extracts valuable metadata coming from Genesys such as Participant IDs or detailed timestamps about their conversation. It also processes Interactive Voice Responses (IVRs) delivered by automated voice response systems (like welcoming customers to the service) and flags them appropriately for PCA. Once the processing is finished, an updated version of the transcription analysis is available for the PCA application.
51+
52+
53+
## GenAI Summarization and insights
54+
55+
The Lambda function `...Summarize...` is responsible for providing generative AI information and is highly configurable depending on the CloudFormation input parameters:
56+
- On one hand, the function is responsible for providing call summarization information along with specific insights such as topic, product, or actions identified. Several options/LLMs are available for providing this information like Amazon Bedrock or Amazon SageMaker, to name a few. The function relies on a combination of its code and also prompt templates stored in DynamoDB to construct and interact with the different LLMs available for each option. Note that the call summary information made available previously by Transcribe Call Analytics is also available (using any input parameter with the option "TCA" in CloudFormation).
57+
- On the other hand, the function is also responsible for interacting with LLMs facilitating Question&Answer interactions between the PCA user and the LLM. Configurable LLM options, although more limited compared to the call summarization, are also possible. The function also leverages DynamoDB to store the base prompt being used to provide context to the LLM.
58+
59+
60+
61+
## Final processing
62+
63+
This final Lambda function `...FinalProcessing...` is designed to perform the final processing steps for the workflow, if any. It acts as a placeholder for any custom code needed before finalizing the workflow execution.
64+
65+

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ PCA currently supports the following features:
5151

5252
## Architecture
5353

54+
Aside from the high-level description of the different architecture components presented in this section, there is a complementary file [PCA_WALKTHROUGH.md](./PCA_WALKTHROUGH.md) that contains detailed information about the code execution and facilitates the onboarding for new contributors to the solution.
55+
5456
![pca-architecture](./images/architecture-diagram.png)
5557

5658
Call recording audio files are uploaded to the S3 bucket and folder, identified in the main stack outputs as `InputBucket` and `InputBucketPrefix`, respectively. The sample call recordings are automatically uploaded because you set the parameter `loadSampleAudioFiles` to `true` when you deployed PCA.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.7.14
1+
0.7.15

pca-dashboards/pca-dashboards.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ Resources:
454454
"parquet.compression": "SNAPPY"
455455
"projection.partitiontimestamp.type": "date"
456456
"projection.enabled": "true"
457-
"projection.partitiontimestamp.range": "NOW-2YEARS,NOW+1DAY"
457+
"projection.partitiontimestamp.range": "NOW-5YEARS,NOW+1DAY"
458458
"storage.location.template": !Join
459459
- ''
460460
- - Fn::Sub: "s3://${PcaOutputBucket}/pca-output-base/"

pca-main-nokendra.template

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
AWSTemplateFormatVersion: "2010-09-09"
22

3-
Description: Amazon Transcribe Post Call Analytics - PCA (v0.7.14) (uksb-1sn29lk73, SO9071)
3+
Description: Amazon Transcribe Post Call Analytics - PCA (v0.7.15) (uksb-1sn29lk73, SO9071)
44

55
Parameters:
66

@@ -384,7 +384,7 @@ Parameters:
384384

385385
GenAIQueryBedrockModelId:
386386
Type: String
387-
Default: us.amazon.nova-lite-v1:0
387+
Default: us.amazon.nova-pro-v1:0
388388
AllowedValues:
389389
- anthropic.claude-3-haiku-20240307-v1:0
390390
- anthropic.claude-3-sonnet-20240229-v1:0
@@ -420,7 +420,7 @@ Parameters:
420420

421421
SummarizationBedrockModelId:
422422
Type: String
423-
Default: us.amazon.nova-lite-v1:0
423+
Default: us.amazon.nova-pro-v1:0
424424
AllowedValues:
425425
- anthropic.claude-3-haiku-20240307-v1:0
426426
- anthropic.claude-3-sonnet-20240229-v1:0

pca-main.template

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
AWSTemplateFormatVersion: "2010-09-09"
22

3-
Description: Amazon Transcribe Post Call Analytics - PCA (v0.7.14) (uksb-1sn29lk73, SO9071)
3+
Description: Amazon Transcribe Post Call Analytics - PCA (v0.7.15) (uksb-1sn29lk73, SO9071)
44

55
Parameters:
66

@@ -425,7 +425,7 @@ Parameters:
425425

426426
GenAIQueryBedrockModelId:
427427
Type: String
428-
Default: us.amazon.nova-lite-v1:0
428+
Default: us.amazon.nova-pro-v1:0
429429
AllowedValues:
430430
- anthropic.claude-3-haiku-20240307-v1:0
431431
- anthropic.claude-3-sonnet-20240229-v1:0
@@ -461,7 +461,7 @@ Parameters:
461461

462462
SummarizationBedrockModelId:
463463
Type: String
464-
Default: us.amazon.nova-lite-v1:0
464+
Default: us.amazon.nova-pro-v1:0
465465
AllowedValues:
466466
- anthropic.claude-3-haiku-20240307-v1:0
467467
- anthropic.claude-3-sonnet-20240229-v1:0
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)