Memory Retrieve Node Documentation
The Memory Retrieve Node allows users to search and retrieve stored memories from collections using semantic search capabilities. This node is essential for accessing previously stored contextual information and implementing memory-based features in workflows.
Features
Key Functionalities
-
Memories Search: Search memories using natural language queries.
-
Filtering: Apply filters to refine search results and restrict them to particular uniqueId and sessionId.
-
Configurable Results: Control the number of memories returned.
Benefits
-
Contextual Retrieval: Access relevant memories based on similarity.
-
Precision: Fine-tune results using filters.
-
Flexibility: Support for both raw and processed memory formats, allowing the retrieved memory to be passed directly to any AI Node.
What can I build?
-
AI Nodes that can reference past memories for context-aware responses.
-
Knowledge bases with natual language querying capabilities.
-
Personalized recommendation systems based on user's memories.
Setup
Configure the Memory Retrieve Node
- Select the Memory Retrieve Node in your workflow.
- Define your search query.
- Choose the memory collection to search.
- Configure the embedding model.
- Set optional filters and result limits.
- Deploy the project.
Configuration Reference
Parameter | Description | Example Value |
---|---|---|
Search Query | The natural language query to search memories | What are the user's preferences? |
Memory Store | The collection to search for memories | MemoryStore |
Embedding Model Name | Model used for converting search query to vectors | text-embedding-ada-002 |
Limit | Maximum number of memories to return | 3 |
Filters | JSON-based filters to refine search results | 'Set them up using UI condition builder' |
Filter Memory Retrieval
To Apply the Filter in Memory Retrieve Node, Click on the Filters
- Here you can apply condition on
- Session Id
- Meta Data
- Timestamp
- Memory
- Unique Id
Outputs
The node provides two output formats:
- Memories: Processed memory objects ready for use in any AI Node
- Raw Memories: Unprocessed memory data including metadata and embeddings
Low-Code Example
- nodeId: memoryRetrieveNode_951
nodeType: memoryRetrieveNode
nodeName: Memory Retrieve
values:
limit: '3'
filters: |-
{
"operator": "And",
"operands": [
{
"path": [
"uniqueId"
],
"operator": "Equal",
"valueText": "{{triggerNode_1.output.userId}}"
}
]
}
searchQuery: User likes what
memoryCollection: NewMemory
embeddingModelName:
type: embedder/text
model_name: default
credentialId: some id
provider_name: openai
credential_name: NEW PROVIDER
needs:
- memoryNode_858
Using Retrieved Memory in AI Nodes
In the respective AI Node, add memories under Memories inside Additional Properties by clicking the Plus icon.
Common Issues and Debugging
-
Memory Not Being Retrieved
- Verify you're using the same Unique Id used during storage
- Check if the Session Id matches (if using session-specific storage)
- Ensure the Memory Collection name is consistent between add and retrieve nodes
- Validate that the embedding model dimensions match between storage and retrieval
-
Incorrect Results
- Verify the search query is properly formatted
- Check if filters are correctly configured
- Ensure the limit parameter is set appropriately
- Test with simpler queries first to isolate issues
Troubleshooting Steps
-
Check Node Configuration
- Verify all required fields are filled
- Ensure model names are spelled correctly
- Validate JSON format in metadata field
-
Monitor Workflow Logs
- Look for error messages in the execution logs
- Check for timeout or rate limit errors
- Verify successful model API calls
-
Test Memory Operations
- Use the workflow testing feature to verify storage
- Confirm immediate retrieval after storage
- Test with simple data before complex implementations