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

# Requirements and limits

> Know the requirements and limits of Advanced Personalization to maintain a healthy setup.

You can change your Advanced Personalization configuration [up to five times per day](https://www.algolia.com/policies/advanced-personalization).
Every update must adhere to the following limits:

* [Indices](#indices)
* [Affinities](#affinities)
* [Events](#events)

<Callout icon="credit-card" color="#c084fc">
  This feature isn't available on every plan.
  Refer to your [pricing plan](https://www.algolia.com/pricing) to see if it's included.
</Callout>

## Indices

* You can personalize as many of your indices as you like.
* The maximum number of indices you can create [depends on your plan](/doc/guides/scaling/algolia-service-limits#application-record-and-index-limits).

## Affinities

Affinities are attributes that you want to use to personalize search results.

* You must select at least one and **no more than 20** for each index you personalize.
* The following attribute names are reserved for Algolia and can't be used as affinities:

  * `app_id`
  * `client_id`
  * `session_id`
  * `updated_at`
  * `__index_level_0__`
  * `objectID`
  * `^_ds_.*`

### Affinity values

* Each attribute must have no more than **100 unique values**.

* The following attribute values are reserved and are ignored:

  * `not-set`
  * `{}`
  * `Unknown`
  * `unknown`
  * `***`
  * \`\` (empty)
  * `None`
  * `none`
  * `N/A`
  * `n/a`
  * `NULL`
  * `null`

* When using [nested attributes](/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes)
  there must be no more than **250 levels of nesting**.
  If an attribute contains more than 250 levels of nesting,
  scores won't be generated for that affinity.

## Events

For generating user profiles,
the [events you send](/doc/guides/personalization/advanced-personalization/configure/prerequisites/event-implementation)
must adhere to the following limits:

* Only [valid events](/doc/guides/sending-events/guides/validate) can be used to generate user profiles.
* You must include the [user token](/doc/guides/sending-events/concepts/usertoken) in each event.
  The user token must be the same as the one used in your search queries.
* There must be **at least one [returning user](/doc/guides/sending-events/concepts/usertoken#persistent-user-token)** in your events.
  A returning user is a user with **more than one session in the last 30 days**.
* When [configuring your events](/doc/guides/personalization/advanced-personalization/configure/setup/events), you must select **at least 1 [view details event](/doc/guides/personalization/advanced-personalization/configure/setup/events#a-user-viewed-a-records-details)** per index.
  For optimal performance, send **add to cart** and **purchase** events too.
* [You can't send **more than 10 million events per day**](https://www.algolia.com/policies/advanced-personalization). If you need to exceed this limit, contact the [Algolia support](https://support.algolia.com/hc/en-us/requests/new) team.
* [Real-time personalization](/doc/guides/personalization/advanced-personalization/configure/setup/enable-real-time-personalization) requires **at least 3 events** per user to generate affinities.
