Spaces:
Sleeping
Sleeping
File size: 966 Bytes
6accb61 b36ff59 6accb61 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
"""
Test a single problematic question to debug the routing logic.
"""
import os
import sys
# Add parent directory to path for imports
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from agent import answer_gaia_question
from tools.database_tools import get_retriever
def test_single_question():
"""Test one question that was causing infinite loops."""
question = "How many papers published by Science in 2020 would be incorrect if they used p-value of 0.03?"
print(f"π§ͺ Testing Single Question")
print(f"π Question: {question}")
print("=" * 80)
try:
# Test with debug enabled to see the flow
answer = answer_gaia_question(question, debug=True)
print(f"\nπ― Final Answer: {answer}")
except Exception as e:
print(f"β Error: {e}")
import traceback
traceback.print_exc()
if __name__ == "__main__":
test_single_question()
|