Spaces:
Sleeping
Sleeping
Update analytics/ai_assistant.py
Browse files
analytics/ai_assistant.py
CHANGED
|
@@ -182,13 +182,10 @@ def _infer_data_request(question: str, as_of_month: str | None = None, segment:
|
|
| 182 |
"data_req should be a list containing one or more of: [\"vintage\", \"calendar\", \"portfolio\", \"classification\"]. "
|
| 183 |
"grouping should be one of [\"fico_band\", \"sourcing_channel\", \"city_tier\", \"occupation_type\"] or null. "
|
| 184 |
"metrics should be [\"All\"] or a list of one or more of: [\"30+@3\", \"30+@6\", \"60+@6\", \"Yr1 NCL\"]. "
|
| 185 |
-
"as_of_month should be the requested month in YYYY-MM format, or \"All\" if the query wants full data or no explicit month.
|
| 186 |
"segment should be the selected UI segment value or null.\n\n"
|
| 187 |
"Example: If the query is: Analyse which vintages,the fico bands and occupation have the worst performance as of 2024-11."
|
| 188 |
-
"The output will be a list with data_req having vintage ,
|
| 189 |
-
grouping key will have fico_band and occupation_type,
|
| 190 |
-
metrics will have 30+@3, 30+@6, 60+@6, Yr1 NCL,
|
| 191 |
-
as_of_month will have 2024-11. \n\n"
|
| 192 |
"Question: " + question + "\n"
|
| 193 |
"Selected UI month: " + (as_of_month or "All") + "\n"
|
| 194 |
"Selected UI segment: " + (segment or "None") + "\n"
|
|
|
|
| 182 |
"data_req should be a list containing one or more of: [\"vintage\", \"calendar\", \"portfolio\", \"classification\"]. "
|
| 183 |
"grouping should be one of [\"fico_band\", \"sourcing_channel\", \"city_tier\", \"occupation_type\"] or null. "
|
| 184 |
"metrics should be [\"All\"] or a list of one or more of: [\"30+@3\", \"30+@6\", \"60+@6\", \"Yr1 NCL\"]. "
|
| 185 |
+
"as_of_month should be the requested month in YYYY-MM format, or \"All\" if the query wants full data or no explicit month."
|
| 186 |
"segment should be the selected UI segment value or null.\n\n"
|
| 187 |
"Example: If the query is: Analyse which vintages,the fico bands and occupation have the worst performance as of 2024-11."
|
| 188 |
+
"The output will be a list with data_req having vintage,grouping key will have fico_band and occupation_type,metrics will have 30+@3, 30+@6, 60+@6, Yr1 NCL,as_of_month will have 2024-11.\n\n"
|
|
|
|
|
|
|
|
|
|
| 189 |
"Question: " + question + "\n"
|
| 190 |
"Selected UI month: " + (as_of_month or "All") + "\n"
|
| 191 |
"Selected UI segment: " + (segment or "None") + "\n"
|