38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
|
|
#!/usr/bin/env python3
|
||
|
|
"""Verify important memories were kept after consolidation"""
|
||
|
|
|
||
|
|
from qdrant_client import QdrantClient
|
||
|
|
|
||
|
|
client = QdrantClient(host='localhost', port=6333, timeout=10, prefer_grpc=False)
|
||
|
|
results, _ = client.scroll('episodic', limit=200, with_payload=True, with_vectors=False)
|
||
|
|
|
||
|
|
# Check for Alice's important memories
|
||
|
|
keywords = ['Alice', 'guitar', 'MIT', 'married', 'depression', 'dog died']
|
||
|
|
kept_important = []
|
||
|
|
|
||
|
|
for r in results:
|
||
|
|
content = r.payload.get('page_content', '')
|
||
|
|
for keyword in keywords:
|
||
|
|
if keyword.lower() in content.lower():
|
||
|
|
kept_important.append(content)
|
||
|
|
break
|
||
|
|
|
||
|
|
print(f"✅ Found {len(kept_important)} important memories kept:")
|
||
|
|
for mem in kept_important:
|
||
|
|
print(f" - {mem}")
|
||
|
|
|
||
|
|
# Check for trivial memories that should be deleted
|
||
|
|
trivial = ['lol', 'k', 'okay']
|
||
|
|
remaining_trivial = []
|
||
|
|
|
||
|
|
for r in results:
|
||
|
|
content = r.payload.get('page_content', '').strip().lower()
|
||
|
|
if content in trivial:
|
||
|
|
remaining_trivial.append(content)
|
||
|
|
|
||
|
|
print(f"\n🗑️ Trivial memories remaining: {len(remaining_trivial)}")
|
||
|
|
if len(remaining_trivial) > 0:
|
||
|
|
print(f" (Should be 0!) {remaining_trivial}")
|
||
|
|
else:
|
||
|
|
print(f" ✅ All trivial memories deleted successfully!")
|