Collaborative items-for-item recommendations
If you have enabled signals and recommendations for a collection, then the defaultCOLLECTION_NAME_bpr_item_recs, a BPR Recommender job is already created and configured to produce items-for-item recommendations (as well as items-for-user recommendations).
This is the recommended job type, and produces better results with a short runtime. To create the query pipeline that consumes this job’s output, see Fetch Items-for-Item Recommendations (Collaborative/BPR Method).
Fetch Items-for-Item Recommendations (Collaborative/BPR Method)
Fetch Items-for-Item Recommendations (Collaborative/BPR Method)
In Fusion, you can download and import a query pipeline that works out of the box with the default BPR Recommender job.There are two separate pipelines attached below which work in different ways to query and return recommendations.Query for recommendations onlyNo additional configuration is needed to use this pipeline with the default BPR job configuration.See also
-
Download the
APPName_item_item_rec_pipelines_bpr.jsonfile. -
Rename the file to replace
APPNamewith the name of your Fusion app, such asProductCatalog_item_item_rec_pipelines_bpr.json. -
Open the JSON file, replace all instances of
APPNamewith the name of your Fusion app, such asProductCatalog, and save it. -
Import the JSON file into your Fusion instance using the Query Pipelines REST API:
-
In the Fusion UI, navigate to Query > Query Pipelines to verify that the new pipeline is available.
This pipeline should be used to query the collection where the recommendations are stored. It makes a query against the
itemIdfield and only returns the recommendeditemIdvalues. To get the actual items, you need to make a second query to the respective catalog collection with the returneditemIdvalues.
-
Download the
APPName_items_for_item_bpr_boost.jsonfile - Rename the file to replace
APPNamewith the name of your Fusion app, such asProductCatalog_items_for_item_bpr_boost.json. - Open the JSON file, replace all instances of
APPNamewith the name of your Fusion app, such asProductCatalog. - Fill in the
collectionname field in the firstRecommend Items for Itemstage and save the file. 5. Import the JSON file into your Fusion instance using the Query Pipelines REST API: - In the Fusion UI, navigate to Query > Query Pipelines to verify that the new pipeline is available.
This pipeline queries the recommendations collection and then makes a subsequent query to the actual catalog collection boosting the recommended items and returning the actual items from the catalog. This pipeline will therefore also return recommendations even if none were generated/available.
This pipeline expects a request parameter called
id=<itemId> to be appended to the request in order to work. An example query URL to this pipeline would look like https://example-recs-fusion.com/api/query-pipelines/APPName_items_for_item_bpr_boost/collections/catalog/select?q=**:**&id=SomeItemIdContent-based items-for-item recommendations
The Content-Based Recommender job computes item similarities based on their content, such as product descriptions. This is a useful option when you do not have enough signals for accurate results using the collaborative method described above. To create the query pipeline that consumes this job’s output, run the recommender job and then see Fetch Items-for-Item Recommendations (Content-Based Method).Fetch Items-for-Item Recommendations (Content-Based Method)
Fetch Items-for-Item Recommendations (Content-Based Method)
In Fusion, you can download and import a query pipeline that works out of the box to fetch the items-for-item recommendations generated by the default Content-Based Recommender job.There are two separate pipelines attached below which work in different ways to query and return recommendations.Query for recommendations onlyNo additional configuration is needed to use this pipeline with the default BPR job configuration.Boost recommended products from catalogSee also
- Download the
APPName_item_item_rec_pipelines_content.jsonfile. - Rename the file to replace
APPNamewith the name of your Fusion app, such asProductCatalog_item_item_rec_pipelines_content.json. - Open the JSON file, replace all instances of
APPNamewith the name of your Fusion app, such asProductCatalog, and save it. - Import the JSON file into your Fusion instance using the Query Pipelines REST API:
- In the Fusion UI, navigate to Query > Query Pipelines to verify that the new pipeline is available.
This pipeline should be used to query the collection where the recommendations are stored. It makes a query against the
itemId field and returns the recommended itemId values. To get the actual items, you need to make a second query to the respective catalog collection with the returned itemId values.-
Download the
APPName_content_boost.jsonfile - Rename the file to replace
APPNamewith the name of your Fusion app, such asProductCatalog_content_boost.json. - Open the JSON file, replace all instances of
APPNamewith the name of your Fusion app, such asProductCatalog. - Fill in the
collectionname field in the firstRecommend Items for Itemstage and save the file. - Import the JSON file into your Fusion instance using the Query Pipelines REST API:
- In the Fusion UI, navigate to Query > Query Pipelines to verify that the new pipeline is available.
This pipeline queries the recommendations collection and then makes a subsequent query to the actual catalog collection boosting the recommended items and returning the actual items from the catalog. This pipeline will therefore also return recommendations even if none were generated/available.
This pipeline expects a request parameter called
id=itemId to be appended to the request in order to work. An example query URL to this pipeline would look like https://example-recs-fusion.com/api/query-pipelines/APPName_items_for_user_bpr_boost/collections/catalog/select?q=**:**&id=SomeItemId