Abid Ali Awan commited on
Commit
ad9dfde
·
1 Parent(s): 2d898b9

Update RegRadarAgent to include 'Global' as a valid region in query processing and documentation. Enhance the description for clarity on region extraction.

Browse files
Files changed (1) hide show
  1. agents/reg_radar.py +2 -2
agents/reg_radar.py CHANGED
@@ -35,7 +35,7 @@ class RegRadarAgent:
35
  "description": (
36
  "Extract industry, region, and keywords from a user query.\n"
37
  "- 'industry': If not explicitly mentioned, infer the most relevant industry from the context (e.g., if the query is about SEC regulations, infer 'fintech' or 'finance').\n"
38
- "- 'region': The country or region explicitly mentioned (e.g., US, EU, UK, Asia).\n"
39
  "- 'keywords': Only the most important regulatory topics or terms (e.g., 'data privacy', 'GDPR', 'ESG compliance', 'SEC regulations'), not generic words or verbs.\n"
40
  "Examples:\n"
41
  "- 'Show me the latest SEC regulations for fintech' => industry: 'fintech', region: 'US', keywords: 'SEC regulations'\n"
@@ -85,7 +85,7 @@ class RegRadarAgent:
85
  break
86
  # Extract region
87
  region_match = re.search(
88
- r"\b(EU|US|UK|Asia|Europe|America|Canada|Australia|India|China|Japan)\b",
89
  message,
90
  re.IGNORECASE,
91
  )
 
35
  "description": (
36
  "Extract industry, region, and keywords from a user query.\n"
37
  "- 'industry': If not explicitly mentioned, infer the most relevant industry from the context (e.g., if the query is about SEC regulations, infer 'fintech' or 'finance').\n"
38
+ "- 'region': The country or region explicitly mentioned (e.g., US, EU, UK, Asia, Global).\n"
39
  "- 'keywords': Only the most important regulatory topics or terms (e.g., 'data privacy', 'GDPR', 'ESG compliance', 'SEC regulations'), not generic words or verbs.\n"
40
  "Examples:\n"
41
  "- 'Show me the latest SEC regulations for fintech' => industry: 'fintech', region: 'US', keywords: 'SEC regulations'\n"
 
85
  break
86
  # Extract region
87
  region_match = re.search(
88
+ r"\b(EU|US|UK|Asia|Europe|America|Canada|Australia|India|China|Japan|Global)\b",
89
  message,
90
  re.IGNORECASE,
91
  )