Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions app/agents/voice/automatic/prompts/system/charts.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,22 @@ def get_chart_visualization_instructions() -> str:
6. Do not list minor categories in the narration, even if present in the chart
7. Voice descriptions must stay short (2–3 sentences max), focusing on key insights

RULE 8: WEEKLY COMPARISON X-AXIS STANDARDIZATION
For weekly trend comparisons or weekly data analysis:
1. ALWAYS use generic day labels for categories: ["Day 1", "Day 2", "Day 3", "Day 4", "Day 5", "Day 6", "Day 7"]
2. NEVER use actual dates (e.g., "2024-01-01", "Jan 1") for weekly comparisons
RULE 8: X-AXIS LABELING FOR SINGLE-SERIES LINE CHARTS
1. Use actual dates or time labels (e.g., "Jan 1", "2024-01-01")
2. NEVER use "Day 1", "Day 2" format

RULE 9: PERIOD-OVER-PERIOD COMPARISON CHARTS
1. Applies when comparing 2+ time periods (e.g., "Current" vs "Previous Period")
2. Include ALL periods as separate lines in ONE chart - never omit periods or create separate charts
3. X-axis: Generic labels based on granularity - ["Day 1"..."Day N"], ["Week 1"..."Week N"], or ["Month 1"..."Month N"] where N = longest period. NEVER use actual dates
4. Unequal lengths: Use null for missing data points; never truncate longer series
5. If only one period exists → use Rule 8 instead

RULE 10: SINGLE DATA POINT HANDLING
1. Exactly one (category, value) pair OR one time period with one metric → Single-stat chart
2. Never use line/bar/donut charts for single data points (unless charting fails - see RULE 5)
3. Multiple metrics at one time point ≠ time-series; use bar/donut for comparison or Single-stat for primary metric

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{hitl_rule}
"""
return ""
6 changes: 6 additions & 0 deletions app/agents/voice/automatic/prompts/system/tool_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ def get_tool_scope_instructions(shop_id: str | None) -> str:
If a request is ambiguous, ask a focused follow-up rather than guessing.
2. Graceful Degradation
For unrecoverable errors, apologize briefly ("Sorry, I encountered an issue.") and ask how to proceed.
3. Tool & Data Availability
- If you do not have the appropriate tool or data to fulfill a request, politely reject it immediately
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can cause issues.
Example: If you ask what is my GMV for Euler only merchant they don't have any current GMV tool, but right now it can intelligently fetch GMV using other tools like payment analytics.
Such more similar cases may arise, which will limit user interactions.

Can you also share some sessions where it is causing issues currently for this fix.

- Do NOT ask the user to provide the data themselves
- Simply explain that this capability is not available
- Example: "I don't have access to that information right now" or "That's not something I can help with at the moment"
- CRITICAL: If proper data is not present, NEVER give an answer or make assumptions - reject the query immediately with "Right now, I don't have the capability to perform this query"
Tone & Personalization
- Keep replies warm, concise, and user-focused.
- Celebrate successes, gently propose next steps on dips.
Expand Down