Documentation Index
Fetch the complete documentation index at: https://docs.joinrefine.io/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Refine provides three types of recommendations, each optimized for different use cases:| Type | Best For | Data Required |
|---|---|---|
| Similar Items | Product pages, “You may also like” | Anchor product ID |
| Visitor Recommendations | Homepage, anonymous users | Browsing history (automatic) |
| User Recommendations | Logged-in users, personalization | User identification |
Quick Start
Configuration IDs
Visitor and user recommendations require aconfigId that references a recommendation configuration created in the Refine dashboard. Configurations define:
- Strategy — Collaborative filtering, content-based, hybrid
- Weighting — Balance between visual similarity and behavioral signals
- Filters — Default filters applied to all recommendations
- Business rules — Category diversity, price range constraints
Similar items don’t require a configId — they work directly with any product in your catalog.
Tracking Recommendations
Always track when recommendations are served to enable analytics and feedback loops:Response Structure
All recommendation methods return the same structure:Array of recommended products, ordered by relevance/score.
Unique identifier for this recommendation serve. Used for event tracking.
Total number of available recommendations before
topK limit.Filtering Recommendations
Apply filters to narrow recommendations:Visual Weight
For similar items, control the balance between visual similarity and other signals:| visualWeight | Behavior |
|---|---|
0.0 | Pure metadata/behavioral matching |
0.5 | Balanced (default for most) |
1.0 | Pure visual similarity |
Recommendation Strategies by Page
| Page | Recommended Type | Configuration |
|---|---|---|
| Product Detail Page | Similar Items | anchorId = current product |
| Homepage (anonymous) | Visitor Recs | Popular/trending config |
| Homepage (logged-in) | User Recs | Personalized config |
| Cart Page | Similar Items | Multiple anchors from cart |
| Category Page | Visitor Recs | Category-specific config |
| Search (no results) | Visitor Recs | Fallback/popular config |
Error Handling
Next Steps
Similar Items
Product-based recommendations
Visitor Recommendations
Anonymous visitor personalization
User Recommendations
Logged-in user personalization
Event Tracking
Track recommendation interactions