Sohu Elevates Personalized News Recommendations with Milvus
10x faster
in vector retrieval speed
> 95%
in news classification accuracy
Less memory consumption
for faster responses and reduced cost
Elevated user experiences
with personalized recommendations
Milvus has not only streamlined but also remarkably expedited the retrieval of millions of semantic vectors, showcasing a nearly tenfold improvement compared to our previous experience with other vector similarity search engines.
Tingting Wang
About Sohu News
Sohu, a NASDAQ-listed internet services company, is renowned for its diverse online offerings, including advertising, media, and search services. Sohu News, a primary arm of Sohu, stands out as a leading media business, providing extensive news and information services. In response to evolving user needs, Sohu News employs advanced AI algorithms and technologies, such as vector-based semantic search, to personalize content recommendations based on users' interests and preferences. Sohu News, committed to innovation and real-time news delivery, positions itself as a trailblazer, actively shaping the dynamic landscape of China's internet industry.
The Challenges: Slow and Inaccurate Vector Retrieval and Misclassification of Short-Text News
As Internet and mobile technologies advance, user demand for accessing information has evolved from passive reception to actively pursuing news aligned with their interests. To meet this changing need, Sohu News built a recommendation system capable of recommending the latest news to users based on their interests and preferences, ultimately enhancing news click-through rates and reading duration.
However, challenges arose with their previous vector search stack. It needed to be faster when retrieving large datasets and provided inaccurate recommendations that did not align with users' interests. The stack also consumed excessive memory when performing semantic searches and, to make matters worse, made responses even slower. Sohu News urgently needed a high-performance and memory-efficient vector search technology to handle massive and ever-increasing amounts of unstructured data and support its recommender system for fast, personalized news recommendations.
Another challenge was the classification of short-text news. Precise classification of each news article before vector search is crucial to providing helpful content recommendations. Short news articles, however, have fewer features than long-text news, posing difficulties in accurate categorization. Therefore, Sohu News required a robust vector search engine that could help precisely categorize short news articles and identify those misclassified previously.
The Solution: Choosing Milvus for Building a Powerful Vector Search Engine
After careful consideration, the Sohu News team selected Milvus to build the vector search engine for their news recommendation system. Milvus, an open-source vector database, can handle billions of vector points, offering lightning-fast performance with a high recall rate. It also supports 11 mainstream indices such as FLAT, HNSW, and ScaNN, offering more flexibility to find the balance between accuracy, performance, and cost.
How the News Recommendation System Works and How Milvus Supports It
The recommendation system employs a dual-tower structure within its vector search engine, where each tower represents the semantic vectors of users’ preferences and news, respectively.
The Sohu News team opted for the BERT-as-service embedding model to transform existing news articles into semantic vectors and stored these vectors in the Milvus vector database. When it comes to newly generated news articles, they are transmitted through Kafka and then undergo a similar conversion into semantic vectors. These vectors are subsequently inserted into the Milvus vector database.
User profiles and preferences include users’ history of browsing news and tag keywords labeled based on users’ interests. These keywords and browsing data are also transformed into semantic vectors using the BERT-as-service embedding model and then sent to Milvus for a semantic similarity search.
Milvus compares the cosine similarity of the two types of semantic vectors, returns Top-K results with the highest cosine similarity (which means these results are most similar to the user's interests and preferences), and places them into a recommended news candidate pool. Subsequently, the system estimates and ranks the news's click-through rate in this pool, delivering users the news with the highest predicted click-through rate.
How Milvus Enhances Short-Text News Classification
Accurate classification of each news article before the vector search is paramount for delivering valuable content recommendations. Short news, often containing limited information, presents a challenging situation where misclassifications are prone to occur. Recognizing the intricacies of short-text news classification, Sohu News leverages Milvus to significantly enhance the accuracy of news classification.
The team employs the BERT-as-service model to transform long news articles into semantic vectors, seamlessly ingesting these vectors into Milvus. Simultaneously, short news articles are converted into semantic vectors and sent to Milvus to retrieve the top 20 long news articles with the highest cosine similarity.
The team then analyzes the categories of these 20 long news articles most semantically similar to the queried short news. Suppose more than 18 of these articles share a consistent category but deviate from the category assigned to the queried short news. In that case, it signals a potential error in the short news category classification. In such instances, the team promptly corrects these errors. The classification accuracy rate surpasses 95% by incorporating Milvus into this process.
This innovative approach, synergizing with Milvus's capabilities, not only effectively addresses the challenges of short-text news classification but also contributes to developing a valuable corpus for training future short-text classifiers.
The Results: Faster Responses, Higher Recommendation Accuracy, and Better User Experience
Sohu's collaboration with Milvus significantly transformed its news recommendation system, offering users a more personalized and engaging experience. With Milvus, Sohu News’ recommendation system has achieved 10x faster vector retrieval speed and remarkably improved the recommendation accuracy. In particular, Milvus has elevated the short-news classification accuracy rate to over 95%.
Milvus supports mainstream indices and ensures high recall on massive datasets, offering more flexibility to balance accuracy, performance, and cost. Its efficiency in memory consumption and ability to handle substantial data volumes align seamlessly with Sohu's operational needs.
This case study was initially written by Tingting Wang, the NLP algorithm engineer at Sohu, and is edited and released here with permission.