-
Notifications
You must be signed in to change notification settings - Fork 0
Dev #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… names to strings for accurate comparison. This change ensures compatibility with byte representations in the Redis response, improving the reliability of index checks.
…milarity score analysis This commit introduces a new debug script for testing the SimilaritySearchStrategy, allowing for interactive testing with predefined queries. Additionally, it refactors the analyze_similarity_scores function to simplify the initialization of the similarity search strategy by passing the memory system directly, improving code clarity and maintainability.
This commit adds '*.ipynb' to the .gitignore file to exclude Jupyter notebook files from version control. Additionally, it improves the filtering logic in the VectorStore class to support matching metadata in nested structures, enhancing the accuracy of metadata filtering during vector storage operations. The serialization module is also updated to create Redis connection parameters directly, streamlining the initialization of the vector store.
This commit enhances the test cases in `test_serialization.py` by adding embeddings to the test data for memory systems. The new embeddings include full vectors for two memory entries, improving the coverage of serialization tests and ensuring that the embeddings are correctly handled during the serialization process.
Similarity search validation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request refines several memory search and storage functionalities, particularly enhancing Redis index handling, metadata filtering logic, embedding generation workflows, and similarity search debugging.
- Updated test thresholds and expected memory IDs in the similarity test suite.
- Introduced a new debug script and refactored the similarity search strategy instantiation.
- Improved Redis connection handling and embedding generation logic in the serialization workflow, with enhanced handling of nested metadata in the vector store.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| validation/search/similarity/similarity_test_suite.py | Adjusted test thresholds and expected memory IDs for improved flexibility. |
| validation/search/similarity/debug_similarity_search.py | Added a new interactive debug script for similarity search strategy testing. |
| validation/search/similarity/debug_similarity_scores.py | Refactored SimilaritySearchStrategy instantiation to use the memory_system directly. |
| tests/utils/test_serialization.py | Updated test data to include embeddings and verified store call counts. |
| memory/utils/serialization.py | Revised Redis connection setup and embedding generation logic with additional logging. |
| memory/embeddings/vector_store.py | Enhanced Redis index checks and extended metadata filtering to support nested fields. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request introduces several improvements and updates across multiple areas, including enhanced handling of Redis index checks, improved filtering logic for memory metadata, updates to embedding generation and storage workflows, and refinements to similarity search functionality. Additionally, test cases and debugging utilities have been updated to reflect these changes.
Enhancements to Redis and Metadata Handling
_ensure_index(memory/embeddings/vector_store.py).find_similar_memoriesto support nested metadata structures, enabling more flexible and accurate filtering (memory/embeddings/vector_store.py).Embedding Workflow Updates
load_memory_system_from_jsonto directly create Redis connection parameters instead of relying on aconnection_paramsattribute. Added logic to generate embeddings if missing, ensuring all memories have embeddings stored (memory/utils/serialization.py). [1] [2]Similarity Search Improvements
SimilaritySearchStrategyto use thememory_systemdirectly, simplifying the interface and removing redundant dependencies (validation/search/similarity/debug_similarity_scores.py). [1] [2]debug_similarity_search.py) for interactive testing of the similarity search strategy (validation/search/similarity/debug_similarity_search.py).Test Suite Updates
tests/utils/test_serialization.py). [1] [2] [3]validation/search/similarity/similarity_test_suite.py). [1] [2]