How to set custom categories?
You can now create custom categories tailored to your specific needs, instead of using the default categories such as travel, sports, music, and more (see default categories below). When custom categories are provided, they will override the default categories. There are two ways to set custom categories:1. Project Level
You can set custom categories at the project level, which will be applied to all memories added within that project. Mem0 will automatically assign relevant categories from your custom set to new memories based on their content. Setting custom categories at the project level will override the default categories. Here’s how to set custom categories:add
API call:
2. During the add
API call
You can also set custom categories during the add
API call. This will override any project-level custom categories for that specific memory addition. For example, if you want to use different categories for food-related memories, you can provide custom categories like “food” and “user_preferences” in the add
call. These custom categories will be used instead of the project-level categories when categorizing those specific memories.
Providing more detailed and specific category descriptions will lead to more accurate and relevant memory categorization.
Default Categories
Here is the list of default categories. If you don’t specify any custom categories using the above methods, these will be used as default categories.project.get()
. If custom_categories
returns None
, it means the default categories are being used.