Understanding Contextual Feed
A contextual feed is a dynamic stream of content tailored to an individual's current situation, incorporating elements such as interests and geographical location. Its primary aim is to deliver relevant and personalized information. This feed generates video recommendations utilizing various contextual inputs, including page context, search keywords, user context, and geolocation.
How Contextual Feeds Work with Video Content
Within a contextual feed, the selection and prioritization of video contents are predicated upon their degree of relevance to the user's situational context. The system generates a personalized video feed by considering multiple types of context, each represented as distinct fields in a structured input (e.g., page context, search keyword, user context, geo-location, URL, and other context). At any given time, only one context type is used for feed generation, such as:
- Webpage context (the page the user is browsing)
- Search query context (keywords entered by the user)
- User profile context (age, bio, preferences, etc.)
- Geographic context (latitude/longitude)
The feed generation process consists of three main stages:
- User Profile-Based Feed Generation
- Uses detailed user profile data to retrieve relevant videos.
- If no match is found, it falls back to context-based processing.
- Handles cold start (insufficient user data) by using contextual or geo-based logic.
- Prioritizes ranking based on user engagement: shares (highest), sparks (medium), views (lowest).
- Context-Based Feed Generation
- Processes text-based inputs (page context, search queries, user bio) to extract keywords and intent.
- Incorporates geo-location data for regionally relevant content.
- Constructs and executes an OpenSearch query to fetch relevant videos.
- Feed Ranking & Final Output
- Ranks videos using a weighted formula:
- Context score (normalized matching score from OpenSearch)
- Recency (newer videos get higher scores)
- Popularity (weighted sum of normalized view, spark, comment, and share scores)
- Final score calculation:
- Ranks videos using a weighted formula:
Final_score = 0.34 * Context_score + 0.33 * Recency_score + 0.33 * Popularity_score
- The ranked feed is presented to the user in the descending order of calculated scores.
Essentially, the contextual feed is designed to furnish video content that exhibits maximal pertinence and captivation in relation to the user's particular situation. This increases user engagement.
For the contextual feed, a true or false flag will indicate its activation. The following input parameters are required:
{
"brand_id": int,
"communities": [
{
"community_uuid": str,
"groups": [str, str, str]
},
{
"community_uuid": str,
"groups": [str, str, str]
}
],
"user_uuid": str,
"user_interest": [str, str, str] or [],
"page_session": str,
"genuin_user": bool,
"limit": int,
"contextual_feed": bool,
"user_weight": float,
"recency_weight": float,
"popularity_weight": float,
"page_context": {
"page_context": str,
"compare_with": str (video/community/brand/group/location),
"location": (lat, long),
"location_radius": int (in km)
}
}
Process Outline for Contextual Feed
When `contextual_feed` is enabled, the feed is based on provided context. First, videos are filtered by `brand_id`. Then, a context vector is created. Depending on `compare_with` value: "community" matches communities with similar descriptions; "brand" or "video" matches similar brands or videos; "location" filters videos within a radius. This ensures a personalized, relevant feed.
Detailed instructions regarding the provision of these parameters are specific to each Software Development Kit (SDK). Please consult the comprehensive documentation for the respective SDKs to ascertain the precise methods for parameter transmission.
Upon receipt of the aforementioned parameters, videos are assigned a matching score. Subsequently, videos are presented in the feed according to a descending order of said matching scores. If these optional parameters are not provided, videos will be displayed according to standard operating procedures.