> For the complete documentation index, see [llms.txt](https://docs.abtasty.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.abtasty.com/recommendations-and-merchandising_deprecated/recos-and-merch-algorythms/default-algorithms.md).

# Default algorithms

A default algorithm is a function that, given a certain context, returns a sorted list of items.\
It can either be the result of applying an AI model or a very simple sort on datasets.

## Similar items <a href="#h_01jdktv2dprb8ecnvsgfey1vde" id="h_01jdktv2dprb8ecnvsgfey1vde"></a>

ABTasty uses a proprietary version of a TF-IDF (short for term frequency–inverse document frequency) algorithm to show the “seen with” items that really matters. NB.: *The “most-seen-together” items are considered to be the most similar items, but you can increase the precision of the model by filtering results by category or product type for example*

**Inputs:** similarTo:itemID

&#x20;

## Associated items <a href="#h_01jdktxpff4amzab05h1md1950" id="h_01jdktxpff4amzab05h1md1950"></a>

ABTasty uses a proprietary version of a TF-IDF algorithm to show the “purchased with” items that really matters. NB.: *The “most-bought-together” items are considered to be the most relevant complementary items, but you can increase the precision of the model by filtering results by brand, compatibility or cross-category filters for example*

**Inputs:** complementaryTo:itemID

&#x20;

## Associated category items <a href="#h_01jdkvng5w1jgaa4fmwkg9qn9y" id="h_01jdkvng5w1jgaa4fmwkg9qn9y"></a>

ABTasty uses a proprietary version of a TF-IDF algorithm to show items from the “purchased with” categories that really matters. NB.: *The “most-bought-together” items are considered to be the most relevant complementary items, but you can increase the precision of the model by filtering results by brand, compatibility or cross-category filters for example*

**Inputs:** complementaryTo:itemID

&#x20;

## Sorted items (top sells, views, recency, ratings,…) <a href="#h_01jdkvrg0rt7s29rsadzahve9d" id="h_01jdkvrg0rt7s29rsadzahve9d"></a>

ABTasty crosses your catalog with your pageviews and transactions data to enable you to create any weighted score and sort your items the way you want. NB.: *By default, all standard ranking algorithms (best sellers, best views, weighted scoresd…) are based on 30 days of data but this period can be easily adjusted*

**Inputs:** limit:integer

&#x20;

## Used items (Last seen, added, purchased) <a href="#h_01jdkvtb2sx2smhm7147v5h49k" id="h_01jdkvtb2sx2smhm7147v5h49k"></a>

ABTasty’s recos-tag stores in real-time in the local storage the items viewed, added and purchased NB.: *last viewed or purchased items can be directly collected and displayed, but this information is also used in order to trigger User affinity, or “similar items” or “complementary items” or “best sellers in selected categories” algorithms*

**Inputs:** sinceDays:integer

&#x20;

## User affinity items <a href="#h_01jdkvwfechcx4x7959khc7wxk" id="h_01jdkvwfechcx4x7959khc7wxk"></a>

ABTasty uses a proprietary scoring model returning for each user the most relevant items (based on his/her browsing, cart and purchases history).

&#x20;

## Forced items <a href="#h_01jdkvxe6jwagq71d5xhga7x55" id="h_01jdkvxe6jwagq71d5xhga7x55"></a>

ABTasty enables you to force at any rank in any recommendation a custom list of selected item(s)

&#x20;

## Tuned to emotion items <a href="#h_01jdkvyd9k3e5k7cevfvwhvrcy" id="h_01jdkvyd9k3e5k7cevfvwhvrcy"></a>

With EmotionsAI enabled, ABTasty detects users emotions in real-time to show the right items. NB.: *Work in Progress - don’t hesitate to ask for your position on the waitlist before it gets too long!*

**Inputs:** emotion:emotionID


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.abtasty.com/recommendations-and-merchandising_deprecated/recos-and-merch-algorythms/default-algorithms.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
