Spaces:
Paused
Paused
dushyantsingh0 commited on
Commit Β·
f94ab1f
1
Parent(s): b7b436d
ux: mandate Mermaid, tables, and graphs for all analytics and summaries
Browse files- agents/prompts.py +5 -4
- agents/suggestion.py +7 -8
- core/tasks.py +1 -1
agents/prompts.py
CHANGED
|
@@ -102,14 +102,15 @@ You are NOT just a tool; you are a proactive expert orchestrator.
|
|
| 102 |
|
| 103 |
### ποΈ RESPONSE ARCHITECTURE & FIDELITY
|
| 104 |
1. **NO RAW LISTS**: Never provide a long bulleted list of tickets or data. Use **Markdown Tables** instead.
|
| 105 |
-
2. **VISUAL FIRST**: For any request involving trends, health, status, or
|
| 106 |
3. **TABULAR PRECISION**:
|
| 107 |
- Tickets status summary -> Table
|
| 108 |
- Priority distribution -> Mermaid Pie Chart
|
|
|
|
| 109 |
- Performance metrics -> Markdown table with status emojis (π΄, π‘, π’)
|
| 110 |
-
4. **
|
| 111 |
-
5. **
|
| 112 |
-
6. **
|
| 113 |
|
| 114 |
IDENTITY & TONE:
|
| 115 |
- PERSONALITY: Professional, insightful, and adaptive.
|
|
|
|
| 102 |
|
| 103 |
### ποΈ RESPONSE ARCHITECTURE & FIDELITY
|
| 104 |
1. **NO RAW LISTS**: Never provide a long bulleted list of tickets or data. Use **Markdown Tables** instead.
|
| 105 |
+
2. **VISUAL FIRST**: For any request involving trends, health, status, distribution, or analytics, you MUST generate a **Mermaid.js diagram**.
|
| 106 |
3. **TABULAR PRECISION**:
|
| 107 |
- Tickets status summary -> Table
|
| 108 |
- Priority distribution -> Mermaid Pie Chart
|
| 109 |
+
- Time trends -> Mermaid XY Chart
|
| 110 |
- Performance metrics -> Markdown table with status emojis (π΄, π‘, π’)
|
| 111 |
+
4. **MANDATORY VISUALS**: If the user asks for "analytics", "status", "summary", or "report", your response IS NOT COMPLETE without at least one Mermaid diagram and one Markdown table.
|
| 112 |
+
5. **FORBIDDEN ACTION**: Never recite or "print" strings like "WORKSPACE HEALTH SNAPSHOT" or "TicketStatus.OPEN" verbatim. Transform these into high-fidelity visuals.
|
| 113 |
+
6. **STYLE**: Professional, high-impact executive summaries. Use GitHub-Flavored Markdown (GFM).
|
| 114 |
|
| 115 |
IDENTITY & TONE:
|
| 116 |
- PERSONALITY: Professional, insightful, and adaptive.
|
agents/suggestion.py
CHANGED
|
@@ -20,15 +20,14 @@ Description: {description}
|
|
| 20 |
|
| 21 |
INSTRUCTIONS:
|
| 22 |
1. INTERNAL_SUMMARY: Draft a concise, technical forensic breakdown for the agent. Identify the core anomaly and version specifics.
|
| 23 |
-
2. RCA: Identify the likely root cause (Root Cause Analysis)
|
| 24 |
-
3. SOLUTION: Provide a precise technical solution or
|
| 25 |
-
4. CUSTOMER_REPLY: Draft a professional
|
| 26 |
-
5. SOURCES: Explicitly list
|
| 27 |
-
6. KB_DRAFT: If a depth gap is identified (is_new_topic={is_new_topic}), draft a
|
| 28 |
Include:
|
| 29 |
-
- ### π Diagnostic Update: Detailed breakdown
|
| 30 |
-
- ### π οΈ Technical Fix: Precise steps
|
| 31 |
-
- ### π Visual Troubleshooting: A Mermaid JS flowchart (graph TD) visualizing the fix logic.
|
| 32 |
|
| 33 |
RESPONSE FORMAT (JSON):
|
| 34 |
{{
|
|
|
|
| 20 |
|
| 21 |
INSTRUCTIONS:
|
| 22 |
1. INTERNAL_SUMMARY: Draft a concise, technical forensic breakdown for the agent. Identify the core anomaly and version specifics.
|
| 23 |
+
2. RCA: Identify the likely root cause (Root Cause Analysis).
|
| 24 |
+
3. SOLUTION: Provide a precise technical solution for the agent. Use a **Markdown Table** if listing steps or configurations, and include a **Mermaid.js diagram** (e.g. sequenceDiagram or graph TD) if the fix logic is complex.
|
| 25 |
+
4. CUSTOMER_REPLY: Draft a professional response for the user.
|
| 26 |
+
5. SOURCES: Explicitly list citing articles or tickets.
|
| 27 |
+
6. KB_DRAFT: If a depth gap is identified (is_new_topic={is_new_topic}), draft a structured article update.
|
| 28 |
Include:
|
| 29 |
+
- ### π Diagnostic Update: Detailed breakdown.
|
| 30 |
+
- ### π οΈ Technical Fix: Precise steps with a **Mermaid.js flowchart** visualization.
|
|
|
|
| 31 |
|
| 32 |
RESPONSE FORMAT (JSON):
|
| 33 |
{{
|
core/tasks.py
CHANGED
|
@@ -208,7 +208,7 @@ async def auto_summarize_ticket(ctx, ticket_id: UUID, **kwargs):
|
|
| 208 |
intl_blocks.extend(all_imgs)
|
| 209 |
|
| 210 |
intl_prompt = [
|
| 211 |
-
SystemMessage(content="You are a support lead. Summarize for an INTERNAL AGENT.
|
| 212 |
HumanMessage(content=intl_blocks)
|
| 213 |
]
|
| 214 |
|
|
|
|
| 208 |
intl_blocks.extend(all_imgs)
|
| 209 |
|
| 210 |
intl_prompt = [
|
| 211 |
+
SystemMessage(content="You are a support lead. Summarize for an INTERNAL AGENT. Use a **Markdown Table** to list key technical facts or recent events if relevant. Include internal notes. Max 4 sentences for text portion."),
|
| 212 |
HumanMessage(content=intl_blocks)
|
| 213 |
]
|
| 214 |
|