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

# Get image-based recommendations with Looking Similar

> Retrieve related items based on images with the Recommend Looking Similar model.

export const Index = () => <Tooltip tip="An Algolia index is a searchable dataset that consists of records and configuration settings. These settings define how the records are searched and ranked.">
    index
  </Tooltip>;

export const AlgoliaRecommend = () => <svg xmlns="http://www.w3.org/2000/svg" className="inline" viewBox="0 0 80 80" width="20" height="20" fill="none" role="presentation" ariaLabel="Algolia Recommend">
    <path d="m50 65-4 12H34l-4-12h20Z" fill="#36395A"></path>
    <path d="M68 32c0 15.464-12.536 28-28 28S12 47.464 12 32 24.536 4 40 4s28 12.536 28 28Z" fill="#FF2A6A"></path>
    <path d="M43 34V17L26 34h17Z" fill="#fff"></path>
    <path d="M37 30v17l17-17H37Z" fill="#fff"></path>
  </svg>;

Looking Similar is a Recommend model which finds related items based on images in your <Index />.
You can set it up in a few minutes as it doesn't need any events.

Image-based recommendations help inspire your users and let them explore your catalog.
In particular, the Recommend Looking Similar model helps in these cases:

* **When your users know what they want**

  Users might want something specific that isn't available, like an out-of-stock product.
  You can recommend similar-looking alternatives to help users continue their shopping.

* **When users don't know what they want**

  Use recommendations from the Looking Similar model to inspire users to explore your catalog.
  Navigating through similar-looking products can be a great way to discover new products which they might never search for.

* **When you have other ideas**

  The Looking Similar model is a catalog analysis tool that can generate hundreds of recommendations for each item.
  If you combine the recommendations with the Recommend [Filtering API](/doc/libraries/sdk/v1/methods/get-recommendations),
  you can refine them based on attribute, such as `category == "Clothing"` or `price >= 10`, and enable advanced merchandising.

## Limitations

The model has the following limitations:

* Maximum **3** attributes with images
* Maximum **500,000** images per training (the model will fetch up to this limit,
  sorted by relevance based on your [custom ranking](/doc/guides/managing-results/must-do/custom-ranking))
* It can't use [Recommend Rules](https://dashboard.algolia.com/recommend/rules)

## Set up the Looking Similar model

Start by selecting an application with AI Recommendations enabled.

1. Go to the [Algolia dashboard](https://dashboard.algolia.com/recommend) and select your Algolia application.

2. On the left sidebar, select <AlgoliaRecommend /> **Recommend**.

3. In the **Looking similar** section, click **Start using**.

   <img src="https://mintcdn.com/algolia/QUuhkPGiow1bP-ae/images/guides/recommend/select-ls-model.png?fit=max&auto=format&n=QUuhkPGiow1bP-ae&q=85&s=56acaef9d8a917b1ad0df35def7130cb" alt="Screenshot of the 'Looking similar' section with a red arrow pointing to the 'Start using' button." width="1122" height="939" data-path="images/guides/recommend/select-ls-model.png" />

4. Select an index with image URLs you want to use as the data source.

   <img src="https://mintcdn.com/algolia/QUuhkPGiow1bP-ae/images/guides/recommend/select-index-ls.png?fit=max&auto=format&n=QUuhkPGiow1bP-ae&q=85&s=ff3ec7c5e947b2ad8ee420f19bb61aa6" alt="Select index to use as data source for training the model" width="811" height="218" data-path="images/guides/recommend/select-index-ls.png" />

5. Select up to three image attributes.
   The recommended items will be sorted by the **best score**.

   <img src="https://mintcdn.com/algolia/QUuhkPGiow1bP-ae/images/guides/recommend/select-img-attr-ls.png?fit=max&auto=format&n=QUuhkPGiow1bP-ae&q=85&s=d31e8b649df1477b66539645b539dd55" alt="Select the image attributes to use for training the Looking Similar model" width="955" height="408" data-path="images/guides/recommend/select-img-attr-ls.png" />

   <Note>
     The model supports images from single attributes with single values, such as `productImage`,
     from attributes with several values, such as `rentalHomeImages`, or from several attributes,
     such as `productImage`, `userProvidedProductImage`.
   </Note>

6. Start training the model by clicking **Start training**.

## Check the training results

After a few minutes,
you can find training metrics in the **Info** tab of the model overview,
the number and percentage of items with recommendations.

<img src="https://mintcdn.com/algolia/QUuhkPGiow1bP-ae/images/guides/recommend/metrics-ls.png?fit=max&auto=format&n=QUuhkPGiow1bP-ae&q=85&s=a4c989e3b4056d7374229cbfb2ebf31b" alt="Screenshot of a model training summary showing 808 items with recommendations and 99% coverage." width="870" height="395" data-path="images/guides/recommend/metrics-ls.png" />

<Note>
  The coverage (percentage of items recommended at least once) should be high as the model generates up to 30 recommendations per item with images.
</Note>

Check the results in the **Preview** tab by typing a few characters to select a source item.

<img src="https://mintcdn.com/algolia/QUuhkPGiow1bP-ae/images/guides/recommend/preview-ls.png?fit=max&auto=format&n=QUuhkPGiow1bP-ae&q=85&s=c4fbd772885283ea67e4731c6585cc30" alt="Screenshot of image-based recommendations showing a selected item and visually similar results with confidence scores." width="1156" height="505" data-path="images/guides/recommend/preview-ls.png" />

## Integration

The InstantSearch.js and React InstantSearch UI libraries have widgets for showing recommendations from the Looking Similar model:

* [Looking Similar widget (InstantSearch.js)](/doc/api-reference/widgets/looking-similar/js)
* [Looking Similar widget (React InstantSearch)](/doc/api-reference/widgets/looking-similar/react)

Alternatively, you can get these recommendations with the [JavaScript API client](/doc/libraries/sdk/v1/methods/get-looking-similar).
