Every Article Deserves a Video: Contextual Video Matching for Digital Publishers
Combines LLMs and textual embeddings for long-form article-video matching, boosting user engagement.
Key Findings
Methodology
The system employs a multi-stage pipeline: HTML content extraction using Gemini-2.5-flash, semantic synthesis via HyDE to generate hypothetical video metadata, multilingual embedding with MUSE for cross-lingual alignment, and vector-based retrieval with Qdrant. It integrates entity grounding from LLMs to enrich semantic representations, and dynamically adjusts similarity thresholds per publisher. The architecture supports real-time matching, combining textual and multimodal signals for high accuracy.
Key Results
- On a real production dataset of over 1,000 web pages, the system outperformed six baselines, with average relevance scores rising from 1.12 to 2.51 (Likert 1-5), and relevant video match ratio from 15.5% to 19.9%. User engagement metrics showed a 19% increase in watch time and a 21% rise in average view duration during online A/B testing.
- Dynamic thresholding effectively adapts to publisher-specific semantic density, improving precision. The hybrid approach combining HyDE and grounded entity extraction yielded robust performance across diverse content types.
- Offline evaluation used LLMs as judges, employing pointwise and pairwise scoring protocols, confirming the superiority of the proposed method with statistically significant margins.
Significance
This work addresses the challenge of long-form article-video matching at scale, overcoming short-text limitations and enabling personalized, contextually relevant content delivery. It demonstrates industrial viability, significantly enhancing user engagement and monetization opportunities in digital publishing, especially in multilingual, high-traffic environments.
Technical Contribution
The paper introduces an innovative architecture combining HyDE-generated hypothetical descriptions with multi-language embeddings, enabling long-text semantic matching. It proposes a dynamic threshold mechanism tailored to publisher-specific embedding distributions, and integrates multimodal relevance metrics, advancing the state-of-the-art in large-scale content recommendation systems.
Novelty
This is the first system explicitly designed for long-form article-video matching using HyDE-generated descriptions and multi-language embeddings. Unlike prior short-text or keyword-based approaches, it achieves deep semantic alignment across lengthy texts, representing a significant leap in content understanding and retrieval technology.
Limitations
- The system relies on pre-trained embeddings, which may underperform on rare languages or emerging topics. The hypothetical descriptions depend on LLM knowledge, which may lag behind real-time events.
- High computational costs for real-time inference and vector search pose deployment challenges, especially at scale. Caching strategies mitigate but do not eliminate latency.
- Threshold tuning remains partly manual, requiring ongoing adjustment for optimal performance across diverse publishers.
Future Work
Future directions include integrating multimodal features (images, audio), developing adaptive thresholding algorithms, and enabling continuous knowledge updates for LLMs to handle real-time events. Expanding to other media types and improving system efficiency are also key goals.
AI Executive Summary
In the rapidly expanding digital content landscape, embedding relevant videos within long-form articles is crucial for enhancing user engagement and monetization. Traditional manual approaches are infeasible at scale, prompting the need for automated, intelligent systems. This paper introduces a novel 'Contextual Video Matching' framework that leverages large language models (LLMs) and advanced textual embeddings to automate the association of videos with lengthy articles.
The system operates through a multi-stage pipeline: it first extracts meaningful content from diverse web pages using Gemini-2.5-flash, filtering noise and summarizing core information. Then, it employs the HyDE framework, prompting LLMs to generate hypothetical video metadata—titles, descriptions, and key entities—that align with the article’s semantics. These generated descriptions are embedded into a shared vector space via the Multilingual Universal Sentence Encoder (MUSE), ensuring cross-lingual compatibility.
To find the most relevant videos, the system performs vector similarity search using the Qdrant database, calculating cosine similarity scores. Recognizing that different publishers have varying content densities, it dynamically adjusts similarity thresholds based on publisher-specific embedding distributions, balancing precision and recall. Additionally, it incorporates multiple relevance signals, such as video freshness and performance metrics, to refine recommendations.
Extensive offline evaluations on a dataset of over 1,000 diverse web pages demonstrate that the proposed approach significantly outperforms heuristic baselines, with relevance scores increasing from 1.12 to 2.51 and relevant match ratios nearly doubling. Online A/B experiments further confirm that users exposed to the system spend 19% more time watching videos and 21% longer per view, validating its real-world effectiveness.
Deployment at scale posed challenges like latency, computational costs, and content extraction robustness. The system addresses these through caching, automated content extraction, and modular architecture, enabling seamless integration across hundreds of publishers. Despite current limitations—such as knowledge cutoff and resource demands—the framework paves the way for future multimodal, adaptive, and real-time content recommendation systems, promising a transformative impact on digital media ecosystems.
Deep Analysis
Background
The rapid growth of digital content, especially long-form articles, has driven research into automated content understanding and recommendation. Early efforts focused on short-text retrieval using models like BERT and CLIP, achieving moderate success in cross-modal alignment. However, these methods struggled with long, complex texts and multilingual environments. Recent advances in large language models (LLMs) and multimodal embeddings have opened new possibilities, but challenges remain in scaling these techniques for real-time, large-scale applications. Platforms like Dailymotion need systems capable of understanding lengthy editorial content and matching it with relevant videos efficiently. Prior solutions relied heavily on keyword matching or static embeddings, which lacked semantic depth and adaptability. This research builds upon these foundations, integrating HyDE for generating hypothetical descriptions, and multi-language embeddings to address the multilingual and temporal gaps in content understanding.
Core Problem
The core challenge lies in automatically matching long, complex articles with relevant videos in a scalable, accurate manner. Manual curation is infeasible due to content volume, and existing short-text matching techniques cannot handle the semantic richness of full articles. Additionally, models trained on static data lack awareness of recent events, entities, or emerging topics, reducing relevance. The heterogeneity of publisher content, language diversity, and the need for real-time processing further complicate the problem. Addressing these issues requires a system capable of deep semantic understanding, dynamic adaptation, and efficient retrieval across vast, multilingual video libraries, ensuring high relevance and user engagement.
Innovation
The system introduces several key innovations: 1) HyDE-based generation of hypothetical video descriptions, which allows the system to bridge the knowledge gap of static models and adapt to recent events; 2) use of MUSE embeddings for multilingual, cross-lingual semantic alignment, supporting global content ecosystems; 3) a dynamic, publisher-specific thresholding mechanism that adjusts similarity cutoffs based on embedding distribution, improving precision across diverse content types; 4) integration of multiple relevance signals, including freshness and performance metrics, to refine video selection. These innovations collectively enable a deep, scalable understanding of lengthy articles and their optimal video counterparts, surpassing traditional keyword or short-text methods.
Methodology
- �� Content Extraction: Use Gemini-2.5-flash to analyze raw HTML, filter noise, and extract core article text, titles, and summaries.
- �� Semantic Synthesis: Prompt LLMs with the article content to generate hypothetical video metadata—titles, descriptions, key entities—using HyDE.
- �� Grounded Entity Extraction: Extract key entities (persons, places, events) from the article via LLM prompting, enriching semantic context.
- �� Embedding: Encode the synthesized metadata and entities into a shared vector space with MUSE, ensuring multilingual compatibility.
- �� Video Indexing: Embed all videos in the catalog into a vector database (Qdrant), storing their features.
- �� Similarity Search: Calculate cosine similarity between article embeddings and video embeddings, retrieving top candidates.
- �� Threshold Adjustment: Dynamically set similarity thresholds based on publisher-specific embedding distributions.
- �� Multi-metric Fusion: Combine similarity scores with freshness, performance, and other relevance signals to rank videos.
- �� Deployment Optimization: Implement caching and modular architecture to reduce latency and operational costs.
Experiments
The evaluation used a dataset of over 1,000 web pages from Dailymotion’s publisher network, covering diverse topics. Offline metrics included relevance scores, match ratios, and ablation studies comparing HyDE, grounded entity extraction, and baselines like random or recent videos. The system’s parameters, such as similarity thresholds and entity extraction strategies, were tuned via grid search. Results showed significant improvements over heuristics, with relevance scores rising from 1.12 to 2.51. Online A/B testing involved millions of users, measuring engagement metrics like watch time and session duration, which increased by approximately 19-21%. The robustness of results was validated through statistical significance testing and confidence intervals, confirming the system’s effectiveness across different publisher types and content domains.
Results
The system achieved a mean relevance score of 2.51, nearly doubling the baseline (1.12). Relevant video match ratio increased from 15.5% to 19.9%. In live experiments, user watch time per visitor grew by 19%, and average watch duration per view increased by 21%. The dynamic thresholding mechanism effectively balanced precision and recall across publishers with varying content densities. Ablation studies confirmed the importance of HyDE and grounded entity extraction, with each component contributing to performance gains. The results demonstrate that deep semantic understanding and adaptive retrieval significantly enhance content relevance and user engagement.
Applications
This system can be integrated into news portals, social media platforms, and content aggregators to automatically enrich articles with relevant videos, improving user experience and monetization. It requires minimal manual intervention, relying on content analysis and vector search infrastructure. Future applications include extending to multi-modal content, supporting personalized recommendations, and enabling real-time updates for trending topics, thus transforming digital content ecosystems into more engaging, multimedia-rich environments.
Limitations & Outlook
The system depends on pre-trained embeddings and LLMs, which may not fully capture emerging entities or niche languages, leading to potential relevance gaps. High computational costs for real-time inference and vector search pose scalability challenges. Threshold tuning remains partly manual, requiring ongoing adjustment for optimal performance. Additionally, knowledge cutoff points of LLMs limit understanding of the latest events, necessitating continuous model updates and multimodal integration to address these shortcomings.
Plain Language Accessible to non-experts
想象你在一家大型的厨房里,有许多不同的食材和菜谱。每次你想做一道新菜,你都需要找到合适的食材。以前,你可能会用手去挑选或记忆哪些食材适合,但这样很慢,也容易出错。现在,有一个聪明的助手,它能听你描述你想做的菜,然后帮你从仓库里找到最匹配的食材。它会考虑最新买的食材,比如新鲜的海鲜或蔬菜,确保菜肴新鲜美味。这个助手用一种特别的“理解”技术,能理解你说的话,找到最合适的食材组合。它还会用数学方法判断哪个食材最像你想要的。这样一来,你只要告诉助手你的菜谱,它就能帮你找到最合适的食材,让做菜变得又快又好玩。这就像我们论文里的系统,帮内容平台自动找到最相关的视频,让用户体验更丰富、更有趣。
ELI14 Explained like you're 14
想象你在学校图书馆,有很多书和视频资料。你想找到和你学习的主题最相关的视频,但每次都翻遍所有资料太麻烦。于是,你的朋友发明了一个聪明的机器人,它可以听你讲的主题,理解你在说什么,然后帮你从所有的视频中找到最匹配的那个。这个机器人不仅能理解你讲的内容,还能考虑最新发生的事情,比如新电影或新闻。它用一种特别的“聪明算法”把书和视频变成数字,然后用数学方法判断哪个视频和你的主题最像。这样,你只要告诉机器人你的兴趣,它就能帮你找到最合适的视频,让你学习变得更轻松、更有趣。就像论文里的系统一样,它让内容平台变得更聪明,能自动帮你找到最相关的视频,省时又好玩。
Abstract
As digital publishers face the challenge of managing massive content catalogs, the ability to effectively embed relevant video within text-based articles has become critical for both monetization and user retention. However, manual selection is impractical for large scale publishers, especially when navigating their own extensive video libraries or the entire global Dailymotion catalog. In this paper, we present the "Contextual Video Matching" system, a solution that automatically matches relevant videos with text-heavy web pages and articles. By leveraging Large Language Models (LLMs) and textual embeddings, we provide a scalable solution for publishers to efficiently combine video content with their articles. We discuss in detail the motivations, architecture, evaluations, and deployment of this system within Dailymotion's production environment. Since its launch, the system has been adopted by hundreds of publishers, significantly increasing user engagement and enriching user experiences with highly relevant video content.