Artificial Intelligence Recommendation (AIRec) trains recommendation models from three types of data: items, users, and behaviors. The "you may also like" service type is suitable for homepage recommendations based on feed streams — it guides users to click and read recommended content, increasing browsing depth and stay duration. For the news feed use case, this page explains what event tracking data AIRec needs and how to collect it correctly.
How it works
AIRec uses three tables for model training:
| Table | What it contains | Why it matters |
|---|---|---|
| Item table | Items available for recommendation | AIRec selects and ranks candidates from this table |
| User table | User profile information | AIRec personalizes results based on user preferences |
| Behavior table | User interaction events | The core training signal — dirty data directly degrades model quality |
Provide valid, clean data in the item table. Invalid items introduce noise and reduce recommendation accuracy.
Client-side vs. server-side tracking
Event tracking responsibilities are split between the client and the server. User-visible interactions (exposures and clicks) must be tracked client-side because only the client knows what the user sees. Item metadata and classification (tags, categories, expiration, status) are tracked server-side because they require feature extraction or system configuration.
| Event type | Tracked on | Notes |
|---|---|---|
| Exposures | Client side | Depends on what the user sees on screen |
| Clicks | Client side | Depends on what the user taps or clicks |
| Scene IDs (behavioral data) | Client side | Captures which scene triggered the interaction |
| Scene IDs (item data) | Server side | Records which scenes each item belongs to |
| Tags | Server side (or algorithm team) | Requires feature extraction from item content |
| Category levels | Server side | Classifies items by theme and attribute |
| Expiration time | Server side | Configured automatically or manually |
| Status | Server side | Configured automatically or manually |
Event tracking data
Exposures
An exposure is counted each time an item is displayed to a user. The bhv_type field in the behavior table identifies exposures.
Tracking implementation: Client side.
Counting rules:
The user must be able to visually see the item.
The item must remain visible for a minimum duration (for example, 1 second).
If the same item is shown to the same user multiple times in a short period, count only one exposure.
Example — user scrolls quickly through a feed:

When a user quickly flicks through the homepage, each item generates one exposure regardless of how many times it scrolls past. Upload six exposure entries to AIRec in total.
Example — user opens an item and returns:
When a user clicks Item C to view its details page and then navigates back to the homepage, items A, B, and C each generate one exposure. Item C generates one click. Upload three exposure entries and one click entry to AIRec.
Clicks
A click is counted each time a user taps or clicks an item to open its details.
Tracking implementation: Client side.
Counting rules:
The click must be a valid interaction on the client (not a bot or accidental tap).
There is no minimum reading duration after the user opens the item.
If the same user clicks the same item multiple times in a short period, count only one click.
Scene IDs
A scene groups items and behaviors into recommendation contexts — for example, a homepage feed, a category page, or a related-articles section. The scene_id field appears in both the item table and the behavior table.
Tracking implementation: Server side for item data; client side for behavioral data.
All scene IDs in which behaviors occur and in which items appear must be recorded and uploaded to AIRec. The scene_id used when recalling items must match the scene_id uploaded to AIRec.
Example:
Three scenes with IDs 1, 2, and 3 are configured in AIRec. Scene IDs are customizable.
Item table entries for scene 2:
item_id: itemA, scene_id: 2
item_id: itemB, scene_id: 2
item_id: itemC, scene_id: 2Behavior table entries for scene 2:
type: expose, scene_id: 2, item_id: itemA
type: expose, scene_id: 2, item_id: itemB
type: expose, scene_id: 2, item_id: itemCUsage notes:
Scene IDs identify frontend display contexts. They do not represent parent-child hierarchies between scenes.
Use categories (not scene IDs) to classify sub-sections within a scene. For example, in a sports channel, sections like "latest scores," "event forecast," and "event commentary" should be modeled as categories, not separate scenes.
When querying recommendation results with a server SDK, specify
scene_idto retrieve results for a particular scene.Some users have recommendation requirements on a homepage where the homepage does not provide item data based on the interests of users and instead displays item data aggregated in multiple scenes.
Tags
Tags are text labels that summarize the features of an item. The tag field appears in both the user table and the item table. Separate multiple tags with commas (,).
Tracking implementation: Server side, or manually by the algorithm team via feature extraction from item content.
Example:
For an item about a Toyota Highlander SUV, the tag field might contain:
SUV,Toyota,HighlanderCategory levels
Category levels classify items that share a theme or attribute. The category_path and category_level fields appear in the item table.
Tracking implementation: Server side.
Example:

| item_id | category_path | category_level |
|---|---|---|
| A | Soccer_Chinese Super League | 2 |
| B | Basketball_CBA | 2 |
| C | Soccer_Evergrande | 2 |
For information on using category levels to improve recommendation diversity, see Improve diversity with operation rules.
Expiration time
Expiration time marks when an item should no longer be recommended. The expire_time field appears in the item table. When the server time passes the value in expire_time, AIRec stops recommending that item.
Tracking implementation: Server side, configured automatically by system rules or manually.
Usage notes:
Leave
expire_timeblank if the item has no expiration.Specify
expire_timeas a timestamp accurate to the second.If all items uploaded for the first time have already expired, the service cannot start.
Status
Status controls whether an item is eligible for recommendation. The status field appears in the item table.
| Value | Meaning |
|---|---|
1 | Item can be recommended |
0 | Item cannot be recommended |
Tracking implementation: Server side, configured automatically by system rules or manually.
Usage notes:
The
statusfield is required.If the
statusvalue is0for all items when data is first uploaded, the service cannot start.
Key concepts
| Term | Definition |
|---|---|
| Feed stream | An information flow that continuously delivers content to users |
| Browsing depth | The number of page views generated per visit in a calculation cycle |
| Stay duration | The time a user spends on a page |
| Discretization | Classification of data in recommendation results into multiple categories |