GPT-4 Powers Breakthrough Tool to Expose Sponsored Segments in YouTube Content
Researchers from the University of Auckland developed an AI-powered tool using GPT-4 and KeyBERT to detect and categorize sponsored ad segments in YouTube videos. The software offers a scalable, text-based alternative to traditional ad detection, enhancing transparency and strategic ad analysis.

In a groundbreaking initiative aimed at enhancing transparency in digital media, researchers from the Department of Information Systems and Operations Management at the University of Auckland, New Zealand, have developed an AI-powered software that detects and categorizes sponsored advertisement segments in YouTube videos. Authored by Johnny Chan and Brice Valentin Kok-Shun, the research, published in Software Impacts, details a robust, scalable solution that leverages state-of-the-art language models to identify both overt and subtle forms of promotional content embedded in video transcripts. The software integrates OpenAI’s GPT-4 for ad identification and KeyBERT for keyword extraction, offering an intelligent alternative to traditional audio-visual ad detection methods, which are often resource-intensive and less adaptable to nuanced advertising formats.
Transforming Text into Insight: A New Approach to Ad Detection
Unlike conventional ad detection systems that rely heavily on audio and visual cues, this software operates entirely on textual data, specifically the transcripts of YouTube videos. Using the YouTube-transcript-api, it efficiently gathers both auto-generated and manually created subtitles, enabling broad coverage of content types and speaking styles. The tool also accommodates multilingual content through YouTube’s auto-translation feature, significantly expanding its usability. These transcripts then undergo a rigorous preprocessing stage that includes removal of special characters, filtering of non-informative stopwords, and lemmatization to standardize word forms. These steps ensure that the input text is clean, consistent, and ready for advanced linguistic analysis.
GPT-4 at Work: Precision Through Prompt Engineering
At the heart of the system lies intelligent prompt engineering tailored to guide GPT-4 in performing two key tasks: detecting ad segments and categorizing keywords. The prompts are carefully designed to extract structured outputs, including the ad text, start time, and duration, using JSON formatting. This structure facilitates accurate downstream processing and visualization. The prompts were refined iteratively to minimize ambiguity, enhance reliability, and ensure consistency across varied transcript formats. Key strategies included reinforcing critical instructions within prompts and imposing constraints to avoid deviation from the expected format. This rigorous approach to prompt design significantly bolstered the reliability and usability of the outputs.
Keyword Extraction and Semantic Grouping
Once the ad segments are identified, the software uses KeyBERT, a tool based on BERT embeddings, to extract meaningful keywords from both promotional and main content sections. These keywords are then further analyzed using GPT-4 to consolidate them into semantically coherent categories. This dual-step process reduces the dimensionality of the data while preserving essential context, making it easier to interpret and compare the thematic focus of ads versus regular content. The resulting classifications offer rich insights into the alignment, or lack thereof, between advertised products and the content in which they appear, providing valuable information for advertisers and content creators alike.
Real-World Testing: Deployment and Results
To validate its performance, the software was deployed on a dataset comprising 421 transcripts from six educational and informational YouTube channels. This dataset included both manual and auto-generated subtitles to test the system’s robustness across different quality inputs. The entire six-stage pipeline, including data collection, preprocessing, ad detection, keyword extraction, and comparative analysis, was executed in a high-performance computing environment using an NVIDIA RTX 3080 GPU and 64 GB RAM. The software efficiently processed each transcript in under 30 seconds. It successfully identified ad content in 45% of auto-generated and 57% of manually created transcripts. Ad-related keywords clustered into four major themes, such as “Product” and “Media,” while content keywords were categorized into nine broader areas, including “Space,” “Physics,” and “Geopolitics.” These findings suggest that advertisers strategically target content-rich channels with product-focused promotions that resonate with viewer interests.
Looking Forward: Challenges and Future Directions
While the software demonstrated strong performance, several challenges surfaced during deployment. One major issue was the contextual ambiguity in some promotional segments, particularly where linguistic cues were subtle or absent. Additionally, errors in auto-generated transcripts occasionally led to missed detections or misclassifications. To address these limitations, the authors recommend improving transcript preprocessing, incorporating confidence scoring, and enhancing customization options for end users. Future development could include expanding the software’s applicability to platforms like Instagram and TikTok, detecting undisclosed sponsorships, or analyzing political messaging and brand placements in influencer content. The researchers also propose adding an agentic framework to handle ambiguous cases autonomously, thereby reducing the need for manual review.
As digital marketing evolves and sponsored content becomes increasingly pervasive, tools like this AI-driven solution will play a crucial role in maintaining content transparency and enhancing audience trust. With its ability to provide structured, scalable, and contextually aware ad analysis, the software offers a powerful foundation for future innovations in digital media monitoring, advertisement strategy, and regulatory oversight. Through the integration of cutting-edge language models and keyword extraction tools, the research not only showcases the potential of AI in content analysis but also sets a new benchmark for responsible and intelligent media auditing.
- FIRST PUBLISHED IN:
- Devdiscourse
ALSO READ
YouTuber Jyoti Malhotra Accused of Espionage: The Intrigue Unfolds
Eastern Railway Tightens Security: Bloggers and YouTubers Warned Against Unauthorized Filming
Supreme Court Moves Against YouTuber for Defamatory Content
Pioneering Digital Marketing with AI: KLH GBS Hyderabad Launches Innovative Program
Supreme Court Takes Suo Motu Action Against YouTuber for Contempt