Spaces:
Sleeping
Sleeping
| """ | |
| 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() | |