Skip to content

updates to the category docs#3437

Merged
prateekchhikara merged 2 commits intomainfrom
user/prateek/category-docs-fix
Sep 9, 2025
Merged

updates to the category docs#3437
prateekchhikara merged 2 commits intomainfrom
user/prateek/category-docs-fix

Conversation

@prateekchhikara
Copy link
Copy Markdown
Contributor

📚 Update documentation for categories filter usage

Summary

Updated documentation across multiple files to clarify the proper usage of the categories field in memory search and retrieval filters. The documentation now provides clear examples showing the correct syntax for both partial and exact matching.

Changes Made

1. OpenAPI Specification (docs/openapi.json)

  • Enhanced filter descriptions to include specific guidance for categories usage
  • Added examples showing contains for partial matching and in for exact matching
  • Updated both search and retrieval endpoint descriptions

2. V2 Search Memories API Reference (docs/api-reference/memory/v2-search-memories.mdx)

  • Added new code example section dedicated to categories filtering
  • Included Python examples demonstrating both filter patterns:
    • {"categories": {"contains": "finance"}} for partial matching
    • {"categories": {"in": ["personal_information"]}} for exact matching

3. Advanced Memory Operations Guide (docs/platform/advanced-memory-operations.mdx)

  • Updated general filter descriptions to highlight categories-specific usage
  • Replaced existing Example 3 with comprehensive categories filtering examples
  • Added consistent examples across all supported languages (Python, JavaScript, cURL)
  • Updated both search and retrieval sections with the same guidance

Key Improvements

Clear Usage Patterns: Documentation now explicitly shows two main approaches:

  • contains operator for partial string matching within categories
  • in operator for exact category matching from a list

Consistent Examples: All code examples use consistent user_id (alice) and realistic category values

Multi-Language Support: Examples provided in Python, JavaScript, and cURL formats

Comprehensive Coverage: Updated descriptions in both search and retrieval operations

Before/After

Before: Generic mention that categories field supports various operators
After: Specific guidance with concrete examples:

# Partial matching
{"categories": {"contains": "finance"}}

# Exact matching  
{"categories": {"in": ["personal_information"]}}

Impact

  • Reduces developer confusion about categories filter syntax
  • Provides copy-pasteable examples for common use cases
  • Ensures consistency across all API documentation
  • Improves developer experience when implementing memory filtering

Files Modified

  • docs/openapi.json
  • docs/api-reference/memory/v2-search-memories.mdx
  • docs/platform/advanced-memory-operations.mdx

@prateekchhikara prateekchhikara merged commit e64488b into main Sep 9, 2025
3 of 5 checks passed
@prateekchhikara prateekchhikara deleted the user/prateek/category-docs-fix branch September 9, 2025 18:47
jamebobob pushed a commit to jamebobob/mem0-vigil-recall that referenced this pull request Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant