-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_questions.py
More file actions
31 lines (24 loc) · 1.1 KB
/
debug_questions.py
File metadata and controls
31 lines (24 loc) · 1.1 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
import sys
sys.path.insert(0, 'projects/telco-troubleshooting/src')
import json
with open('data/Phase_1/track_b/test.json', 'r', encoding='utf-8') as f:
data = json.load(f)
# Check Q1 and Q34 (path queries)
for q in data:
qid = int(q['task']['id'])
if qid in [1, 34]:
question = q['task']['question']
print(f'Q{qid}: {question[:120]}...')
# Check what the agent detects
from telco_agent.track_b_agent import TrackBAgent
agent = TrackBAgent.__new__(TrackBAgent)
# Check detection patterns
q_lower = question.lower()
path_phrases = ['what device', 'what interface', 'next hop', 'path', 'trace']
link_phrases = ['link', 'connection', 'restore', 'neighbors']
fault_phrases = ['fault', 'why can', 'cannot', "can't", 'unreachable']
is_path = any(p in q_lower for p in path_phrases)
is_link = any(p in q_lower for p in link_phrases)
is_fault = any(p in q_lower for p in fault_phrases)
print(f' Path: {is_path}, Link: {is_link}, Fault: {is_fault}')
print()