-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_strategy_selection.sh
More file actions
executable file
·85 lines (73 loc) · 2.49 KB
/
Copy pathtest_strategy_selection.sh
File metadata and controls
executable file
·85 lines (73 loc) · 2.49 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2025 Research_as_a_Code Project
# SPDX-License-Identifier: Apache-2.0
# Test script to verify UDR vs TTD-DR strategy selection
BACKEND_URL="http://af3615e06391145bc88022ac024a36ca-bd296660cda3522f.elb.us-west-2.amazonaws.com"
echo "=================================================="
echo "Testing Strategy Selection: UDR vs TTD-DR"
echo "=================================================="
echo ""
# Test 1: UDR Strategy
echo "Test 1: Running with UDR strategy..."
echo "---------------------------------------"
curl -X POST "${BACKEND_URL}/research" \
-H "Content-Type: application/json" \
-d '{
"topic": "What are the benefits of containerization?",
"report_organization": "Brief summary",
"collection": "",
"search_web": true,
"strategy": "udr"
}' 2>&1 | jq -r '.logs[]' | tee /tmp/udr-test.log
echo ""
echo "UDR Test Logs:"
cat /tmp/udr-test.log
echo ""
echo "---------------------------------------"
echo ""
# Small delay
sleep 3
# Test 2: TTD-DR Strategy
echo "Test 2: Running with TTD-DR strategy..."
echo "---------------------------------------"
curl -X POST "${BACKEND_URL}/research" \
-H "Content-Type: application/json" \
-d '{
"topic": "What are the benefits of containerization?",
"report_organization": "Brief summary",
"collection": "",
"search_web": true,
"strategy": "ttd_dr"
}' 2>&1 | jq -r '.logs[]' | tee /tmp/ttd-dr-test.log
echo ""
echo "TTD-DR Test Logs:"
cat /tmp/ttd-dr-test.log
echo ""
echo "---------------------------------------"
echo ""
# Compare
echo "=================================================="
echo "COMPARISON:"
echo "=================================================="
echo ""
echo "UDR logs contain:"
grep -i "udr" /tmp/udr-test.log && echo " ✅ UDR-specific messages found" || echo " ❌ No UDR messages"
echo ""
echo "TTD-DR logs contain:"
grep -i "ttd" /tmp/ttd-dr-test.log && echo " ✅ TTD-DR-specific messages found" || echo " ❌ No TTD-DR messages"
echo ""
echo "=================================================="
echo ""
echo "KEY DIFFERENCES TO LOOK FOR:"
echo ""
echo "UDR (Strategy-as-Code):"
echo " - Log: '✅ UDR strategy execution complete'"
echo " - Execution path shows: 'UDR'"
echo " - Should see compiled strategy code"
echo ""
echo "TTD-DR (Iterative Refinement):"
echo " - Log: '✅ TTD-DR research completed'"
echo " - Execution path shows: 'TTD-DR'"
echo " - Should see iteration progress"
echo ""
echo "=================================================="