# Composite Recommendations

> Source: https://docs.recombee.com/scenarios/composite-recommendations

> For the complete documentation index, see [llms.txt](/llms.txt).

# Composite Recommendations

Composite Recommendations return both a _source entity_ (e.g., an Item or [Item Segment](/segmentations)) and a related list of recommendations in a single response.

They are requested via the **[Composite Recommendation API endpoint](/api/recommendations#composite-recommendation)**.

## Examples

### Because You Watched <movie>

* _Source_: The movie (Item) watched by the user
* _Result_: Movies related to the watched one

[![Because You Watched Example](/img/gui/composite_because_you_watched.png)](/img/gui/composite_because_you_watched.png)

Tip

Check out the Because You Watched [Scenario Recipe](/recipes/video/fully-personalized-homepage/because-you-watched) for more info

### Articles from <category>

* _Source_: The user’s favorite category ([Item Segment](/segmentations))
* _Result_: Recommended articles from that category

[![Articles from Category Example](/img/gui/composite_items_from_category.png)](/img/gui/composite_items_from_category.png)

### Artists Related to <artist>

* _Source_: The user’s favorite artist ([Item Segment](/segmentations))
* _Result_: Recommended artists related to the favorite artist

[![Related Artists Example](/img/gui/composite_artists_to_artist.png)](/img/gui/composite_artists_to_artist.png)

### Fully Personalized Homepage

Often, multiple _Composite Recommendations_ are requested in a [Batch](https://docs.recombee.com/api/miscellaneous#batch) to fully personalize the homepage or other sections of a website or app.

For example, to display five rows on the homepage — each representing one of the user’s **top five categories** and showing the most relevant content within that category — you can send **five Composite Recommendation requests** in a single Batch, set as:

* _Source:_ category (_[Item Segment](/segmentations)_)
* _Result:_ content (_Items_)

This approach enables the homepage to consist of dynamically personalized sections.

The API automatically ensures that five distinct categories are returned in the response, avoiding duplicates.

See the [API code example](/api/recommendations#composite-recommendation-example-category-sections-with-reordering) for implementation details.

Tip

Check out the Fully Personalized Homepage Scenario Recipes for:

* [Video](/recipes/video/fully-personalized-homepage/personalized-re-ordering-of-rows-advanced)
* [News](/recipes/news/homepage/personalized-sections-with-reordering)
* [E-Commerce](/recipes/e-commerce/fully-personalized-homepage/personalized-re-ordering-of-sections-advanced)

## Structure

Composite Recommendations can be viewed as two sequential requests:

1. Recommend the _Source_.
2. Recommend the _Result_ for that _Source_.

For instance, _Articles from <category>_ involves:

* [Recommend Item Segments To User](/api/recommendations#recommend-items-to-user) to find the category.
* [Recommend Items To Item Segment](/api/recommendations#recommend-items-to-item-segment) to get articles from that category.

Each _Composite Recommendation_ counts as **one API request** for billing.

## Setup Mode

When creating a _Composite Recommendation_ scenario, you can choose a **Template** or a **Custom** configuration.

### Templates

Predefined templates are available for common cases such as _Because You Purchased_ or _Videos From Top Genre For You_. Templates define both the [endpoints](#structure) used for each stage and the [Logic](/logics).

### Custom

Custom configuration allows you to manually define the endpoints for each stage and assign different [Logics](/logics) as needed.

## Configuration

In the Admin UI, you can set distinct [Filters](/scenarios/settings-in-admin-ui#filters) and [Boosters](/scenarios/settings-in-admin-ui#boosters) for each stage (_Source_ and _Result_).

You can also specify these settings using the [sourceSettings](/api/recommendations#composite-recommendation-param-sourceSettings) and [resultSettings](/api/recommendations#composite-recommendation-param-resultSettings) API parameters.