Files
ajarbot/tests/test_agent_hybrid.py

37 lines
1.0 KiB
Python
Raw Permalink Normal View History

"""Test agent with hybrid search."""
from agent import Agent
print("Initializing agent with hybrid search...")
agent = Agent(provider="claude")
print("\n" + "="*60)
print("TESTING AGENT MEMORY RECALL WITH HYBRID SEARCH")
print("="*60)
# Test 1: Semantic query - ask about cost in different words
print("\n1. Testing semantic recall: 'How can I save money on API calls?'")
print("-" * 60)
response = agent.chat("How can I save money on API calls?", username="alice")
print(response)
# Test 2: Ask about birthday (semantic search should find personal info)
print("\n" + "="*60)
print("2. Testing semantic recall: 'What's my birthday?'")
print("-" * 60)
response = agent.chat("What's my birthday?", username="alice")
print(response)
# Test 3: Ask about specific technical detail
print("\n" + "="*60)
print("3. Testing keyword recall: 'What search technology are we using?'")
print("-" * 60)
response = agent.chat("What search technology are we using?", username="alice")
print(response)
print("\n" + "="*60)
print("Test complete!")
print("="*60)
agent.shutdown()