Currently, the SQLiteLTMStore lacks implementation for content-based search functionality, which causes failures when trying to use search_by_content() method in the memory system. This causes the memory retrieval demo to fail or require error handling workarounds.
Current Behavior
When memory_system.search_by_content() is called with a SQLite backend, an AttributeError is thrown because the method is not implemented in the SQLiteLTMStore class.
Expected Behavior
The SQLiteLTMStore should implement content-based search capability to allow searching through stored memories based on text content, with proper embedding support.
Proposed Solution
Implement a search_by_content method in the SQLiteLTMStore class that:
- Accepts a search query and optional parameters (k, threshold)
- Leverages text embeddings to find semantically similar content
- Returns memories ranked by relevance
Implementation Details
Suggested approach:
- Add a new column for embeddings in the SQLite schema
- When storing memories, calculate and store embeddings for the content
- Implement vector similarity search (cosine similarity) within SQLite
- Consider using SQLite extensions like sqlite-vss or implement a basic vector similarity calculation
- Return results sorted by similarity score
Related Components
memory/stores/sqlite_ltm_store.py - Needs to be modified
memory/memory_system.py - May need updates for consistent interface
Acceptance Criteria
search_by_content() works with SQLite backend without errors
- Relevant test cases are added
- The memory retrieval demo runs successfully with content-based search
- Performance is acceptable for reasonably sized memory stores
Additional Notes
This would complete the full feature parity between different storage backends and make the memory system more robust.
Currently, the
SQLiteLTMStorelacks implementation for content-based search functionality, which causes failures when trying to usesearch_by_content()method in the memory system. This causes the memory retrieval demo to fail or require error handling workarounds.Current Behavior
When
memory_system.search_by_content()is called with a SQLite backend, anAttributeErroris thrown because the method is not implemented in theSQLiteLTMStoreclass.Expected Behavior
The
SQLiteLTMStoreshould implement content-based search capability to allow searching through stored memories based on text content, with proper embedding support.Proposed Solution
Implement a
search_by_contentmethod in theSQLiteLTMStoreclass that:Implementation Details
Suggested approach:
Related Components
memory/stores/sqlite_ltm_store.py- Needs to be modifiedmemory/memory_system.py- May need updates for consistent interfaceAcceptance Criteria
search_by_content()works with SQLite backend without errorsAdditional Notes
This would complete the full feature parity between different storage backends and make the memory system more robust.