Skip to main content

What are Memories?

Memories are the facts, preferences, and knowledge that Recallr automatically extracts from your conversations. Think of them as the key takeaways from each session - the important information worth remembering for future interactions.

Memory Categories

Memory categories help you organize and filter memories based on their type or domain. Categories make it easier to retrieve relevant memories and maintain clean, structured knowledge about your users.

Managing Categories

Categories are configured through the Recallr Dashboard for each project. You can create custom categories that match your application’s needs.
1

Access the Dashboard

Navigate to your project settings in the Recallr Dashboard.
2

Create a Category

Add a new category with a descriptive name and optional description.
name
string
required
Use descriptive, lowercase names with underscores (e.g., food_preferences, medical_history).
description
string
Optional description explaining what this category contains.
3

Use Categories

Once created, Recallr will automatically assign memories to appropriate categories during extraction, and you can filter memories by category when retrieving them.
Create categories that align with your application’s domain. For a healthcare app, you might use categories like medical_history, medications, and allergies. For an e-commerce app, consider product_preferences, shopping_habits, and size_information.
Important category considerations:
  • Deleting a category does not delete memories - existing memories will remain in the system but will no longer be associated with that category
  • Categories are not retroactive - only new memories extracted after a category is created will be assigned to it. Existing memories will not be automatically recategorized

Customizing Memory Extraction

Recallr provides powerful customization options to tailor the memory extraction process to your specific needs. Configure these settings through the Dashboard to control how memories are generated from conversations.

Generation Preferences

Custom instructions to guide what aspects should be included in generated memories.
inclusion_instructions
array of strings
List of specific instructions to emphasize certain aspects during memory extraction.
Examples of well-formatted, high-quality memories to guide the extraction model.
positive_examples
array of strings
Short examples demonstrating the desired memory format and content.
Provide 3-5 positive examples that represent the ideal structure and detail level for your use case.
Instructions to prevent certain types of information from being stored as memories.
exclusion_instructions
array of strings
Specific guidelines for what to avoid capturing as memories.
Use exclusion instructions to avoid storing sensitive information, temporary data, or noise that doesn’t provide long-term value.
Examples of poor-quality memories that should be avoided.
negative_examples
array of strings
Short examples showing what NOT to extract as memories.
Memories that were incorrectly extracted when they shouldn’t have been (actual negative, predicted positive).
false_positive_examples
array of strings
Examples where the system incorrectly created a memory. Use these to fine-tune extraction precision.
Important information that was missed during extraction (actual positive, predicted negative).
false_negative_examples
array of strings
Examples where the system failed to create a memory that should have been created. Use these to improve extraction recall.
Control how Recallr checks for redundant memories during generation.
top_k_symantic_similarity_check
integer
required
Number of existing memories to check for similarity before creating a new memory. Range: 10-50.Higher values provide more thorough redundancy checking but increase processing time.
Recallr uses LLM-based similarity checking to avoid creating duplicate or highly similar memories. This parameter controls how many existing memories are evaluated for each new memory candidate.
Configure whether the system should raise merge conflicts for ambiguous situations.
raise_merge_conflict
boolean
required
When true, Recallr will create merge conflicts when it detects potentially contradictory or ambiguous information. When false, it will automatically resolve conflicts using its best judgment.
Enable merge conflicts for critical applications where you need human review of ambiguous updates. Disable for faster processing when automated resolution is acceptable.

Customizing Memory Recall

The recall system determines which memories are retrieved when you call getContext(). Customize recall behavior through the Dashboard to optimize for your specific use case.

Recall Strategies

Recallr offers three recall strategies with different performance characteristics:

Low Latency

Fastest retrieval with basic semantic search. Best for real-time applications where speed is critical.

Balanced

Combines multiple retrieval techniques for better accuracy with reasonable performance. Recommended for most use cases.

Agentic

Most comprehensive search using subqueries, keywords, and semantic similarity. Best when accuracy is paramount.

Recall Preferences

Configure these settings for Balanced and Agentic recall strategies:
Guide the subquery and keyword generation process with specific instructions.
custom_instructions
array of strings
Instructions to help generate better search queries and keywords from user messages.
Control how subquery-based recall contributes to memory retrieval.
subqueries_candidate_memories_weight
float
required
Weight for memories retrieved via subquery matching. Range: 0.0-1.0.Higher values give more importance to memories found through generated subqueries.
example_subqueries
array of strings
Example subqueries to guide the generation process.
Control how keyword-based recall contributes to memory retrieval.
keywords_candidate_memories_weight
float
required
Weight for memories retrieved via keyword matching. Range: 0.0-1.0.Higher values give more importance to memories found through keyword extraction.
example_keywords
array of strings
Example keywords to guide the extraction process.
Guide how the system generates questions for searching session summaries.
example_summary_search_questions
array of strings
Example questions that help retrieve relevant session summaries.
Fine-tune recall weights based on your testing. Start with equal weights (0.5 for both subqueries and keywords) and adjust based on which retrieval method performs better for your use case.

Memory Versioning

Recallr maintains a complete version history for each memory, allowing you to track how information evolves over time and understand why changes occurred.

How Versioning Works

When information about a user is updated, Recallr doesn’t simply overwrite the old memory. Instead, it creates a new version and preserves the previous one with metadata explaining why it changed.
1

Initial Memory Created

First version is created during session processing.
Version 1: "User prefers contact by email"
Created: 2024-01-15 10:00:00
Status: Current
2

New Information Emerges

During a later session, contradictory or updated information appears.
User: "Actually, I prefer text messages now instead of email"
3

New Version Created

Recallr creates version 2 and expires version 1.
Version 1: "User prefers contact by email"
Created: 2024-01-15 10:00:00
Expired: 2024-02-20 14:30:00
Expiration Reason: "updated"

Version 2: "User prefers contact by text message"  
Created: 2024-02-20 14:30:00
Status: Current

Version Creation Reasons

Each memory version includes an expiration_reason field that explains why a new version was created:
expiration_reason
string
Indicates why this version was superseded by a new one.

Accessing Version History

from recallrai import RecallrAI

client = RecallrAI(api_key="rai_yourapikey", project_id="your-project-id")
user = client.get_user("user123")

# Retrieve memories with full version history
memories = user.list_memories(
    include_previous_versions=True,
    limit=20
)

for memory in memories.items:
    print(f"Current Memory: {memory.content}")
    print(f"Version {memory.version_number} of {memory.total_versions}")
    
    # Access version history
    if memory.previous_versions:
        print("\nVersion History:")
        for version in memory.previous_versions:
            print(f"  Version {version.version_number}:")
            print(f"    Content: {version.content}")
            print(f"    Created: {version.created_at}")
            print(f"    Expired: {version.expired_at}")
            print(f"    Reason: {version.expiration_reason}")
Version history is included by default when listing memories. Set include_previous_versions=False (Python) or includePreviousVersions: false (Node.js) to retrieve only current versions for improved performance.

Benefits of Versioning

Audit Trail

Track how user information changes over time with complete history and reasons for each change.

Conflict Resolution

Understand the context of merge conflicts by reviewing what information existed before the contradiction emerged.

Rollback Capability

Access previous versions if new information turns out to be incorrect or if you need to analyze past states.

Debugging

Investigate issues in memory extraction by examining the full evolution of a memory and why versions changed.
Memory versions are immutable once created. While you can see the full history, individual versions cannot be modified or deleted - only new versions can be created.