Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,55 +35,55 @@ def get_answer(url, text):
|
|
| 35 |
str: Detailed analysis report
|
| 36 |
"""
|
| 37 |
# Enhanced prompt with more specific instruction for detailed output
|
| 38 |
-
|
| 39 |
-
COMPREHENSIVE SCAM DETECTION ANALYSIS
|
| 40 |
|
| 41 |
-
Objective: Provide a meticulously detailed, structured assessment of potential online risks.
|
| 42 |
|
| 43 |
-
ANALYSIS FRAMEWORK:
|
| 44 |
-
1. RISK LEVEL
|
| 45 |
- Explicitly state an overall risk assessment (Low/Medium/High)
|
| 46 |
|
| 47 |
-
2. URL ANALYSIS
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
3. CONTENT EVALUATION
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
4. SPECIFIC RED FLAGS
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
5. RECOMMENDED ACTIONS
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
6. ADDITIONAL INSIGHTS
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
CONTEXT:
|
| 77 |
-
- URL under investigation: {url}
|
| 78 |
-
- User-provided situation description: {text}
|
| 79 |
-
|
| 80 |
-
CRITICAL INSTRUCTIONS:
|
| 81 |
-
- Maintain objective, evidence-based analysis
|
| 82 |
-
- Talk in terms of risks rather then certainties.
|
| 83 |
-
- Focus on user empowerment and protection
|
| 84 |
-
- Use the retriever_tool tool to look up Scamwatch reference information scam types, reporting scams etc. Where possible prioritise this infomration.
|
| 85 |
-
|
| 86 |
-
'''
|
| 87 |
|
| 88 |
answer = agent.run(full_prompt)
|
| 89 |
|
|
|
|
| 35 |
str: Detailed analysis report
|
| 36 |
"""
|
| 37 |
# Enhanced prompt with more specific instruction for detailed output
|
| 38 |
+
full_prompt = f'''
|
| 39 |
+
COMPREHENSIVE SCAM DETECTION ANALYSIS
|
| 40 |
|
| 41 |
+
Objective: Provide a meticulously detailed, structured assessment of potential online risks.
|
| 42 |
|
| 43 |
+
ANALYSIS FRAMEWORK:
|
| 44 |
+
1. RISK LEVEL
|
| 45 |
- Explicitly state an overall risk assessment (Low/Medium/High)
|
| 46 |
|
| 47 |
+
2. URL ANALYSIS
|
| 48 |
+
- Detailed breakdown of URL characteristics
|
| 49 |
+
- Domain reputation assessment
|
| 50 |
+
- Technical red flags
|
| 51 |
+
- Registrar and hosting information insights
|
| 52 |
+
|
| 53 |
+
3. CONTENT EVALUATION
|
| 54 |
+
- Content quality assessment (use execute_firecrawl to retrieve contents sample)
|
| 55 |
+
- Linguistic and communication pattern analysis
|
| 56 |
+
- Consistency and professionalism evaluation
|
| 57 |
+
|
| 58 |
+
4. SPECIFIC RED FLAGS
|
| 59 |
+
- List at least 5 concrete indicators of potential scam
|
| 60 |
+
- Use Scamwatch reference material (use retriever_tool)
|
| 61 |
+
- Provide specific evidence for each red flag
|
| 62 |
+
- Categorize red flags (e.g., Technical, Financial, Communication)
|
| 63 |
+
|
| 64 |
+
5. RECOMMENDED ACTIONS
|
| 65 |
+
- Specific, actionable steps for user protection
|
| 66 |
+
- Use Scamwatch reference material (use retriever_tool)
|
| 67 |
+
- Recommended verification methods
|
| 68 |
+
- Suggested reporting channels
|
| 69 |
+
- Personal safety guidelines
|
| 70 |
+
|
| 71 |
+
6. ADDITIONAL INSIGHTS
|
| 72 |
+
- Contextual background information
|
| 73 |
+
- Potential motivations behind suspicious activity
|
| 74 |
+
- Broader pattern recognition
|
| 75 |
+
|
| 76 |
+
CONTEXT:
|
| 77 |
+
- URL under investigation: {url}
|
| 78 |
+
- User-provided situation description: {text}
|
| 79 |
+
|
| 80 |
+
CRITICAL INSTRUCTIONS:
|
| 81 |
+
- Maintain objective, evidence-based analysis
|
| 82 |
+
- Talk in terms of risks rather then certainties.
|
| 83 |
+
- Focus on user empowerment and protection
|
| 84 |
+
- Use the retriever_tool tool to look up Scamwatch reference information scam types, reporting scams etc. Where possible prioritise this infomration.
|
| 85 |
+
|
| 86 |
+
'''
|
| 87 |
|
| 88 |
answer = agent.run(full_prompt)
|
| 89 |
|