What Actions Does the Phoenix Model Predict Probabilities For?
The Phoenix model predicts probabilities for continuous user-interaction actions—such as views, clicks, likes, and shares—and optional conversion actions like purchases and signups, configured via dataset settings in phoenix/xrex/data/parquet_recsys.py.
The Phoenix model serves as the core recommendation-system component in the xai-org/x-algorithm repository. Understanding what actions does the Phoenix model predict probabilities for is essential for configuring training pipelines and interpreting inference outputs. The model generates multi-task probability estimates through two distinct action categories defined in the dataset configuration.
Standard Continuous Actions
The primary prediction targets are standard continuous actions that represent generic user interactions. These are controlled by the num_continuous_actions parameter in PhoenixDataset, located in phoenix/xrex/data/parquet_recsys.py.
When instantiating the dataset, you specify how many distinct interaction types the model should learn to predict. Typical deployments include:
- Impressions (views)
- Clicks
- Likes
- Shares
- Other UI-level engagement events
The model outputs a probability for each of these actions for every candidate item, allowing the recommendation system to rank content by predicted engagement likelihood.
Conversion Actions
Beyond standard interactions, the Phoenix model supports conversion action prediction through optional dataset fields. When use_conversion_labels is enabled, the dataset includes conversion_label_seq fields that treat explicit conversion events as separate probabilistic targets.
The conversion_label_types parameter accepts a tuple of strings defining which conversions to predict, such as:
purchasesignupadd_to_cart
The boolean flag fold_conversion_actions_into_multihot controls whether these conversion actions are folded into a multihot representation for joint probability estimation. This multi-task approach allows the model to simultaneously predict engagement likelihood and business-critical conversion events.
How the Model Outputs Probabilities
During inference, the model returns a unified probability vector containing predictions for both action types. In phoenix/xrex/inference/model_runner.py, the predict() method outputs a tensor with shape [batch, num_continuous_actions + len(conversion_label_types)].
You can decompose this output to access individual action probabilities:
# Example: accessing predicted probabilities during inference
# Located in phoenix/xrex/inference/model_runner.py
probs = model.predict(batch) # shape: [batch, total_actions]
# Unpack for num_continuous_actions=3 and conversion_label_types=("purchase", "signup")
view_prob, click_prob, like_prob, purchase_prob, signup_prob = probs
This design enables downstream components to apply different decision thresholds or calibration curves to specific action types.
Configuring the PhoenixDataset
Action prediction targets are defined during dataset initialization. The configuration in phoenix/xrex/data/parquet_recsys.py determines which probabilities the model learns to estimate.
# Example: creating a PhoenixDataset for training
from phoenix.xrex.data.parquet_recsys import PhoenixDataset
cfg = PhoenixDataset(
path="/data/parquet",
num_continuous_actions=3, # e.g., view, click, like
use_conversion_labels=True,
conversion_label_types=("purchase", "signup"),
)
After training, raw probabilities often require calibration for accurate conversion forecasting. The adult_content/calibration.py module demonstrates converting logits into calibrated thresholds:
# Example: calibrating conversion probabilities
from adult_content.calibration import calibrate_probabilities
calibrated = calibrate_probabilities(raw_probs, thresholds)
# Returns probability_at_thresholds for each conversion action
Summary
- The Phoenix model predicts probabilities for two distinct action categories defined in
phoenix/xrex/data/parquet_recsys.py. - Continuous actions (views, clicks, likes) are configured via
num_continuous_actions. - Conversion actions (purchases, signups) are enabled via
use_conversion_labelsand specified inconversion_label_types. - The model outputs a unified probability vector during inference, as implemented in
phoenix/xrex/inference/model_runner.py. - Raw probabilities can be calibrated using utilities in
adult_content/calibration.pyfor production decision-making.
Frequently Asked Questions
Can I customize which specific actions the Phoenix model predicts?
Yes. You customize prediction targets through the PhoenixDataset configuration in phoenix/xrex/data/parquet_recsys.py. Set num_continuous_actions to define how many standard interactions to predict, and use conversion_label_types to specify custom conversion events beyond the default continuous actions.
How are conversion probabilities calibrated after prediction?
The adult_content/calibration.py module provides calibrate_probabilities() functions that convert raw model outputs into calibrated probability estimates at specific thresholds. This calibration step is critical for accurate conversion forecasting in production recommendation systems.
What is the difference between continuous actions and conversion labels?
Continuous actions represent frequent, low-friction user interactions like views and clicks, counted by num_continuous_actions. Conversion labels represent high-value, discrete business events (purchases, signups) defined in conversion_label_types. The model predicts probabilities for both simultaneously but treats them as separate prediction heads in the multi-task architecture.
Where does the model output these probabilities during inference?
The inference logic resides in phoenix/xrex/inference/model_runner.py. The model's predict() method returns a tensor combining continuous action probabilities and conversion label probabilities into a single vector per candidate item, allowing downstream ranking algorithms to weight different action types according to business objectives.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →