Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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.
|
| 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:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
- Review user's description: {text}
|
| 58 |
- Identify scam patterns in the user's experience
|
| 59 |
-
- Compare
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
-
|
| 64 |
-
-
|
| 65 |
-
- Assess risk level
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
-
|
| 70 |
-
-
|
| 71 |
-
-
|
| 72 |
-
|
| 73 |
-
|
|
|
|
|
|
|
|
|
|
| 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:")
|