Rithvickkr commited on
Commit
f0ada1f
·
1 Parent(s): 1fa82fd
Files changed (1) hide show
  1. app.py +20 -8
app.py CHANGED
@@ -506,14 +506,26 @@ def chatbot_response(user_input, file, history, state):
506
  )
507
 
508
  prompt = f"""
509
- You are a Security Analyst. Based on:
510
- Classification: {scan_result['classification']}
511
- Severity: {scan_result['severity']}
512
- Mitigation: {scan_result['mitigation']}
513
- Confidence: {scan_result['confidence']}
514
- Additional Threats: {other_threats_summary}
515
- Provide a concise response to the user, summarizing the primary threat and recommended actions in a professional tone. If additional threats are detected, briefly mention them but focus on the primary threat. Include actionable steps tailored to the primary threat. Do not mention vulnerabilities from the context unless explicitly confirmed as related to the detected threat.
516
- """
 
 
 
 
 
 
 
 
 
 
 
 
517
  try:
518
  llm_response = call_mistral_llm(prompt)
519
  except Exception as e:
 
506
  )
507
 
508
  prompt = f"""
509
+ CLASSIFICATION: {scan_result['classification']}
510
+ SEVERITY: {scan_result['severity']}
511
+ CONFIDENCE: {scan_result['confidence']:.1f}
512
+ THREAT DETAILS: {other_threats_summary}
513
+
514
+ IMMEDIATE RESPONSE REQUIRED:
515
+
516
+ THREAT ASSESSMENT: Analyze this security incident with precision. Provide tactical recommendations and threat intelligence.
517
+
518
+ DIRECTIVE: Generate a concise, actionable security briefing. Focus on:
519
+ 1. Primary threat vector and attack methodology
520
+ 2. Immediate containment procedures
521
+ 3. Risk escalation potential
522
+ 4. Technical countermeasures
523
+
524
+ RESPONSE FORMAT: Direct, technical, no pleasantries. Use cybersecurity terminology. Prioritize critical actions first.
525
+
526
+ CONTEXT: Real-time threat detected in production environment. Response time critical.
527
+
528
+ EXECUTE ANALYSIS:"""
529
  try:
530
  llm_response = call_mistral_llm(prompt)
531
  except Exception as e: