> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Items-for-user

> Recommendations

[localhost link]: http://localhost:3000/docs/lucidworks-search/07-improve-your-queries/recommendations/items-for-user

[mintlify link]: https://doc.lucidworks.com/docs/lucidworks-search/07-improve-your-queries/recommendations/items-for-user.md

[old doc.lw link]: https://doc.lucidworks.com/managed-fusion/5.9/pbwiub.md

Items-for-user recommendations use the [Recommend items for user](https://doc.lucidworks.com/docs/lucidworks-search/09-developer-documentation/config-specs/query-pipeline-stages/recommend-items-for-user.md) query stage to present items that are similar to ones in which the user has previously shown interest, based on the user’s search history, browsing history, purchase history, and so on. This is one type of [collaborative recommendation](https://doc.lucidworks.com/docs/lucidworks-search/07-improve-your-queries/recommendations/methods-recs.md#content-based-vs-collaborative-recommendations).

> [card] Key questions to get you started
>
> Powered by Lucidworks Agent Studio

If you have enabled signals and recommendations for a collection, then the default `COLLECTION_NAME_bpr_item_recs`, a [BPR Recommender](https://doc.lucidworks.com/docs/lucidworks-search/09-developer-documentation/config-specs/jobs/bpr-recommender.md) job is already created and configured to produce 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-User Recommendations (Collaborative/BPR Method)](#fetch-items-for-user-bpr).

> [accordion] Fetch Items-for-User Recommendations (Collaborative/BPR Method)
>
> In Fusion you can download and import a query pipeline that works out of the box to fetch items-for-user recommendations generated by the default [BPR Recommender](https://doc.lucidworks.com/docs/5/fusion/reference/config-ref/jobs/bpr-recommender.md) job.
>
> There are two separate pipelines attached below which work in different ways to query and return recommendations.
>
> **Query for recommendations only**
>
> 1. [Download the `APPName_item_user_rec_pipelines_bpr.json` file](https://doc.lucidworks.com/assets/attachments/pipelines/APPName_item_user_rec_pipelines_bpr.json).
> 2. Rename the file to replace `APPName` with the name of your Fusion app, such as `ProductCatalog_item_user_rec_pipelines_bpr.json`.
> 3. Open the JSON file, replace all instances of `APPName` with the name of your Fusion app, such as `ProductCatalog`, and save it.
> 4. Import the JSON file into your Fusion instance using the Query Pipelines REST API:
>    ```
>    curl -u USERNAME:PASSWORD <fusion_proxy>/api/query-pipelines -XPOST -H 'content-type:application/json' -d@<path/to/filename.json>
>    ```
> 5. In the Fusion UI, navigate to **Query** > **Query Pipelines** to verify that the new pipeline is available.
>
>    > [!NOTE]
>    >
>    > This pipeline should be used to query the collection where the recommendations are stored. It makes a query against the `userId` field and only 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.
>
> No additional configuration is needed to use this pipeline with the default BPR job configuration.
>
> **Boost recommended products from catalog**
>
> 1. [Download the `APPName_items_for_user_bpr_boost.json` file](https://doc.lucidworks.com/assets/attachments/pipelines/APPName_items_for_user_bpr_boost.json)
>
> 2. Rename the file to replace `APPName` with the name of your Fusion app, such as `ProductCatalog_items_for_user_bpr_boost.json`.
>
> 3. Open the JSON file, replace all instances of `APPName` with the name of your Fusion app, such as `ProductCatalog`.
>
> 4. Fill in the `collection` name field in the first `Recommend Items for User` stage and save the file.
>
> 5. Import the JSON file into your Fusion instance using the Query Pipelines REST API:
>    ```
>    curl -u USERNAME:PASSWORD <fusion_proxy>/api/query-pipelines -XPOST -H 'content-type:application/json' -d@<path/to/filename.json>
>    ```
>
> 6. In the Fusion UI, navigate to **Query** > **Query Pipelines** to verify that the new pipeline is available.
>
> > [!NOTE]
> >
> > 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.
>
> > [!NOTE]
> >
> > This pipeline expects a request parameter called `id=<userId>` 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=SomeUserId`
>
> > [!TIP]
> >
> > If the pipeline does not appear in the **Query Pipelines** panel, you may need to attach it to your app like this:  Go to **System** > **Object Explorer**, click the **In No Apps** filter, hover over the pipeline, click the ![oe-app-menu](https://mintcdn.com/lucidworks/5yWZ-KtZuBe4Y_Fg/assets/images/4.0/icons/oe-app-menu.png?fit=max\&auto=format\&n=5yWZ-KtZuBe4Y_Fg\&q=85\&s=1e9322222ea76f70c278fb9c2a04ce9f) icon, and select **Add to this app**.
>
> **See also**
>
> * [Items-For-User Recommendations](https://doc.lucidworks.com/docs/5/fusion/reference/config-ref/pipeline-stages/query-stages/recommend-items-for-user-query-stage.md)
> * [BPR Recommender job](https://doc.lucidworks.com/docs/5/fusion/reference/config-ref/jobs/bpr-recommender.md)
> * [Getting Started with Recommendations and Boosting](https://doc.lucidworks.com/docs/5/fusion/getting-data-out/query-enhancement/recommendations/getting-started.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.