Configure Recommendation Models
Why model configuration matters
Section titled βWhy model configuration mattersβA recommendation engine is only as good as its configuration. The default settings will produce results, but they will not reflect your business priorities. A fashion retailer wants recommendations that respect seasonality. A B2B knowledge base wants recommendations scoped to the visitorβs product line. A media site wants recommendations that balance recency with relevance.
Model configuration is where you translate business intent into algorithmic behavior. This guide shows you how to set up models, choose algorithms, and apply the rules that make recommendations work for your specific scenario.
What you will do
Section titled βWhat you will doβ- Create a recommendation model
- Select the right algorithm for your use case
- Configure business rules and content filters
- Test and validate the model output
Create a recommendation model
Section titled βCreate a recommendation modelβA model defines a recommendation strategy β what to recommend, using which algorithm, subject to which rules.
- Navigate to Optimizely > Recommendations > Models
- Click Create Model
- Give the model a descriptive name that reflects its purpose (e.g., βProduct Page - Similar Itemsβ or βBlog Footer - Related Articlesβ)
- Select the item catalog the model draws from:
- Product catalog for product recommendations
- Content catalog for article/page recommendations
- Save the model to proceed to algorithm selection
Naming convention tip: Use the format [Placement] - [Strategy]. This makes models easy to identify when you have several running across your site.
Select the right algorithm
Section titled βSelect the right algorithmβEach model uses one algorithm. Choose based on what you want to optimize.
| Algorithm | How it works | Best for | Data requirement |
|---|---|---|---|
| Collaborative filtering | Recommends items that similar visitors engaged with | Established sites with high traffic | 10,000+ interactions |
| Content-based | Recommends items with similar attributes (tags, categories, text) | New sites, long-tail content, cold-start scenarios | Good content metadata |
| Hybrid | Combines collaborative and content-based signals | Most production use cases | Some interaction data + good metadata |
| Trending | Ranks items by recent popularity | Homepages, category pages, new visitor fallback | 1 week of traffic data |
| Co-purchase | Recommends items frequently bought together | Cart pages, post-purchase emails | Purchase event data |
To set the algorithm:
- Open your model
- Navigate to Algorithm Settings
- Select the algorithm type
- Adjust the algorithm-specific parameters:
- Collaborative filtering: Set the similarity threshold (higher = more relevant but fewer results) and the lookback window (how far back to consider visitor behavior)
- Content-based: Select which content attributes to match on (categories, tags, description text)
- Hybrid: Set the weight balance between collaborative and content-based signals (e.g., 70/30)
- Trending: Set the trending window (24 hours, 7 days, 30 days)
Configure business rules
Section titled βConfigure business rulesβBusiness rules override or adjust algorithmic output to reflect business priorities.
Inclusion and exclusion rules
Section titled βInclusion and exclusion rulesβControl which items can appear in recommendations:
| Rule | Purpose | Example |
|---|---|---|
| Exclude categories | Prevent items from certain categories | Exclude βclearanceβ from premium product pages |
| Include only | Restrict to specific categories or tags | Only recommend from the same product line |
| Exclude viewed | Skip items the visitor already saw | Prevent showing the current article |
| Exclude purchased | Skip items the visitor already bought | Avoid recommending a product they just ordered |
| Date filter | Only recommend items published or updated within a window | For news sites, only show articles from the last 30 days |
To add rules:
- Open your model
- Navigate to Business Rules
- Click Add Rule
- Select the rule type and configure its parameters
- Set the rule priority (rules are evaluated in order; the first matching rule wins)
Boosting and pinning
Section titled βBoosting and pinningβSometimes you want the algorithm to consider items but give certain ones a nudge:
- Boost β Increase the relevance score of items matching a criterion (e.g., boost new arrivals by 20%)
- Pin β Force a specific item into a specific position (e.g., always show the latest product launch as the first recommendation)
- Diversify β Ensure recommendations span multiple categories rather than clustering in one
Fallback strategy
Section titled βFallback strategyβConfigure what happens when the model cannot generate enough recommendations (new visitor, insufficient data, or too many exclusions):
- Trending fallback β Fill remaining slots with trending items
- Editorial fallback β Show a curated list you maintain manually
- Empty β Show nothing (useful when irrelevant recommendations are worse than none)
Set the fallback in the modelβs Fallback Settings section.
Test and validate the model
Section titled βTest and validate the modelβBefore deploying a model to your live site, verify it produces sensible results.
Preview mode:
- Open your model
- Click Preview
- Select a test item (a product page or article) as context
- Review the recommended items the model returns
- Try different test items across categories to check diversity
Validation checklist:
| Check | What to look for | Action if it fails |
|---|---|---|
| Relevance | Do recommended items relate to the context item? | Adjust algorithm weights or attribute matching |
| Diversity | Are recommendations spread across categories? | Add a diversity rule |
| Freshness | Are stale or outdated items appearing? | Add a date filter rule |
| Exclusions | Are excluded items properly filtered? | Verify exclusion rule configuration |
| Fallback | What shows for a brand-new visitor? | Configure trending or editorial fallback |
| Coverage | Are niche items ever recommended, or only popular ones? | Lower the popularity bias in algorithm settings |
After validation:
- Publish the model to make it available for embedding
- Monitor performance metrics (CTR, revenue per recommendation) for the first two weeks
- Iterate on rules based on real-world data β no model is perfect on the first configuration
Common issues
Section titled βCommon issuesβ| Issue | Cause | Fix |
|---|---|---|
| Model returns no results | Insufficient behavioral data | Wait for more traffic, or switch to content-based algorithm |
| Same items always recommended | Popularity bias in collaborative filtering | Add diversity rules or boost underrepresented categories |
| Irrelevant items appearing | Metadata quality issues | Improve content tagging and categorization |
| Results not updating | Model retraining not running | Check the retraining schedule in model settings |