Call Happens
A customer talks to an agent through Amazon Connect.
AWS account 465572510980 · us-east-1 · deployed MVP
A clear pipeline for turning customer service calls into evidence-backed operational insight: redacted transcripts land in S3, a 15-minute compiler analyzes them with Bedrock and memory distillation, Athena stores the facts, and the Codex skill answers questions with charts.
A customer talks to an agent through Amazon Connect.
Contact Lens writes redacted `VOICE` JSON to S3. The stack does not read raw audio.
EventBridge starts Step Functions. New objects are discovered using a watermark.
Labels from the taxonomy: driver, root cause, intent, friction, escalation, confidence, evidence.
Calls are rolled up into hourly, daily, and weekly summaries: issue types, changes, claims, and evidence.
Conversations, utterances, annotations, evidence, and memory versions land in Iceberg tables.
The skill queries Athena, reads memory pages, finds evidence, and generates dashboards.
Bedrock analyzes each call one at a time. Memory distillation is the next layer up: the compiler takes those call-level labels, evidence spans, durations, and counts, then rolls them into time-window summaries. The goal is to maintain a useful memory for each hour, day, and week: what people called about, what changed, which examples prove it, and what an LLM should know before answering. Athena keeps the structured facts; the distilled memory gives Codex, agent assist, or a future customer portal compact context without rereading every transcript.
Real Demo Example
This example uses `syn-delta-airline-v1-0242-0cb34882`, a synthetic redacted Contact Lens call from the Delta demo dataset. It shows what arrives, what labels get applied, what gets distilled, and what Athena can answer.
Bedrock’s role is not just “summarize.” It turns the conversation into structured facts: taxonomy labels, issue intent, root cause, friction and escalation signals, confidence, and evidence spans that point back to redacted turns.
Input: individual call annotations for the time window. Each call contributes labels, evidence turns, duration, sentiment, resolution status, and a source contact ID.
Reduction: group calls by taxonomy label, compare this window with earlier windows, preserve representative examples, and turn the facts into a narrative memory that says what an LLM should know about the current operating picture.
Output: a versioned memory page for an hour, day, or week. A future LLM can use it as context: "Delta callers are currently over-indexing on digital channel failures, especially vouchers not applying; here are the counts, trend direction, representative contacts, and evidence."
| Table | Example Row |
|---|---|
ci_conversation | contact_id `syn-delta...0242`, synthetic `true`, duration `516,882 ms` |
ci_utterance | turn `turn-0003`, role `CUSTOMER`, redacted content about voucher not applying |
ci_llm_annotation | driver `digital_channel_failure`, root cause `voucher_not_applying`, confidence `0.90` |
ci_memory_page_version | driver summary page for `delta-airline-v1` |
Drill Down
Click a component to see what it does, why it exists, how it scales, and where it lives in AWS.
What It Solves
The compiler gives operations teams a repeatable way to ask what is driving calls, why issues are moving, and which contacts prove the pattern, without opening raw recordings.
Normalizes every conversation into comparable drivers, root causes, friction points, and resolution signals.
Annotations carry utterance-level evidence spans, memory pages, and representative contact IDs for defensible summaries.
Synthetic datasets can be generated, reseeded, validated, ingested, and reset by `dataset_id` without touching real data.
Codex can query metrics, find contacts, read memory pages, and generate dashboard artifacts from the packaged skill.
The data plane is scoped to redacted Contact Lens JSON. Original audio and unredacted transcripts are out of bounds.
The schema leaves space for chat transcripts, BI dashboards, agent-assist surfaces, and customer-specific taxonomies.
Runtime Flow
The non-technical view is call to answer. The technical view is Step Functions coordinating Lambda, Bedrock, Glue, S3, and Athena.
Amazon Connect and Contact Lens produce redacted voice analysis JSON. Raw audio is outside this workflow.
EventBridge starts the compiler, which checks S3 for new redacted files using an incremental watermark.
The Lambda turns Contact Lens JSON into stable conversation, utterance, and signal rows.
Bedrock labels driver, root cause, intent, resolution, friction, escalation, channel conflict, novelty, confidence, and evidence spans.
The compiler compresses call-level labels into a reusable assessment page that summarizes patterns across the run.
Glue merges staged facts into Iceberg tables so analysts can query trends and examples.
The skill asks Athena, reads memory pages, finds evidence contacts, and renders charts or dashboards.
Scale and Performance
The current deployment favors safe, observable increments. The next performance step is materializing common dashboard aggregates into `ci_trend_snapshot`.
`MAX_DISCOVERY_KEYS` limits a Lambda discovery pass. Watermarks prevent repeatedly scanning old objects.
Glue 5.0 writes Parquet-backed Iceberg tables and merges by deterministic keys for replay safety.
The helper enables recent-result reuse for repeated dashboard and metric queries when Athena can reuse a matching result.
The Glue loader allows up to five concurrent runs, and Step Functions retries transient Glue concurrency errors.
Bedrock calls are isolated to the annotation phase, making cost and latency easier to measure and tune.
`ci_trend_snapshot` and memory pages are ready for precomputed hour/day/week windows, so dashboards and LLMs can reuse the same distilled operating picture.
Integration Model
Codex is the first analyst surface, but the data contract is intentionally generic: Athena tables, S3 evidence, and memory-page versions can feed BI, agent-assist, or customer portals.
Uses Athena, S3 memory pages, offline Delta snapshot fallback, and generated dashboards.
Point QuickSight or another BI layer at `ci_trend_snapshot` and aggregate views.
Enable Bedrock KB once an OpenSearch Serverless vector collection and index are selected.
Data Model
The model keeps transcript turns separate from annotations and evidence so analysts can aggregate safely while still drilling down to representative contacts.
| Table | Grain | Primary Use | Join Path |
|---|---|---|---|
ci_conversation | Contact/conversation | Header, dataset, source, queue, duration. | Root table by `conversation_id`. |
ci_utterance | Transcript turn | Redacted content, role, offsets, sentiment. | Many to `ci_conversation`. |
ci_llm_annotation | Conversation annotation | Driver, root cause, confidence, novelty. | One to `ci_conversation`. |
ci_annotation_evidence | Evidence span | Quote and rationale supporting an annotation. | Annotation to utterance. |
ci_memory_page_version | Compiled page version | Versioned insights and dashboard provenance. | Dataset and page lineage. |
ci_trend_snapshot | Trend window | Materialized dashboard acceleration. | Dataset, driver, root cause. |
ci_claim | Analyst claim | Claim text, SQL, confidence, evidence contacts. | Links claims to contacts and pages. |
AWS Links
Links open the AWS Console in `us-east-1`. Access depends on the active AWS account and IAM session.