Hey HN,<p>We're excited to launch Shaped Value Modeling, an interface for optimizing recommendation and search models for multiples objectives. We needed a way to combine multiple objectives—like relevance, conversions, and diversity — without constantly redeploying models or sacrificing performance. So we created a python DSL that lets you combine these objectives in real time, dynamically adjust ranking logic, and A/B test different strategies without redeploying.<p>Here's the core idea:<p>- Composable Value Models: Define your ranking logic in Python by combining different models and signals (e.g., click prediction, purchase likelihood, item quality).<p>- Dynamic API Control: Adjust the weighting of these signals on the fly through a simple API. Want to boost engagement for a specific user segment? Change the weighting in real time.<p>- Built-in Analytics: Track the impact of your changes with integrated analytics.<p>How it Works:
1.Train separate models for different objectives (e.g., LightGBM for click prediction, BERT4Rec for purchase likelihood).
2. Define a "value model" that combines these models using mathematical expressions and custom logic. Let's say we have a lightgbm click-through-rate model called ctr_model and a transformerd based next purchase model called purchase_model, you can create an ensembled value model as follows:<p>```
value_model = 0.5 * lightgbm + 0.5 * bert4rec + log(item.quality_score)
```<p>3. Dynamically adjust the value_model via API calls to optimize for different goals or user segments:<p>```
{
"user_id": "83NSLX",
"config": {
"value_model": "0.3 * lightgbm + 0.7 * bert4rec"
}
}
```<p>Check it out in our linked demo!