AWS Public Sector Blog
Transforming university lecture content into an enriched course using generative AI on AWS

Amazon Web Services (AWS) has collaborated with the University of Technology Sydney (UTS) to make a more engaging content delivery platform as an alternative to long lecture videos. Universities today produce hours of recorded content that students are expected to consume passively, in full, with no adaptation to their individual pace or knowledge level. UTS has performed a trial of this solution in a cloud computing course to evaluate the effectiveness of generative AI in improving student engagement.
This cloud computing course enrolls around 500 students, each with different learning styles, prior knowledge, and time constraints, yet all receive the same 90-minute recording. Research by Gloria Mark at the University of California, Irvine, shows that the average time a person stays focused on a single screen task has declined from approximately 2.5 minutes in 2004 to only 47 seconds in the early 2020s. Learners benefit from content that is bite-sized, adaptive, and intelligently structured, but educators don’t have the time and capacity to produce this manually for every recording. Initial feedback from students indicated that this solution helped them learn more efficiently.
We identified the following core challenges with the current teaching approach:
- Engagement in decline – Students increasingly disengage from long-format recordings. Completion rates for full-length lecture videos are low, but lecturers have no scalable way to break content into digestible pieces without significant manual effort.
- No visibility into learning gaps – With a monolithic recording, lecturers have no insight into which topics students struggle with, where they stop watching, or what questions they have.
- Personalization – Monolithic recordings offer no adaptability to individual learner needs. Providing personalized learning manually is impractical at scale due to teaching resource constraints.
Using AI to make learning more flexible
AWS developed an approach where a content creator uploads a single recording, and the system automatically produces a complete, structured learning module. The recording is intelligently segmented into 15–30 minute topic-focused video chunks, each further divided into short chapters of 30 seconds to 3 minutes for fine-grained navigation. For each chunk, AI generates a summary, key points, context with examples, and multiple-choice knowledge checks. Through a personalized learning path, learners can progress at their own pace, with progress tracking and targeted revision. A course-aware AI chat agent answers learner questions grounded in course materials. Content creators review, edit, and explicitly publish all generated content before learners see it.
Figure 1: Automatically generated lesson with chapters and content
The content review step is important: all AI-generated content is initially stored in a draft state. This human-in-the-loop workflow helps educators verify all AI-generated content before publication to ensure accuracy and quality of learning materials.
One upload is equivalent to one complete course module. A single lecture recording produces a fully enriched learning experience made up of chunked videos with chapter markers, summaries, key points, explanatory content, knowledge checks, and chat context without any additional manual content creation.
How it works
The system is built on two core AWS services for AI processing, Amazon Transcribe for speech-to-text conversion and Amazon Bedrock for generative AI. These are supported by a serverless application layer on AWS.
Amazon Transcribe converts the audio into timestamped, word-level text and temporal metadata that downstream systems reason about programmatically. The Amazon Transcribe audio segmentation feature groups words into sentence-level segments with precise timestamps, and this is what makes intelligent chunking possible. Because every audio segment has a start and end time, we can reason about which text belongs in a chapter and then link back to the exact timestamps.
Claude by Anthropic in Amazon Bedrock handles the semantic reasoning: restructuring raw transcripts into readable paragraphs, identifying topic boundaries, generating chapter divisions, and producing educational content for each segment. The chat assistant uses Amazon Bedrock Knowledge Bases for Retrieval Augmented Generation (RAG). Configuration including model identifiers can be externalized to Parameter Store, a capability of AWS Systems Manager, enabling model upgrades as a configuration change without redeployment.
Together, these services form an end-to-end pipeline: a recording enters as a single video file and emerges as a hierarchical content structure, with the course at the top, followed by the module, chunks, and finally chapters. Each level is enriched with AI-generated learning content, stored in Amazon Relational Database Service (Amazon RDS) for PostgreSQL, and streamed to learners through Amazon CloudFront.
The following diagram is the solution architecture for the preprocessing pipeline and application stack.
Figure 2: Solution architecture diagram
Technical challenges
The concept is straightforward (transcribe, segment, generate), but the implementation reveals several nontrivial technical challenges. This section details the approaches we developed, including methods that failed and why, before arriving at reliable approaches.
Intelligent video chunking with Amazon Bedrock
The most critical component is the video chunking system. It takes a long recording (60–120 minutes) and segments it into self-contained, topic-focused pieces. This is considerably harder than it appears.
In hindsight, our first attempt was naive. We passed the full transcript to Amazon Bedrock and asked it to identify chapter boundaries with timestamps. This doesn’t work reliably and resulted in the following issues:
- Mid-sentence breaks – The model placed topic boundaries at arbitrary points, producing chunks that started or ended mid-thought.
- Context window saturation – Lectures produce transcripts of more than 15,000 words. The model’s reasoning about topic boundaries degraded across the full document.
- Timestamp confusion – Large language models (LLMs) have no built-in understanding of the relationship between text and video timecodes. Including raw timestamps in the prompt introduced noise that degraded accuracy.
- Inconsistent output – Results varied significantly between invocations on the same input.
We concluded that a single prompt can’t reliably perform both structural analysis and semantic reasoning simultaneously on long-form content. The problem must be decomposed.
To address this challenge, we broke the complicated process into focused subtasks. We developed a three-stage pipeline that decomposes the problem into discrete, well-defined subtasks, each handled by the most appropriate technique (deterministic processing, lightweight LLM, or sophisticated LLM). The first stage is raw transcript preprocessing. Stage two is broken down into two parts, LLM paragraph generation and term frequency–inverse document frequency (TF-IDF) timestamp recovery. Stage three is also two parts, chapter detection and chunk optimization.
In raw transcript preprocessing, a Lambda function extracts and cleans the audio segments from the Amazon Transcribe JSON output. Each segment contains the spoken text with precise start time and end time fields. Unnecessary metadata is stripped and the duration of each segment is calculated.
The raw transcript segments are passed to Anthropic’s Claude Haiku (a fast, cost-effective model) with instructions to restructure the text into readable paragraphs. This adds punctuation, removes verbal filler, and groups sentences into coherent paragraph units. For long transcripts exceeding 50,000 characters, the system automatically batches the input into manageable chunks, processing each batch independently and assembling the results:
CHUNK_SIZE = 50000
if len(json.dumps(self.transcript)) > CHUNK_SIZE:
return self._generate_paragraphs_batched(CHUNK_SIZE)
The paragraph restructuring in the first part of stage two loses the original timestamps (the LLM outputs cleaned text, not timestamped segments). We recover timestamps using TF-IDF cosine similarity, a deterministic, statistical technique that matches each generated paragraph back to its corresponding position in the original timestamped transcript.
Both the original transcript segments and the generated paragraphs are transformed into fixed-length windows of 50 words. TF-IDF vectorization and cosine similarity then find the best match:
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
import numpy as np
# Transform both sources into 50-word segments for comparison
transcript_segments = self._transform_text_segments(self.transcript, num_words=50)
paragraph_segments = self._transform_text_segments(paragraphs, num_words=50)
# Build TF-IDF matrix across all text segments
vectorizer = TfidfVectorizer().fit_transform(transcript_segments + paragraph_segments)
vectors = vectorizer.toarray()
# For each paragraph, find its best-matching original segment
for i in range(len(paragraph_segments)):
paragraph_vector = vectors[len(transcript_segments) + i]
similarities = cosine_similarity(
vectors[:len(transcript_segments)],
paragraph_vector.reshape(1, -1)
)
best_match = int(np.argmax(similarities))
paragraphs[i]['start_time'] = int(float(
self.transcript[best_match]['start_time'])) - 2
TF-IDF weighting ensures distinctive words such as technical terms and proper nouns contribute more to the match than common words. The paragraph is assigned the timestamp of its highest-similarity match. Even after the transcription is restructured, the core vocabulary stays the same, so the matching is reliable. The method uses vector math so it’s also deterministic.
With timestamped paragraphs in hand, Anthropic’s Claude Sonnet (a more capable model) analyzes the full set of paragraphs and groups them into chapters: short, topically coherent sections of 30 seconds to 3 minutes. The model identifies topic transitions and generates meaningful chapter titles.
Finally, the system groups chapters into video chunks, the primary units of content delivery. The model creates chunks of 15–30 minutes by combining consecutive chapters, never splitting a chapter across two chunks.
The result is a hierarchical content structure:
Figure 3: Course hierarchical content structure
After chunk boundaries are determined, the source video is split at the identified timestamps.
Structured content generation with Amazon Bedrock
For each video chunk, the pipeline generates structured educational content: summaries, key points, explanatory material, and multiple-choice assessments. The critical challenge is producing consistent, schema-compliant output from the LLM across thousands of invocations.
Quiz question generation requires the model to output a question, four answer options, a correct answer indicator, and an explanation that must conform to a strict schema. Early approaches using prompt engineering, using prompts such as “Output your answer as JSON,” failed in production. Output formatting varied between invocations and included markdown tables, numbered lists, raw JSON, or hybrid formats. Model version upgrades introduced breaking changes. For example, upgrading from Anthropic’s Claude 3.5 Sonnet to Claude 3.7 Sonnet caused the model to wrap JSON in markdown code fences, breaking the parser entirely.
For this challenge, the solution was to use structured outputs on Amazon Bedrock, a capability that uses constrained decoding to generate schema-compliant JSON responses. Rather than asking the model to output JSON and hoping it complies, the schema is enforced at the token generation level.
Structured outputs uses constrained decoding in which the model can only generate tokens that produce valid JSON that conforms to the provided schema. A separate schema was used for each content type, and this allowed us to generate multiple fields in one prompt. For example, the title of a lesson could be generated at the same time as the description, within one JSON object.
The following screenshot shows the system providing an AI-generated multiple-choice knowledge check using Amazon Bedrock structured outputs.
Figure 4: AI-generated multiple-choice
Course-aware chat-based assistant with RAG
Beyond pre-generated content, learners interact with a chat-based assistant powered by Amazon Bedrock Knowledge Bases with Amazon Simple Storage Service (Amazon S3) as the vector store. Lecturers upload course documents (syllabi, assignment briefs, reference materials) to an S3 bucket, and Amazon Bedrock handles chunking, embedding, and indexing automatically. When new documents are uploaded, a sync operation updates the vector index, keeping the chat assistant’s knowledge current without manual intervention.
A key design feature is source-aware prompting. Each retrieved context is tagged with its source filename, and the system prompt instructs the model to only use content from the specific document the student is asking about. This prevents cross-contamination, for example, answering an Assignment 2 question with content retrieved from Assignment 1.
Conclusion
This post demonstrates that generative AI can transform how long-form educational content is delivered. A single uploaded recording produces a complete, structured learning module with topic-segmented videos, chapter navigation, summaries, explanations, and assessments while maintaining full human oversight over published content.
Key takeaways:
- Decompose the problem – Video segmentation can’t be solved with a single LLM prompt. Breaking it into three stages—structural preprocessing, TF-IDF timestamp recovery, and AI-driven topic grouping—produces dramatically better results than any single-pass approach.
- Use TF-IDF for timestamp alignment – When an LLM restructures text (losing positional metadata), TF-IDF cosine similarity provides a fast, deterministic method to recover the original timestamps without additional AI calls.
- Enforce output schemas at the infrastructure level – Amazon Bedrock structured outputs (constrained decoding) eliminate the need for output parsing, validation, and retry logic, producing reliable structured data regardless of model version.
- Match model capability to task complexity – Use fast, cheap models such as Anthropic’s Claude Haiku for text formatting tasks and more capable models such as Anthropic’s Claude Sonnet or Claude Opus for semantic reasoning tasks like topic identification. Not every step needs the most powerful model.
- Maintain human oversight by design – Pre-generating all content into a draft state enables educator review without sacrificing automation benefits. The system augments human judgment rather than replacing it.
This implementation targets higher education, but the methodology is domain-agnostic. Organizations producing long-form instructional content, whether that’s corporate training, professional development, compliance education, or conference recordings, can apply the same pipeline to produce structured, bite-sized learning experiences from existing recordings.
To get started transforming your long-form educational content into engaging, bite-sized learning experiences, follow these paths:
- Explore the services – Get hands-on with Amazon Transcribe and Amazon Bedrock in your own AWS account. Both offer AWS Free Tier usage to experiment with the core capabilities described in this post.
- Connect with us – If you’re an educational institution or training organization looking to implement this approach, contact the AWS Public Sector team to discuss your use case and get architecture guidance tailored to your scale and requirements.
The challenges we identified as part of this collaboration with UTS were addressed using generative AI, with students saying it was especially useful in breaking up long-form content where they previously would lose attention. By using generative AI in an educational environment, it’s possible to improve student retention, personalize content to individual learning requirements, and scale this without requiring many hours of educators’ time.



