kgauvin603 commited on
Commit
d17fc09
·
verified ·
1 Parent(s): 1a5c14e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -13
app.py CHANGED
@@ -85,28 +85,29 @@ class HealthAgent:
85
  cleaned_content = cleaned_content[:128000] + "\n\n[TRUNCATED]..."
86
 
87
  prompt = f"""
88
- You are a health diagnostic agent for Oracle AWR reports.
89
 
90
- Please detect CRITICAL and SEVERE problems. Examples include:
91
- - Flash device failures or zero hit rates
92
- - ORA-12170 or interconnect stalls
93
- - Very high gc buffer busy waits
94
- - IO stalls / disk saturation
95
- - Redo log sync slowdowns
96
 
97
- Categorize issues as:
98
- - 🚨 Critical
99
- - ⚠️ Warning
100
- - Healthy
 
 
 
 
 
 
101
 
102
  AWR CONTENT:
103
  {cleaned_content}
104
  """
105
 
106
  response = client.chat.completions.create(
107
- model="gpt-4-turbo",
108
  messages=[
109
- {"role": "system", "content": "You are an Oracle AWR health check agent."},
110
  {"role": "user", "content": prompt}
111
  ]
112
  )
 
85
  cleaned_content = cleaned_content[:128000] + "\n\n[TRUNCATED]..."
86
 
87
  prompt = f"""
88
+ You are the Oracle AWR Health Analysis Agent.
89
 
90
+ Your primary responsibility is to detect and report any possible database health risks or failures from the AWR report.
 
 
 
 
 
91
 
92
+ You MUST:
93
+ - Identify all mentions of warnings, failures, critical issues, and alerts.
94
+ - Do not omit any mention of failure or warnings, even minor ones.
95
+ - Clearly classify them as CRITICAL, WARNING, or INFO.
96
+ - Provide suggested actions for CRITICAL and WARNING level issues.
97
+ - Always confirm at the end if no CRITICAL or WARNING issues were found.
98
+
99
+ You are NOT allowed to generalize or omit any issue, no matter how small.
100
+
101
+ If Flash Cache, I/O, Smart Scan, ASM, Redo log, or RAC interconnect issues are mentioned, they MUST be called out explicitly.
102
 
103
  AWR CONTENT:
104
  {cleaned_content}
105
  """
106
 
107
  response = client.chat.completions.create(
108
+ model="gpt-4-turbo", # or "gpt-4o" if preferred/available
109
  messages=[
110
+ {"role": "system", "content": "You are the strict Oracle AWR Health Analysis Agent."},
111
  {"role": "user", "content": prompt}
112
  ]
113
  )