> For the complete documentation index, see [llms.txt](https://docs.saas.haut.ai/haut.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.saas.haut.ai/haut.ai/haut.ai-features/product-recommendation-system-2.0/recommendation-algorithm.md).

# Recommendation Algorithm

How the Product Recommendation System matches products to a user, from skin type filtering through to the sensitivity question.

* **Step 1**
  * System selects all products that have a skin type tag that matches the user's skin type.
  * When the sensitivity question is enabled, the logic is the following:

    * If the user selects `Yes`: Product Recommendation System will only recommend products that match both:
      * the user’s AI-derived skin type **and**
      * the separate Sensitive product tag set to `Yes` (i.e., products explicitly marked as suitable for sensitive skin)
    * If the user selects `No` : Product Recommendation System will use only the user's AI-derived skin type and **ignore sensitivity**, ensuring full product coverage for that skin type.

    This approach provides a conservative and safe logic: sensitive-skin users only receive products that brands approved as suitable for sensitive use.
  * If the user's skin type is not among the skin type tags of the product, such a product is not recommended to the user under any circumstances.
* **Step 2**
  * The system checks if the user has skin concerns tags and selects all products that have at least 1 tag corresponding to the user's skin concerns.
  * The system selects all products without skin concerns tags (basic care products).
  * If the product has concern tags, but there is no overlap between these tags and the concern tags of the user, such products are not recommended to the user under any circumstances.
* **Step 3**
  * The system sorts products by priority.
* **Step 4**
  * Products are sorted by the total weight of skin-concern tags that match the user’s identified concerns.
  * Basic concerns contribute a weight of **1**, and advanced concerns contribute a weight of **1.5**.
* **Step 5**
  * The system sorts products by price.
* **Step 6**
  * The system selects the top 10 products in each category.
    * Make-up remover
    * Cleanser
    * Toner
    * Exfoliators
    * Mask
    * Serum
    * Eye care
    * Moisturizer
    * Sunscreen
* **Step 7**: this step is different for the different type of view. Check the description:
  * Routine View
    * Main routine
      * For each category, system selects the top product.
      * If this product has only one tag (AM or PM), a pair is selected as follows:
        * In the same category, the next highest priority product with the opposite tag (AM or PM) is selected to form a pair.
        * If such a product is not available, a product with both tags (AM and PM) is selected.
        * If no suitable product can be found according to the conditions above, no pair is assigned for this product.
    * Promo product

      System selects all the product with the tag "Promo" and then selects 1 product as follows:

      * Not included in the routine
      * Highest priority
      * Highest price
    * "You may also like" block\
      This block includes all the recommended products that are selected but not presented in the routine. The order of selection of goods is determined by the following sorting sequence:
      * Priority
      * Concerns covered (optional)
      * Price
  * List View
    * The system shows all recommended products as a list based on the order defined in step 6

***

{% hint style="warning" %}
Not a Haut.AI client yet?
{% endhint %}

<a href="https://haut.ai/book-a-demo?utm_source=referral&#x26;utm_medium=saas_docs&#x26;utm_campaign=Docs_SaaS_HautAI" class="button primary" data-icon="user-vneck">Book a demo</a> <a href="https://haut.ai/product/ai-skin-analysis?utm_source=referral&#x26;utm_medium=saas_docs&#x26;utm_campaign=Docs_SaaS_HautAI" class="button secondary" data-icon="external-link">Platform overview on haut.ai</a>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.saas.haut.ai/haut.ai/haut.ai-features/product-recommendation-system-2.0/recommendation-algorithm.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
