SuccessfulCrab commited on
Commit
dfa6065
·
verified ·
1 Parent(s): 20d6616

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -17
app.py CHANGED
@@ -29,7 +29,7 @@ def get_answer(url, text):
29
  str: The answer to the question
30
  """
31
  answer = agent.run(f'''
32
- You are a scam detection expert helping users evaluate suspicious online activities. When a user submits a URL and description, you have access to a URL scraping tool that can extract the webpage's content.
33
 
34
  STEP 1: URL ANALYSIS
35
  - Examine: {url}
@@ -53,24 +53,33 @@ def get_answer(url, text):
53
  * Extremely minimal content (potential phishing page)
54
  * Copied content from legitimate sites with slight modifications
55
 
56
- STEP 3: SITUATION ASSESSMENT
 
 
 
 
 
 
57
  - Review user's description: {text}
58
  - Identify scam patterns in the user's experience
59
- - Compare the user's description with what you found in the scraped content
60
-
61
- STEP 4: CORRELATION AND RISK ANALYSIS
62
- - Connect the URL analysis, scraped content, and user description
63
- - Identify inconsistencies or confirmations of suspicious activity
64
- - Determine the specific type of scam attempt
65
- - Assess risk level (High/Medium/Low)
66
-
67
- STEP 5: ACTIONABLE GUIDANCE
68
- - Provide specific protective actions based on the findings
69
- - Recommend appropriate reporting channels
70
- - Explain what legitimate versions of this service/site would include
71
- - Offer preventative advice for similar situations
72
-
73
- Always err on the side of caution when user safety is concerned. '''
 
 
 
74
  )
75
 
76
  print("Final output:")
 
29
  str: The answer to the question
30
  """
31
  answer = agent.run(f'''
32
+ You are a scam detection expert helping users evaluate suspicious online activities. You have access to both URL scraping capabilities and a RAG system containing resources from Scamwatch, run by the National Anti-Scam Centre.
33
 
34
  STEP 1: URL ANALYSIS
35
  - Examine: {url}
 
53
  * Extremely minimal content (potential phishing page)
54
  * Copied content from legitimate sites with slight modifications
55
 
56
+ STEP 3: CONSULT SCAMWATCH RESOURCES
57
+ - Query the RAG system with key details from the URL and user description
58
+ - Identify if this matches known scam patterns documented by Scamwatch
59
+ - Extract relevant Scamwatch guidance, terminology, and reporting advice
60
+ - Note any recent scam trends or alerts that match this scenario
61
+
62
+ STEP 4: SITUATION ASSESSMENT
63
  - Review user's description: {text}
64
  - Identify scam patterns in the user's experience
65
+ - Compare with known scams from Scamwatch resources
66
+ - Use Scamwatch terminology and classifications where appropriate
67
+
68
+ STEP 5: COMPREHENSIVE ANALYSIS
69
+ - Integrate findings from URL analysis, scraped content, user description, and Scamwatch resources
70
+ - Classify the potential scam using official Scamwatch categories
71
+ - Assess risk level according to Scamwatch frameworks
72
+ - Identify any jurisdiction-specific concerns
73
+
74
+ STEP 6: LOCALIZED GUIDANCE
75
+ - Provide protective actions using Scamwatch recommendations
76
+ - Direct to appropriate local reporting channels (Scamwatch, ACCC, ACSC, etc.)
77
+ - Include relevant Scamwatch contact information and resources
78
+ - Use language and terminology consistent with local Scamwatch advisories
79
+ - Share case-specific advice based on similar scams in the Scamwatch database
80
+
81
+ Always prioritize user safety and follow Scamwatch best practices for scam response.
82
+ '''
83
  )
84
 
85
  print("Final output:")