You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/harness/prompts/files/external/ccm.txt
+49-28Lines changed: 49 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -57,34 +57,55 @@ Enable users to make informed decisions about their cloud costs by leveraging Ha
57
57
- Purpose: Retrieve label keys/values for cost categorization
58
58
- Prerequisite: value_type can be label_key, label_v2_key .
59
59
60
-
### Workflow Process
61
-
62
-
1. **For Cost Breakdown Queries**
63
-
1.1 **Initial Key Discovery**
64
-
- Use `ccm_perspective_filter_values` to fetch available label keys
65
-
- If requested category keys are unavailable:
66
-
- Suggest alternative keys with similar context
67
-
- Provide examples of available keys
68
-
69
-
1.2 **Context Validation**
70
-
- If requested context keys cannot be fetched:
71
-
- Suggest cost breakdowns using available categories
72
-
- Provide reasoning for suggested alternatives
73
-
74
-
1.3 **User-Driven Breakdowns**
75
-
- If user requests specific key-based breakdowns:
76
-
- Use `ccm_perspective_filter_values` to fetch possible values
77
-
- Validate key availability and context
78
-
- Provide feedback on key compatibility
79
-
80
-
1.4 **Perspective Generation**
81
-
- Generate perspective rules using validated keys
82
-
- Include AWS account filtering (e.g., "harness-ce") when applicable
83
-
- Validate rules using `validate_ccm_perspective_rules`
84
-
- Create perspective using `create_ccm_perspective`
85
-
- Provide status and next steps to user
86
-
87
-
2. **Additional Best Practices**
60
+
61
+
###Please follow below perspective creation workflow to create a team/department/organization cost perspective.
62
+
63
+
Here are the sequential steps the AI agent must follow when a user asks to view costs for a specific team or department or organization.
64
+
65
+
####Step 1: Fetch Available Cost Labels
66
+
When a user requests cost data for a team or department (e.g., """"Show me the cost for the engineering team""""), the first action is to identify all available cost labels.
67
+
68
+
- **Action:** Call the ccm_perspective_filter_values tool.
69
+
70
+
- **Parameters:** Include a time_filter with default values as LAST_30_DAYS to ensure the labels are relevant to the requested time frame.
71
+
72
+
- **Goal:** To retrieve a complete list of possible label keys that can be used for filtering costs.
73
+
74
+
####Step 2: Identify Matching Keys
75
+
Once the list of available labels is retrieved, analyze it to find a match for the user's request.
76
+
77
+
Condition (A): Exact Match Found
78
+
79
+
If a label key exactly matches the user's request (e.g., the user asks for """"Finance Team"""" and a key like team:Finance or department:Finance exists), proceed directly to Step 4.
80
+
81
+
Condition (B): No Exact Match Found
82
+
83
+
If no exact match exists, look for keys with a similar context or semantic meaning (e.g., the user asks for the """"IT team,"""" and available keys include dept:information_technology or cost_center:IT_Ops). Before asking user to confirm the key, procceed to Step 3.
84
+
85
+
####Step 3: Validate Similar Keys with the User
86
+
This step is only necessary if no exact match was found in Step 2.
87
+
88
+
- **Action:** Call the ccm_perspective_filter_values_event tool.
89
+
90
+
- **Parameters:** Provide the list of contextually similar keys you identified.
91
+
92
+
- **Goal:** Present the suggested keys to the user and ask them to confirm which one(s) should be used to represent their requested team/department.
93
+
94
+
####Step 4: Get ccm perpective rules validated
95
+
- **Action:** Call the validate_ccm_perspective_rules tool. You must use snake_case for all keys in the JSON request payload (e.g., view_conditions). Allowed values for view_operator field are "IN", "NOT IN", "NOT NULL", "NULL" and "LIKE".
96
+
97
+
- **Parameters:** Refer tool schema to generating tool request.
98
+
99
+
- **Goal:** Add the perspective rule for the user and ask them to confirm to create perspective for above rules
100
+
101
+
####Step 5: Create the Cost Perspective
102
+
After identifying the correct key(s) – either through an exact match (Step 2A) or user validation (Step 3) – create the final cost view.
103
+
104
+
- **Action:** Generate the perspective rules based on the confirmed key(s).
105
+
106
+
- **Goal:** Display the cost data filtered specifically for the user's requested team or department.
107
+
108
+
**Additional Best Practices**
88
109
- Always validate AWS account IDs before rule generation
89
110
- Include time range validation in perspective creation
90
111
- Maintain consistent use of snake_case for all field names
Copy file name to clipboardExpand all lines: pkg/harness/prompts/files/internal/ccm.txt
+49-28Lines changed: 49 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -57,34 +57,55 @@ Enable users to make informed decisions about their cloud costs by leveraging Ha
57
57
- Purpose: Retrieve label keys/values for cost categorization
58
58
- Prerequisite: value_type can be label_key, label_v2_key .
59
59
60
-
### Workflow Process
61
-
62
-
1. **For Cost Breakdown Queries**
63
-
1.1 **Initial Key Discovery**
64
-
- Use `ccm_perspective_filter_values` to fetch available label keys
65
-
- If requested category keys are unavailable:
66
-
- Suggest alternative keys with similar context
67
-
- Provide examples of available keys
68
-
69
-
1.2 **Context Validation**
70
-
- If requested context keys cannot be fetched:
71
-
- Suggest cost breakdowns using available categories
72
-
- Provide reasoning for suggested alternatives
73
-
74
-
1.3 **User-Driven Breakdowns**
75
-
- If user requests specific key-based breakdowns:
76
-
- Use `ccm_perspective_filter_values` to fetch possible values
77
-
- Validate key availability and context
78
-
- Provide feedback on key compatibility
79
-
80
-
1.4 **Perspective Generation**
81
-
- Generate perspective rules using validated keys
82
-
- Include AWS account filtering (e.g., "harness-ce") when applicable
83
-
- Validate rules using `validate_ccm_perspective_rules`
84
-
- Create perspective using `create_ccm_perspective`
85
-
- Provide status and next steps to user
86
-
87
-
2. **Additional Best Practices**
60
+
61
+
###Please follow below perspective creation workflow to create a team/department/organization cost perspective.
62
+
63
+
Here are the sequential steps the AI agent must follow when a user asks to view costs for a specific team or department or organization.
64
+
65
+
####Step 1: Fetch Available Cost Labels
66
+
When a user requests cost data for a team or department (e.g., """"Show me the cost for the engineering team""""), the first action is to identify all available cost labels.
67
+
68
+
- **Action:** Call the ccm_perspective_filter_values tool.
69
+
70
+
- **Parameters:** Include a time_filter with default values as LAST_30_DAYS to ensure the labels are relevant to the requested time frame.
71
+
72
+
- **Goal:** To retrieve a complete list of possible label keys that can be used for filtering costs.
73
+
74
+
####Step 2: Identify Matching Keys
75
+
Once the list of available labels is retrieved, analyze it to find a match for the user's request.
76
+
77
+
Condition (A): Exact Match Found
78
+
79
+
If a label key exactly matches the user's request (e.g., the user asks for """"Finance Team"""" and a key like team:Finance or department:Finance exists), proceed directly to Step 4.
80
+
81
+
Condition (B): No Exact Match Found
82
+
83
+
If no exact match exists, look for keys with a similar context or semantic meaning (e.g., the user asks for the """"IT team,"""" and available keys include dept:information_technology or cost_center:IT_Ops). Before asking user to confirm the key, procceed to Step 3.
84
+
85
+
####Step 3: Validate Similar Keys with the User
86
+
This step is only necessary if no exact match was found in Step 2.
87
+
88
+
- **Action:** Call the ccm_perspective_filter_values_event tool.
89
+
90
+
- **Parameters:** Provide the list of contextually similar keys you identified.
91
+
92
+
- **Goal:** Present the suggested keys to the user and ask them to confirm which one(s) should be used to represent their requested team/department.
93
+
94
+
####Step 4: Get ccm perpective rules validated
95
+
- **Action:** Call the validate_ccm_perspective_rules tool. You must use snake_case for all keys in the JSON request payload (e.g., view_conditions). Allowed values for view_operator field are "IN", "NOT IN", "NOT NULL", "NULL" and "LIKE".
96
+
97
+
- **Parameters:** Refer tool schema to generating tool request.
98
+
99
+
- **Goal:** Add the perspective rule for the user and ask them to confirm to create perspective for above rules
100
+
101
+
####Step 5: Create the Cost Perspective
102
+
After identifying the correct key(s) – either through an exact match (Step 2A) or user validation (Step 3) – create the final cost view.
103
+
104
+
- **Action:** Generate the perspective rules based on the confirmed key(s).
105
+
106
+
- **Goal:** Display the cost data filtered specifically for the user's requested team or department.
107
+
108
+
**Additional Best Practices**
88
109
- Always validate AWS account IDs before rule generation
89
110
- Include time range validation in perspective creation
90
111
- Maintain consistent use of snake_case for all field names
0 commit comments