aab-prompts 1.0.1__tar.gz → 1.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/PKG-INFO +1 -1
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/aab_prompts.egg-info/PKG-INFO +1 -1
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/aab_service.py +47 -42
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/prompts/objects_fields.py +32 -32
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/prompts/planner.py +25 -14
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/pyproject.toml +1 -1
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/tests/test_prompts.py +87 -66
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/aab_prompts.egg-info/SOURCES.txt +0 -0
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/aab_prompts.egg-info/dependency_links.txt +0 -0
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/aab_prompts.egg-info/top_level.txt +0 -0
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/prompts/__init__.py +0 -0
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/prompts/breadcrumbs.py +0 -0
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/prompts/constants.py +0 -0
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/prompts/expressions.py +0 -0
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/prompts/menu_navigations.py +0 -0
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/prompts/page_planner.py +0 -0
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/prompts/pages.py +0 -0
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/prompts/router.py +0 -0
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/prompts/solutions_applications.py +0 -0
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/prompts/view_filter_planner.py +0 -0
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/prompts/view_links_planner.py +0 -0
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/prompts/view_planner.py +0 -0
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/prompts/views.py +0 -0
- {aab_prompts-1.0.1 → aab_prompts-1.1.2}/setup.cfg +0 -0
|
@@ -96,15 +96,15 @@ class _ExpressionsHandler:
|
|
|
96
96
|
@property
|
|
97
97
|
def EXPRESSIONS_AGENT_PROMPT(self) -> str:
|
|
98
98
|
return EXPRESSIONS_AGENT_PROMPT_TEMPLATE.format(
|
|
99
|
-
EXPRESSION_REQUIREMENTS=self.EXPRESSION_REQUIREMENTS
|
|
100
|
-
CORE_EXPRESSIONS=self.CORE_EXPRESSIONS
|
|
99
|
+
EXPRESSION_REQUIREMENTS=self.EXPRESSION_REQUIREMENTS,
|
|
100
|
+
CORE_EXPRESSIONS=self.CORE_EXPRESSIONS,
|
|
101
101
|
)
|
|
102
102
|
|
|
103
103
|
@property
|
|
104
104
|
def SHOW_IF_EXPRESSION_AGENT_PROMPT(self) -> str:
|
|
105
105
|
return SHOW_IF_EXPRESSION_AGENT_PROMPT_TEMPLATE.format(
|
|
106
|
-
EXPRESSION_REQUIREMENTS=self.EXPRESSION_REQUIREMENTS
|
|
107
|
-
CORE_EXPRESSIONS=self.CORE_EXPRESSIONS
|
|
106
|
+
EXPRESSION_REQUIREMENTS=self.EXPRESSION_REQUIREMENTS,
|
|
107
|
+
CORE_EXPRESSIONS=self.CORE_EXPRESSIONS,
|
|
108
108
|
)
|
|
109
109
|
|
|
110
110
|
@property
|
|
@@ -114,34 +114,35 @@ class _ExpressionsHandler:
|
|
|
114
114
|
@property
|
|
115
115
|
def VIEW_FILTER_EXPRESSION_AGENT_PROMPT(self) -> str:
|
|
116
116
|
return VIEW_FILTER_EXPRESSION_AGENT_PROMPT_TEMPLATE.format(
|
|
117
|
-
EXPRESSION_REQUIREMENTS=self.EXPRESSION_REQUIREMENTS
|
|
118
|
-
CORE_EXPRESSIONS=self.CORE_EXPRESSIONS
|
|
117
|
+
EXPRESSION_REQUIREMENTS=self.EXPRESSION_REQUIREMENTS,
|
|
118
|
+
CORE_EXPRESSIONS=self.CORE_EXPRESSIONS,
|
|
119
119
|
)
|
|
120
120
|
|
|
121
121
|
@property
|
|
122
122
|
def FIELDS_EXPRESSION_AGENT_PROMPT(self) -> str:
|
|
123
123
|
return FIELDS_EXPRESSION_AGENT_PROMPT_TEMPLATE.format(
|
|
124
|
-
EXPRESSION_REQUIREMENTS=self.EXPRESSION_REQUIREMENTS
|
|
125
|
-
CORE_EXPRESSIONS=self.CORE_EXPRESSIONS
|
|
124
|
+
EXPRESSION_REQUIREMENTS=self.EXPRESSION_REQUIREMENTS,
|
|
125
|
+
CORE_EXPRESSIONS=self.CORE_EXPRESSIONS,
|
|
126
126
|
)
|
|
127
127
|
|
|
128
128
|
@property
|
|
129
129
|
def VIEWS_EXPRESSION_AGENT_PROMPT(self) -> str:
|
|
130
130
|
return VIEWS_EXPRESSION_AGENT_PROMPT_TEMPLATE.format(
|
|
131
|
-
EXPRESSION_REQUIREMENTS=self.EXPRESSION_REQUIREMENTS
|
|
132
|
-
CORE_EXPRESSIONS=self.CORE_EXPRESSIONS
|
|
131
|
+
EXPRESSION_REQUIREMENTS=self.EXPRESSION_REQUIREMENTS,
|
|
132
|
+
CORE_EXPRESSIONS=self.CORE_EXPRESSIONS,
|
|
133
133
|
)
|
|
134
134
|
|
|
135
135
|
@property
|
|
136
136
|
def PAGE_DATA_BINDER_AGENT_PROMPT(self) -> str:
|
|
137
137
|
return PAGE_DATA_BINDER_AGENT_PROMPT_TEMPLATE.format(
|
|
138
|
-
EXPRESSION_REQUIREMENTS=self.EXPRESSION_REQUIREMENTS
|
|
139
|
-
CORE_EXPRESSIONS=self.CORE_EXPRESSIONS
|
|
138
|
+
EXPRESSION_REQUIREMENTS=self.EXPRESSION_REQUIREMENTS,
|
|
139
|
+
CORE_EXPRESSIONS=self.CORE_EXPRESSIONS,
|
|
140
140
|
)
|
|
141
141
|
|
|
142
142
|
class _MenuNavigationsHandler:
|
|
143
143
|
"""Handler for all menu navigation-related prompts."""
|
|
144
144
|
|
|
145
|
+
@property
|
|
145
146
|
def MENU_NAVIGATIONS_AGENT_SYSTEM_PROMPT(self) -> str:
|
|
146
147
|
return MENU_NAVIGATIONS_AGENT_SYSTEM_PROMPT_TEMPLATE
|
|
147
148
|
|
|
@@ -190,10 +191,11 @@ class _PagesHandler:
|
|
|
190
191
|
class _PlannerHandler:
|
|
191
192
|
"""Handler for all planner-related prompts."""
|
|
192
193
|
|
|
193
|
-
def __init__(self, restricted_objects_list: list[str], standard_objects_descriptions: str, system_objects_descriptions: str) -> None:
|
|
194
|
+
def __init__(self, restricted_objects_list: list[str], standard_objects_descriptions: str, system_objects_descriptions: str, view_type_details_template: str) -> None:
|
|
194
195
|
self.restricted_objects_list = restricted_objects_list
|
|
195
196
|
self.standard_objects_descriptions = standard_objects_descriptions
|
|
196
197
|
self.system_objects_descriptions = system_objects_descriptions
|
|
198
|
+
self.view_type_details_template = view_type_details_template
|
|
197
199
|
|
|
198
200
|
@property
|
|
199
201
|
def PLANNER_EXAMPLES(self) -> str:
|
|
@@ -205,7 +207,8 @@ class _PlannerHandler:
|
|
|
205
207
|
RESTRICTED_OBJECTS_LIST=", ".join(self.restricted_objects_list),
|
|
206
208
|
STANDARD_OBJECTS_DESCRIPTIONS=self.standard_objects_descriptions,
|
|
207
209
|
SYSTEM_OBJECTS_DESCRIPTIONS=self.system_objects_descriptions,
|
|
208
|
-
PLANNER_EXAMPLES=self.PLANNER_EXAMPLES
|
|
210
|
+
PLANNER_EXAMPLES=self.PLANNER_EXAMPLES,
|
|
211
|
+
VIEW_TYPE_DETAILS_TEMPLATE=self.view_type_details_template,
|
|
209
212
|
)
|
|
210
213
|
|
|
211
214
|
|
|
@@ -291,44 +294,44 @@ class _ViewsHandler:
|
|
|
291
294
|
@property
|
|
292
295
|
def VIEWS_AGENT_SYSTEM_PROMPT(self) -> str:
|
|
293
296
|
return VIEWS_AGENT_SYSTEM_PROMPT_TEMPLATE.format(
|
|
294
|
-
VIEW_TYPE_DETAILS=self.VIEW_TYPE_DETAILS
|
|
295
|
-
COMMON_VIEW_PROPERTIES=self.COMMON_VIEW_PROPERTIES
|
|
296
|
-
LIST_VIEW_PROPERTIES=self.LIST_VIEW_PROPERTIES
|
|
297
|
-
CARD_VIEW_PROPERTIES=self.CARD_VIEW_PROPERTIES
|
|
298
|
-
DETAIL_VIEW_PROPERTIES=self.DETAIL_VIEW_PROPERTIES
|
|
299
|
-
CREATE_VIEW_PROPERTIES=self.CREATE_VIEW_PROPERTIES
|
|
300
|
-
MAP_VIEW_PROPERTIES=self.MAP_VIEW_PROPERTIES
|
|
301
|
-
CALENDAR_VIEW_PROPERTIES=self.CALENDAR_VIEW_PROPERTIES
|
|
302
|
-
DECK_VIEW_PROPERTIES=self.DECK_VIEW_PROPERTIES
|
|
297
|
+
VIEW_TYPE_DETAILS=self.VIEW_TYPE_DETAILS,
|
|
298
|
+
COMMON_VIEW_PROPERTIES=self.COMMON_VIEW_PROPERTIES,
|
|
299
|
+
LIST_VIEW_PROPERTIES=self.LIST_VIEW_PROPERTIES,
|
|
300
|
+
CARD_VIEW_PROPERTIES=self.CARD_VIEW_PROPERTIES,
|
|
301
|
+
DETAIL_VIEW_PROPERTIES=self.DETAIL_VIEW_PROPERTIES,
|
|
302
|
+
CREATE_VIEW_PROPERTIES=self.CREATE_VIEW_PROPERTIES,
|
|
303
|
+
MAP_VIEW_PROPERTIES=self.MAP_VIEW_PROPERTIES,
|
|
304
|
+
CALENDAR_VIEW_PROPERTIES=self.CALENDAR_VIEW_PROPERTIES,
|
|
305
|
+
DECK_VIEW_PROPERTIES=self.DECK_VIEW_PROPERTIES,
|
|
303
306
|
)
|
|
304
307
|
|
|
305
308
|
@property
|
|
306
309
|
def VIEWS_PLANNER_AGENT_SYSTEM_PROMPT(self) -> str:
|
|
307
310
|
return VIEWS_PLANNER_AGENT_SYSTEM_PROMPT_TEMPLATE.format(
|
|
308
|
-
VIEW_TYPE_DETAILS=self.VIEW_TYPE_DETAILS
|
|
309
|
-
COMMON_VIEW_PROPERTIES=self.COMMON_VIEW_PROPERTIES
|
|
310
|
-
LIST_VIEW_PROPERTIES=self.LIST_VIEW_PROPERTIES
|
|
311
|
-
CARD_VIEW_PROPERTIES=self.CARD_VIEW_PROPERTIES
|
|
312
|
-
DETAIL_VIEW_PROPERTIES=self.DETAIL_VIEW_PROPERTIES
|
|
313
|
-
CREATE_VIEW_PROPERTIES=self.CREATE_VIEW_PROPERTIES
|
|
314
|
-
MAP_VIEW_PROPERTIES=self.MAP_VIEW_PROPERTIES
|
|
315
|
-
CALENDAR_VIEW_PROPERTIES=self.CALENDAR_VIEW_PROPERTIES
|
|
316
|
-
DECK_VIEW_PROPERTIES=self.DECK_VIEW_PROPERTIES
|
|
317
|
-
VIEW_LINKS_PROPERTIES=self.VIEW_LINKS_PROPERTIES
|
|
318
|
-
VIEW_FILTERS_PROPERTIES=self.VIEW_FILTERS_PROPERTIES
|
|
311
|
+
VIEW_TYPE_DETAILS=self.VIEW_TYPE_DETAILS,
|
|
312
|
+
COMMON_VIEW_PROPERTIES=self.COMMON_VIEW_PROPERTIES,
|
|
313
|
+
LIST_VIEW_PROPERTIES=self.LIST_VIEW_PROPERTIES,
|
|
314
|
+
CARD_VIEW_PROPERTIES=self.CARD_VIEW_PROPERTIES,
|
|
315
|
+
DETAIL_VIEW_PROPERTIES=self.DETAIL_VIEW_PROPERTIES,
|
|
316
|
+
CREATE_VIEW_PROPERTIES=self.CREATE_VIEW_PROPERTIES,
|
|
317
|
+
MAP_VIEW_PROPERTIES=self.MAP_VIEW_PROPERTIES,
|
|
318
|
+
CALENDAR_VIEW_PROPERTIES=self.CALENDAR_VIEW_PROPERTIES,
|
|
319
|
+
DECK_VIEW_PROPERTIES=self.DECK_VIEW_PROPERTIES,
|
|
320
|
+
VIEW_LINKS_PROPERTIES=self.VIEW_LINKS_PROPERTIES,
|
|
321
|
+
VIEW_FILTERS_PROPERTIES=self.VIEW_FILTERS_PROPERTIES,
|
|
319
322
|
)
|
|
320
323
|
|
|
321
324
|
@property
|
|
322
325
|
def VIEW_LINKS_PLANNER_PROMPT(self) -> str:
|
|
323
326
|
return VIEW_LINKS_PLANNER_PROMPT_TEMPLATE.format(
|
|
324
|
-
VIEW_LINKS_PROPERTIES=self.VIEW_LINKS_PROPERTIES
|
|
327
|
+
VIEW_LINKS_PROPERTIES=self.VIEW_LINKS_PROPERTIES,
|
|
325
328
|
)
|
|
326
329
|
|
|
327
330
|
|
|
328
331
|
@property
|
|
329
332
|
def VIEW_FILTER_PLANNER_PROMPT(self) -> str:
|
|
330
333
|
return VIEW_FILTER_PLANNER_PROMPT_TEMPLATE.format(
|
|
331
|
-
VIEW_FILTERS_PROPERTIES=self.VIEW_FILTERS_PROPERTIES
|
|
334
|
+
VIEW_FILTERS_PROPERTIES=self.VIEW_FILTERS_PROPERTIES,
|
|
332
335
|
)
|
|
333
336
|
|
|
334
337
|
|
|
@@ -339,10 +342,12 @@ class AABPrompts:
|
|
|
339
342
|
def __init__(self, core_expressions: dict, restricted_objects_list: list[str], default_solution_id: str, default_application_id: str) -> None:
|
|
340
343
|
# Initialize handlers
|
|
341
344
|
self._objects_fields = _ObjectsFieldsHandler(restricted_objects_list)
|
|
345
|
+
self._views = _ViewsHandler()
|
|
342
346
|
self._planner = _PlannerHandler(
|
|
343
347
|
restricted_objects_list,
|
|
344
|
-
self._objects_fields.STANDARD_OBJECTS_DESCRIPTIONS
|
|
345
|
-
self._objects_fields.SYSTEM_OBJECTS_DESCRIPTIONS
|
|
348
|
+
self._objects_fields.STANDARD_OBJECTS_DESCRIPTIONS,
|
|
349
|
+
self._objects_fields.SYSTEM_OBJECTS_DESCRIPTIONS,
|
|
350
|
+
self._views.VIEW_TYPE_DETAILS
|
|
346
351
|
)
|
|
347
352
|
|
|
348
353
|
# Store all handlers in a list for easy iteration
|
|
@@ -355,12 +360,12 @@ class AABPrompts:
|
|
|
355
360
|
_PagesHandler(),
|
|
356
361
|
self._planner,
|
|
357
362
|
_RouterHandler(
|
|
358
|
-
self._objects_fields.STANDARD_OBJECTS_DESCRIPTIONS
|
|
359
|
-
self._objects_fields.SYSTEM_OBJECTS_DESCRIPTIONS
|
|
360
|
-
self._planner.PLANNER_EXAMPLES
|
|
363
|
+
self._objects_fields.STANDARD_OBJECTS_DESCRIPTIONS,
|
|
364
|
+
self._objects_fields.SYSTEM_OBJECTS_DESCRIPTIONS,
|
|
365
|
+
self._planner.PLANNER_EXAMPLES,
|
|
361
366
|
),
|
|
362
367
|
_SolutionsApplicationsHandler(default_solution_id, default_application_id),
|
|
363
|
-
|
|
368
|
+
self._views,
|
|
364
369
|
]
|
|
365
370
|
|
|
366
371
|
def __getattr__(self, name: str):
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
STANDARD_OBJECTS_DESCRIPTIONS_TEMPLATE = """
|
|
4
|
-
- Activities (`activities): Tracks activities, like emails, tasks, SMS, and PubSub topics related to a record. This creates logs of all activities on the data stored in the object. When creating a custom object, you should set the `track_activities` column to `1` (`true`) to enable this feature.
|
|
4
|
+
- Activities (`activities`): Tracks activities, like emails, tasks, SMS, and PubSub topics related to a record. This creates logs of all activities on the data stored in the object. When creating a custom object, you should set the `track_activities` column to `1` (`true`) to enable this feature.
|
|
5
5
|
- Alerts (`alerts`): Alerts are standard objects that are used to create in-app alerts for a user. These alerts can be used to notify users about important events or changes in the system, such as an approval or rejection alert.
|
|
6
6
|
- Attachments (`attachments`): Attachments are standard objects that are used to track files, images, videos, and other types of attachments related to a record. When creating a custom object, you should set the `track_attachments` column to `1` (`true`) to enable this feature. Attachments are typically used when there is a non-standard list of attachments that will be added to the record. Alternatively, a field of type `File` or `Image` can be used to store a single file or image attachment when the use case is for a specific file. If you enable this, you do not need a generic attachments file field on the object as these attachments will automatically be tracked as children of the records.
|
|
7
7
|
- Audit Trails (`audit_trails`): Audit trails track field-level changes for auditability of a record. When creating a custom object, you should set the `track_audit_trails` column to `1` (`true`) to enable this feature. Audit trails are typically used when there is a need to track changes in the data stored in the object for auditability purposes.
|
|
8
8
|
- Checklist Item (`checklist_items`): Checklist items are a standard object that is used to track items in a checklist.
|
|
9
|
-
- Contacts (`contacts`): Standard object that is used to track details about a person. This is often reused to prevent
|
|
9
|
+
- Contacts (`contacts`): Standard object that is used to track details about a person. This is often reused to prevent duplicate tables and to ensure that the data is stored in a consistent format. For example, an applicant or a customer can be a contact.
|
|
10
10
|
- Favorites (`favorites`): Favorites are used to track "favorite" records. You should set the `track_favorites` column to `1` (`true`) to enable this feature. Favorites are typically used when there is a need to track records that are important to users and can be easily accessed from the UI.
|
|
11
11
|
- Households (`households`): Standard object that is used to track details about a household. It acts as an optional parent for the standard `contacts` object. This is useful when you want to group multiple contacts under a single household.
|
|
12
12
|
- Jobs (`jobs`): Jobs are a standard object that is used to store details for job requisitions (employment). These are not typically used in most applications, but they can be useful for tracking job postings or other employment-related data.
|
|
@@ -16,15 +16,15 @@ STANDARD_OBJECTS_DESCRIPTIONS_TEMPLATE = """
|
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
18
|
SYSTEM_OBJECTS_DESCRIPTIONS_TEMPLATE = """
|
|
19
|
-
- Accounts (`accounts`): Accounts are system-level objects that store tenant or org-level
|
|
20
|
-
- Actions (`actions`): Actions define operations that can be performed on records, such as sending emails,
|
|
19
|
+
- Accounts (`accounts`): Accounts are system-level objects that store tenant or org-level details, settings, and configuration preferences for the application environment.
|
|
20
|
+
- Actions (`actions`): Actions define operations that can be performed on records, such as sending emails, updating fields, or triggering integrations.
|
|
21
21
|
- API OAuth Configs (`api_oauth_confits`): API OAuth Configs are system-level objects that store configuration settings for OAuth 2.0 integrations.
|
|
22
22
|
- API OAuth Credentials (`api_oauth_credentials`): API OAuth Credentials are system-level objects that store credentials for OAuth 2.0 integrations. These are children of API OAuth Configs, and are scoped to a specific user.
|
|
23
23
|
- Applications (`applications`): Applications are containers that define the distinct apps created within the platform, including their settings and configurations.
|
|
24
24
|
- Breadcrumbs (`breadcrumbs`): Breadcrumbs are used to define the hierarchical navigation path displayed at the top of pages to help users understand their location within the app.
|
|
25
25
|
- Conditions (`conditions`): Conditions are logic rules used to filter data or trigger workflows based on field values.
|
|
26
26
|
- Custom DocAI Parsers (`custom_docai_parsers`): Configuration for custom-trained Document AI models used to extract data from non-standard documents.
|
|
27
|
-
- Custom Permissions (`custom_permissions`): Custom Permissions are used to define granular
|
|
27
|
+
- Custom Permissions (`custom_permissions`): Custom Permissions are used to define granular permissions that can be assigned to permission sets.
|
|
28
28
|
- Dashboards (`dashboards`): Dashboards define the configuration for an interface for displaying data in a visual format, such as charts and graphs. Dashboards stored in this object are typically external dashboards that are embedded via URL.
|
|
29
29
|
- Data Access Roles (`data_access_roles`): Data Access Roles are used to define the hierarchy of permissions and access levels for data within the application.
|
|
30
30
|
- Data Migrations (`data_migrations`): Data Migrations are used to manage the migration of data from one system to another.
|
|
@@ -49,7 +49,7 @@ SYSTEM_OBJECTS_DESCRIPTIONS_TEMPLATE = """
|
|
|
49
49
|
- DocAI Form Parser (`docai_form_parser`): Stores data extracted using the generic form parser for structured documents.
|
|
50
50
|
- ID Documents (`docai_generic_id`): Stores identity data extracted from generic identification cards.
|
|
51
51
|
- DocAI Lease Agreement (`docai_lease_agreement`): Stores data extracted from lease agreements.
|
|
52
|
-
- Letters (`docai_letter`): Stores unstructured text or specific entities extracted from general
|
|
52
|
+
- Letters (`docai_letter`): Stores unstructured text or specific entities extracted from general correspondence letters.
|
|
53
53
|
- Marriage Certificates (`docai_marriage_certificate`): Stores data extracted from marriage certificates.
|
|
54
54
|
- Mortgage Statements (`docai_mortgage_statement`): Stores financial data extracted from mortgage statements.
|
|
55
55
|
- New York IDs (`docai_nycid`): Stores identity data extracted specifically from New York City ID cards.
|
|
@@ -57,7 +57,7 @@ SYSTEM_OBJECTS_DESCRIPTIONS_TEMPLATE = """
|
|
|
57
57
|
- Pay Slips (`docai_paystub`): Stores payroll data extracted from employee paystubs.
|
|
58
58
|
- DocAI Property Tax Statement (`docai_property_tax_statement`): Stores financial data extracted from property tax statements.
|
|
59
59
|
- REC IDs (`docai_rec_id`): Stores data extracted from recreational or specialized ID cards.
|
|
60
|
-
- US Driver Licenses (`docai_us_driver_license`): Stores identity and license data
|
|
60
|
+
- US Driver Licenses (`docai_us_driver_license`): Stores identity and license data extracted from US driver's licenses.
|
|
61
61
|
- US Passports (`docai_us_passport`): Stores data extracted from US passports.
|
|
62
62
|
- Utility Documents (`docai_utility_doc`): Stores billing and usage data extracted from utility bills.
|
|
63
63
|
- Form W-2 (`docai_w2`): Stores data extracted from IRS Form W-2 tax documents.
|
|
@@ -68,7 +68,7 @@ SYSTEM_OBJECTS_DESCRIPTIONS_TEMPLATE = """
|
|
|
68
68
|
- Format Rules (`format_rules`): Format Rules define conditional formatting (colors, icons) applied to fields in views based on conditions.
|
|
69
69
|
- Groundings (`groundings`): Groundings define the configuration for AI context, linking data sources to Virtual Agents
|
|
70
70
|
- Integrations (`integrations`): Integrations are used to configure the connection to an external webhook or API endpoint
|
|
71
|
-
- KB Sections (`kb_sections`): KB Sections
|
|
71
|
+
- KB Sections (`kb_sections`): KB Sections define categories and sub-categories used to organize Knowledge Base articles.
|
|
72
72
|
- Knowledge Bases (`knowledge_bases`): Knowledge Bases are used as containers to organize and store articles, FAQs, and other documentation.
|
|
73
73
|
- Matching Rules (`matching_rules`): Matching Rules define the criteria used to determine if two records are considered duplicates.
|
|
74
74
|
- Menus (`menus`): Menus define the navigation structure for the app's UI.
|
|
@@ -76,10 +76,10 @@ SYSTEM_OBJECTS_DESCRIPTIONS_TEMPLATE = """
|
|
|
76
76
|
- Objects (`objects`): Objects are the database tables that store data in the platform.
|
|
77
77
|
- Object Access (`objects_access`): Object Access defines the access control lists and sharing settings for each object.
|
|
78
78
|
- Package Components (`package_components`): Package Components define the individual metadata items (fields, views, objects, workflows, etc.) that are included in a package.
|
|
79
|
-
- Packages (`packages`): Packages are bundles of application
|
|
79
|
+
- Packages (`packages`): Packages are bundles of application metadata created for distribution or deployment.
|
|
80
80
|
- Pages (`pages`): Pages define the layout and structure of UI screens in the application. Pages are custom UI screens that support functionality beyond the standard object views.
|
|
81
81
|
- Permission Set Applications (`permission_set_applications`): Permission Set Applications control access to specific applications within a permission set.
|
|
82
|
-
- Permission Set Custom
|
|
82
|
+
- Permission Set Custom Permissions (`permission_set_custom_permissions`): Permission Set Custom Permissions control access to specific custom permissions within a permission set.
|
|
83
83
|
- Permission Set Fields (`permission_set_fields`): Permission Set Fields control read/write access to specific fields within a permission set.
|
|
84
84
|
- Permission Set Knowledgebases (`permission_set_knowledgebases`): Permission Set Knowledgebases control access to specific knowledge bases within a permission set.
|
|
85
85
|
- Permission Set Tables (`permission_set_tables`): Permission Set Tables control CRUD (create, read, update, delete) access to objects within a permission set.
|
|
@@ -105,9 +105,9 @@ SYSTEM_OBJECTS_DESCRIPTIONS_TEMPLATE = """
|
|
|
105
105
|
- Uploads (`uploads`): Uploads store logs and metadata regarding files uploaded to the platform.
|
|
106
106
|
- Users (`users`): Users are system-level objects that store user information, including their profile, roles, permissions, and settings.
|
|
107
107
|
- Users Shares (`users__shares`): Manages sharing permissions specifically for the users table.
|
|
108
|
-
- Versions (`versions`): Versions track the history of changes for version
|
|
108
|
+
- Versions (`versions`): Versions track the history of changes for version-controlled system objects.
|
|
109
109
|
- View Links (`view_links`): View Links define the actions, buttons, or hyperlinks embedded within a view.
|
|
110
|
-
- View Views (`view_views`): View Views represent
|
|
110
|
+
- View Views (`view_views`): View Views represent nested views or components within a parent view.
|
|
111
111
|
- Views (`views`): Views define how data is presented to the user (grid/list, forms, etc)
|
|
112
112
|
- Virtual Agents (`virtual_agents`): Virtual Agents are used to define and manage conversational or automated AI agents within the platform.
|
|
113
113
|
- Walkthrough Steps (`walkthrough_steps`): Walkthrough Steps are used to define the steps in a guided tour or walkthrough for new users.
|
|
@@ -166,31 +166,31 @@ You must always have the Objects in this specific schema. Each Object must follo
|
|
|
166
166
|
For each key, read and follow its meaning and usage rules:
|
|
167
167
|
|
|
168
168
|
- table: The internal table name. Always named in lowercase_snake_case, plural. Must match the object's concept exactly. Max 100 characters.
|
|
169
|
-
- singular_label: The singular label of the object. Always named in singular. Max 256 characters.
|
|
170
|
-
- plural_label: The plural label of the object. Always named in plural. Max 256 characters.
|
|
169
|
+
- singular_label: The singular label of the object. Always named in the singular in title case. Max 256 characters.
|
|
170
|
+
- plural_label: The plural label of the object. Always named in plural in title case. Max 256 characters.
|
|
171
171
|
- build_type: The build type of the object. Valid values are: System, Standard, Solution, Custom, External. You should always use "Custom".
|
|
172
172
|
|
|
173
|
-
- track_activities: Whether the object includes activity tracking. This creates logs of all activities on the data stored in the object. This includes
|
|
173
|
+
- track_activities: Whether the object includes activity tracking. This creates logs of all activities on the data stored in the object. This includes activities like emails/SMS notifications, tasks, and PubSub topics. Should be 1 or 0.
|
|
174
174
|
- track_notes: Whether the object allows for notes and comments from the application's users. This creates a notes section for the object. Should be 1 or 0.
|
|
175
|
-
- track_attachments: Whether the object allows for attachments on the data stored in the object like Files, Images, Videos, etc. Should be 1 or 0. This is typically used when there is a non-standard list of attachments that will be added to the record. Alternatively, a field of type `File` or `Image` can be used to store a single file or image attachment when the use case is for a specific file.
|
|
175
|
+
- track_attachments: Whether the object allows for attachments on the data stored in the object, like Files, Images, Videos, etc. Should be 1 or 0. This is typically used when there is a non-standard list of attachments that will be added to the record. Alternatively, a field of type `File` or `Image` can be used to store a single file or image attachment when the use case is for a specific file.
|
|
176
176
|
- track_favorites: Whether the object allows users to favorite items of the object. Should be 1 or 0.
|
|
177
|
-
- track_tags: Whether the object allows users to tag items of the object. Should
|
|
177
|
+
- track_tags: Whether the object allows users to tag items of the object. This Should always 0.
|
|
178
178
|
- track_audit_trails: Whether field-level changes to records of this object will be included in audit trails. Should be 1 or 0.
|
|
179
179
|
|
|
180
180
|
- object_icon: The icon of the object. This is used to display the object in the UI. Should be a valid icon name from the Font Awesome icon library.
|
|
181
181
|
- icon_color: The color of the object icon. This is used to display the object in the UI. Should be a valid color name or hex code. Max 7 characters.
|
|
182
182
|
- header_color: The color of the object header. This is used to display the object in the UI. Should be a valid color name or hex code. Max 7 characters.
|
|
183
183
|
|
|
184
|
-
- enable_feed: Whether the object is enabled for feed. This creates a user
|
|
185
|
-
- feed_tracking: Whether all changes in the record
|
|
186
|
-
- realtime_update: Whether all changes on the records
|
|
184
|
+
- enable_feed: Whether the object is enabled for feed. This creates a user-facing chat feed for everyone to comment and interact for the records of the object. Should be 1 or 0. This is helpful when different users will want to collaborate on an records in an object by sharing comments.
|
|
185
|
+
- feed_tracking: Whether all changes in the record are logged in the feed. Enable_feed must be true for this to work. Works like audit trails but changes are visible in the feed to anyone who has access to the record. Should be 1 or 0.
|
|
186
|
+
- realtime_update: Whether all changes on the records are updated in real-time. Should be 1 or 0. This should always be 0.
|
|
187
187
|
|
|
188
|
-
- gen_search: Whether the object is searchable by generative search. Should be
|
|
188
|
+
- gen_search: Whether the object is searchable by generative search. Should be 0.
|
|
189
189
|
- document_search: Whether the object is searchable by document search based on the files, images in the object. Should be 1 or 0.
|
|
190
|
-
- generative_search_plus: Whether the object is searchable by generative search plus. This is a more advanced version of generative search. Should be
|
|
190
|
+
- generative_search_plus: Whether the object is searchable by generative search plus. This is a more advanced version of generative search. Should be 0.
|
|
191
191
|
|
|
192
|
-
- record_label_field: This used to show a specific column of a record
|
|
193
|
-
- related_record_label: This is used to
|
|
192
|
+
- record_label_field: This used to show a specific column of a record when this object is used as a REF field when you want a field other than the defined record label on the object. This will typically be an identifier, such as name. This should be the valid UUID of a field that exists in this object. Upon creation, this is typically null which means it will use the standard record label defined on the object.
|
|
193
|
+
- related_record_label: By default this field be null or the plural version of the current objects name in title case. This field is used when there are more than one ref fields on an object referencing the same ref_object. In this case, we need to provide a more specific label. The label is typically the field name and the plural version of the current object in title case. For example, if an object called Transactions had two ref fields that represented the buyer and seller of a transaction, and both fields had a ref_object pointing to the "Contacts" object we would want the related_record_label to be 'Buyer Transactions' and 'Seller Transactions' respectively. This will typically be an identifier, such as name. This should be the valid UUID of a field that exists in this object. Upon creation, this is typically null as no fields exist yet. This should be passed in whenever the `data_type` is REF and the `source_table` is another object.
|
|
194
194
|
|
|
195
195
|
|
|
196
196
|
# Fields
|
|
@@ -241,15 +241,15 @@ FIELDS COLUMNS:
|
|
|
241
241
|
)
|
|
242
242
|
|
|
243
243
|
- build_type: The build type of the field. Should be one of the following: System, Standard, Solution, Custom. You will default to Custom.
|
|
244
|
-
- sequence: The sequence of the field. This is used to
|
|
245
|
-
- key: Defines a field as a key field. Should be 1 or 0.
|
|
244
|
+
- sequence: The sequence of the field. This is used to set the logical order of fields in the object and will be the default ordering for views. Should be an integer. All fields in the object should have a sequence with no gaps in order.
|
|
245
|
+
- key: Defines a field as a key field. Key fields should be unique and will have database indexes to make searching of these fields faster. Should be 1 or 0. All fields where key=1 unique should also = 1
|
|
246
246
|
- unique: Defines a field as a unique field. Should be 1 or 0.
|
|
247
|
-
- show: Defines if the field should be shown in the UI. Should be 1
|
|
248
|
-
- editable: Defines if the field should be editable by
|
|
247
|
+
- show: Defines if the field should be shown in the UI. Should be 1.
|
|
248
|
+
- editable: Defines if the field should be editable by any user. This will override field_permission_set settings. This will almost always be 1. The only exception might be for fields used only by the system that require no user visibility.
|
|
249
249
|
- require: Defines if the field should be required. Should be 1 or 0.
|
|
250
|
-
- search: Defines if the field should be searchable. Should be 1 or 0.
|
|
251
|
-
- audit_trails: Defines if the field should be tracked for audit trails. Should be 1 or 0.
|
|
252
|
-
- encryption: Defines if the contents in the field should be encrypted. Should be
|
|
250
|
+
- search: Defines if the field should be searchable. Should be 1 or 0. Fields that are relatively unique and commonly used to find records (e.g. ssn, ein, duns number, address, serial number, address, order number, case number, company name, last name) should be set to 1.
|
|
251
|
+
- audit_trails: Defines if the field should be tracked for audit trails. Should be 1 or 0. This should be used sparingly and only when changes to the field are commonly used for extremely important to track.
|
|
252
|
+
- encryption: Defines if the contents in the field should be encrypted. Should be 0.
|
|
253
253
|
- auto_increment: Defines if the field should be an auto-increment field. Should be 1 or 0.
|
|
254
254
|
|
|
255
255
|
- placeholder: The placeholder text to show in the input field. Max 128 characters.
|
|
@@ -269,7 +269,7 @@ FIELDS COLUMNS:
|
|
|
269
269
|
- enum_color: Color for the enum field. This is a valid color name or hex code. Max 7 characters.
|
|
270
270
|
|
|
271
271
|
- sort_alphabetically: Whether the field should be sorted alphabetically. Should be 1 or 0. 1 should be default. Set to 0 when the list is small and when it makes more sense to order by importance.
|
|
272
|
-
- allow_other_values: Should the field allow other values. This is for Enum, EnumList data types. Should be 1 or 0. This option means that the user can add new values. This is useful when the list is not fully
|
|
272
|
+
- allow_other_values: Should the field allow other values. This is for Enum, EnumList data types. Should be 1 or 0. This option means that the user can add new values. This is useful when the list is not fully known or when you want to allow the list to be expanded.
|
|
273
273
|
|
|
274
274
|
- yes_value: The value to show for the yes value of the field. Used by data types in (YesNo). Max 256 characters. This is set when there is a more logical word to describe the boolean true value. Yes_value is always set when no_value is set.
|
|
275
275
|
- no_value: The value to show for the no value of the field. Used by data types in (YesNo). Max 256 characters. This is set when there is a more logical word to describe the boolean false value. No_value is always set when yes_value is set.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
PLANNER_EXAMPLES_TEMPLATE = [
|
|
3
3
|
f"""
|
|
4
4
|
<example>
|
|
5
|
-
User: "I need a portal for students to sumbit scholarship applications."
|
|
5
|
+
User: "I need a portal for students to sumbit scholarship applications. "
|
|
6
6
|
|
|
7
7
|
Assistant(thinking): *The user wants a scholarship management solution.
|
|
8
8
|
1. Solution: "Scholarship Management"
|
|
@@ -59,6 +59,7 @@ PLANNER_EXAMPLES_TEMPLATE = [
|
|
|
59
59
|
6. Create Views for Scholarships
|
|
60
60
|
- List View: "All Scholarships" in the "Admin Portal"
|
|
61
61
|
- Card View: "Open Scholarships" in the "Student Portal"
|
|
62
|
+
- Calendar View: "Open Scholarships Calendar" in the "Student Portal"
|
|
62
63
|
- Detail View: "Scholarship Details" in the "Admin Portal"
|
|
63
64
|
- Form View: "Edit Scholarship" in the "Admin Portal"
|
|
64
65
|
- Create View: "New Scholarship" in the "Admin Portal"
|
|
@@ -68,10 +69,14 @@ PLANNER_EXAMPLES_TEMPLATE = [
|
|
|
68
69
|
- Detail View: "Application Details" in the "Admin Portal"
|
|
69
70
|
- List View: "Pending Applications" in the "Admin Portal"
|
|
70
71
|
- List View: "Awarded Applications" in the "Admin Portal"
|
|
72
|
+
- Map View: "Awarded Applications by Location" in the "Admin Portal"
|
|
71
73
|
- List View: "Rejected Applications" in the "Admin Portal"
|
|
72
74
|
- List View: "All Applications" in the "Admin Portal"
|
|
73
|
-
-
|
|
75
|
+
- Deck View: "My Applications" in the "Student Portal"
|
|
74
76
|
8. Create Views for Contacts
|
|
77
|
+
- List View: "Pending Applicants" in the "Admin Portal"
|
|
78
|
+
- List View: "Awarded Applicants" in the "Admin Portal"
|
|
79
|
+
- List View: "Rejected Applicants" in the "Admin Portal"
|
|
75
80
|
- Form View: "Edit Contact" in the "Admin Portal"
|
|
76
81
|
- Detail View: "Contact Details" in the "Admin Portal"
|
|
77
82
|
- Create View: "New Contact" in the "Admin Portal"
|
|
@@ -86,6 +91,10 @@ PLANNER_EXAMPLES_TEMPLATE = [
|
|
|
86
91
|
- Awarded Applications (links to "Awarded Applications" view)
|
|
87
92
|
- Rejected Applications (links to "Rejected Applications" view)
|
|
88
93
|
- All Applications (links to "All Applications" view)
|
|
94
|
+
- Applicants
|
|
95
|
+
- Pending Applications (links to "Pending Applicants" view)
|
|
96
|
+
- Awarded Applications (links to "Awarded Applicants" view)
|
|
97
|
+
- Rejected Applications (links to "Awarded Applicants" view)
|
|
89
98
|
10. Create Menu Navigation for "Student Portal"
|
|
90
99
|
- Top Navigation Bar:
|
|
91
100
|
- Scholarships (links to "Open Scholarships" view)
|
|
@@ -138,14 +147,14 @@ PLANNER_EXAMPLES_TEMPLATE = [
|
|
|
138
147
|
""",
|
|
139
148
|
f"""
|
|
140
149
|
<example>
|
|
141
|
-
User: "I want to create an
|
|
142
|
-
Assistant(thinking): *I am thinking about what
|
|
150
|
+
User: "I want to create an Fishing Permit Application"
|
|
151
|
+
Assistant(thinking): *I am thinking about what a Fishing Permit Application is, what the name
|
|
143
152
|
of the solution and applcation would be and what data would be stored within it, as well as
|
|
144
153
|
what kinda views will show that data. Also need to think about menus and navigations so that
|
|
145
154
|
users can move around within the app easily.*
|
|
146
|
-
Assistant(thinking): *Okay, so I have to create a solution first named "
|
|
155
|
+
Assistant(thinking): *Okay, so I have to create a solution first named "Fisheries Permitting",
|
|
147
156
|
within the solution I have to create two applications named
|
|
148
|
-
"
|
|
157
|
+
"Employee Portal" and "Public Portal".
|
|
149
158
|
After that I have to create objects like Permit, Inspection, etc. I can use the standard Contact as the "Applicant".
|
|
150
159
|
Then I have to create fields for each object. After that I have to create views for each object.
|
|
151
160
|
Finally I have to create menu navigations for the application.*
|
|
@@ -156,7 +165,7 @@ PLANNER_EXAMPLES_TEMPLATE = [
|
|
|
156
165
|
<example>
|
|
157
166
|
User: "I want to create an asset management application for WSDOT"
|
|
158
167
|
Assistant: *Thinks about what an asset management application is and what data would we store within it.*
|
|
159
|
-
Assistant: "Here is the detailed data model for the Asset Management System for
|
|
168
|
+
Assistant: "Here is the detailed data model for the Asset Management System for State of Washington DOT:
|
|
160
169
|
|
|
161
170
|
---
|
|
162
171
|
# Asset Inventory Management
|
|
@@ -330,7 +339,7 @@ Plan to:
|
|
|
330
339
|
3. Create necessary objects and fields to store the required data.
|
|
331
340
|
4. Design views for data interaction.
|
|
332
341
|
5. Set up menus and navigations for easy access.
|
|
333
|
-
|
|
342
|
+
6. Create custom pages for home pages, and to replace important detail views
|
|
334
343
|
|
|
335
344
|
### What you produce
|
|
336
345
|
- A step-by-step plan written in plain text.
|
|
@@ -411,6 +420,7 @@ Snappy must *always* internally plan work in this exact sequence because later e
|
|
|
411
420
|
### **3. Roles**
|
|
412
421
|
- Use existing roles where applicable (Super Admin, Admin, Unauthenticated User)
|
|
413
422
|
- Create custom roles for other personas
|
|
423
|
+
- All custom roles should include the standard user permission set (00000000-0000-0000-0000-000000000002)
|
|
414
424
|
|
|
415
425
|
### **4. Objects**
|
|
416
426
|
- All fields, relationships, views require the object ID
|
|
@@ -426,7 +436,7 @@ The following are key elements that should be considered when planning an object
|
|
|
426
436
|
- track_tags: Whether the object allows users to tag items of the object. Should be 1 or 0.
|
|
427
437
|
- track_audit_trails: Whether field-level changes to records of this object will be included in audit trails. Should be 1 or 0.
|
|
428
438
|
- enable_feed: Whether the object is enabled for feed. This creates a user facing chat feed for everyone to comment and interact for the records of the object. Should be 1 or 0.
|
|
429
|
-
- feed_tracking:
|
|
439
|
+
- feed_tracking: When enabled, changes to associated fields where the field property track_changes is enabled will be displayed in the feed on the record. Enable_feed must be true to use this. Works like track audit-trails. Should be 1 or 0.
|
|
430
440
|
|
|
431
441
|
#### **Standard Objects**
|
|
432
442
|
|
|
@@ -467,7 +477,6 @@ The following are key details to consider when creating a field. When making you
|
|
|
467
477
|
- editable_if: The editable if condition for the field. This is an expression that defines when the field is editable. If the expression evaluates to true, the field is editable. If it evaluates to false, the field is read-only. Always use available tools to build expressions and set it here.
|
|
468
478
|
|
|
469
479
|
|
|
470
|
-
|
|
471
480
|
### **6. Relationships**
|
|
472
481
|
- Only possible after both related objects exist
|
|
473
482
|
- Influence default views and navigation
|
|
@@ -476,18 +485,20 @@ The following are key details to consider when creating a field. When making you
|
|
|
476
485
|
- Use objects + fields + relationships
|
|
477
486
|
- Must incorporate conditional fields, validation logic, and process stage requirements, which are all configured at the field level
|
|
478
487
|
- Can be multi-record or single-record
|
|
479
|
-
- Business logic for filtering multi-record views
|
|
488
|
+
- Business logic for filtering multi-record views
|
|
489
|
+
- Apply {VIEW_TYPE_DETAILS_TEMPLATE} logic to determine the view type
|
|
480
490
|
|
|
481
491
|
### **8. Pages**
|
|
482
492
|
- Can be associated with an object
|
|
483
493
|
- Can include fields and embedded views/pages
|
|
484
494
|
- Must incorporate conditional fields, validation logic, and process stage requirements
|
|
495
|
+
- Pages should follow material design 3 (M3 Expressive) standards
|
|
485
496
|
|
|
486
497
|
Context for Pages:
|
|
487
498
|
- For every application you build, we will need a landing page. It should be modern, clean, rounded corners, minimalistic, and aesthetically pleasing.
|
|
488
499
|
- The landing page should have a hero section, details about the application and important things about it. Also a call to action part.
|
|
489
500
|
|
|
490
|
-
- If the application requires
|
|
501
|
+
- If the application requires monitoring, or admin dashboard, we will need a dashboard page. It should be modern, clean, rounded corners, minimalistic, and aesthetically pleasing.
|
|
491
502
|
- The dashboard page should have details of different metrics and important things about it. It should contain charts, graphs, and other visualizations to represent the data.
|
|
492
503
|
|
|
493
504
|
### **9. Menus, Navigation, Breadcrumbs**
|
|
@@ -525,7 +536,7 @@ Snappy must reject or correct user requests that are impossible due to ordering
|
|
|
525
536
|
Examples:
|
|
526
537
|
|
|
527
538
|
- A view cannot reference a field that does not exist
|
|
528
|
-
- Navigation cannot link to a page not yet created
|
|
539
|
+
- Navigation cannot link to a page or View not yet created
|
|
529
540
|
- An automation cannot reference absent data fields
|
|
530
541
|
|
|
531
542
|
Snappy must correct sequences internally.
|
|
@@ -534,7 +545,7 @@ Snappy must correct sequences internally.
|
|
|
534
545
|
|
|
535
546
|
NOTE: Your behavior must follow the examples provided below.
|
|
536
547
|
|
|
537
|
-
{
|
|
548
|
+
{PLANNER_EXAMPLES}
|
|
538
549
|
|
|
539
550
|
---
|
|
540
551
|
|
|
@@ -19,7 +19,7 @@ class TestBreadcrumbsPrompts:
|
|
|
19
19
|
|
|
20
20
|
def test_breadcrumb_agent_system_prompt_exists(self, aab_prompts):
|
|
21
21
|
"""Test that BREADCRUMB_AGENT_SYSTEM_PROMPT exists and returns content."""
|
|
22
|
-
prompt = aab_prompts.BREADCRUMB_AGENT_SYSTEM_PROMPT
|
|
22
|
+
prompt = aab_prompts.BREADCRUMB_AGENT_SYSTEM_PROMPT
|
|
23
23
|
assert isinstance(prompt, str)
|
|
24
24
|
assert len(prompt) > 0
|
|
25
25
|
assert "SnapApp Breadcrumbs Specialist" in prompt
|
|
@@ -27,7 +27,7 @@ class TestBreadcrumbsPrompts:
|
|
|
27
27
|
|
|
28
28
|
def test_breadcrumb_prompt_contains_required_sections(self, aab_prompts):
|
|
29
29
|
"""Test that breadcrumb prompt contains all required sections."""
|
|
30
|
-
prompt = aab_prompts.BREADCRUMB_AGENT_SYSTEM_PROMPT
|
|
30
|
+
prompt = aab_prompts.BREADCRUMB_AGENT_SYSTEM_PROMPT
|
|
31
31
|
assert "What are Breadcrumbs" in prompt or "breadcrumbs" in prompt.lower()
|
|
32
32
|
assert "When to create" in prompt or "when to create" in prompt.lower()
|
|
33
33
|
assert "Rules for creating" in prompt or "rules" in prompt.lower()
|
|
@@ -35,7 +35,7 @@ class TestBreadcrumbsPrompts:
|
|
|
35
35
|
|
|
36
36
|
def test_breadcrumb_prompt_mentions_key_fields(self, aab_prompts):
|
|
37
37
|
"""Test that breadcrumb prompt mentions key fields."""
|
|
38
|
-
prompt = aab_prompts.BREADCRUMB_AGENT_SYSTEM_PROMPT
|
|
38
|
+
prompt = aab_prompts.BREADCRUMB_AGENT_SYSTEM_PROMPT
|
|
39
39
|
assert "name" in prompt.lower()
|
|
40
40
|
assert "path" in prompt.lower()
|
|
41
41
|
assert "application_id" in prompt.lower() or "application" in prompt.lower()
|
|
@@ -46,14 +46,14 @@ class TestExpressionsPrompts:
|
|
|
46
46
|
|
|
47
47
|
def test_core_expressions_exists(self, aab_prompts):
|
|
48
48
|
"""Test that CORE_EXPRESSIONS exists and returns content."""
|
|
49
|
-
prompt = aab_prompts.CORE_EXPRESSIONS
|
|
49
|
+
prompt = aab_prompts.CORE_EXPRESSIONS
|
|
50
50
|
assert isinstance(prompt, str)
|
|
51
51
|
assert len(prompt) > 0
|
|
52
52
|
assert "Core Expressions" in prompt or "Built in Core Expressions" in prompt
|
|
53
53
|
|
|
54
54
|
def test_core_expressions_contains_all_expressions(self, aab_prompts):
|
|
55
55
|
"""Test that CORE_EXPRESSIONS contains all expressions from constants."""
|
|
56
|
-
prompt = aab_prompts.CORE_EXPRESSIONS
|
|
56
|
+
prompt = aab_prompts.CORE_EXPRESSIONS
|
|
57
57
|
# Check for a sample of expressions
|
|
58
58
|
assert "ABS" in prompt or "ABS()" in prompt
|
|
59
59
|
assert "IF" in prompt or "IF()" in prompt
|
|
@@ -62,7 +62,7 @@ class TestExpressionsPrompts:
|
|
|
62
62
|
|
|
63
63
|
def test_expression_requirements_exists(self, aab_prompts):
|
|
64
64
|
"""Test that EXPRESSION_REQUIREMENTS exists."""
|
|
65
|
-
prompt = aab_prompts.EXPRESSION_REQUIREMENTS
|
|
65
|
+
prompt = aab_prompts.EXPRESSION_REQUIREMENTS
|
|
66
66
|
assert isinstance(prompt, str)
|
|
67
67
|
assert len(prompt) > 0
|
|
68
68
|
assert "Expression Generation" in prompt or "expression" in prompt.lower()
|
|
@@ -71,7 +71,7 @@ class TestExpressionsPrompts:
|
|
|
71
71
|
|
|
72
72
|
def test_expressions_agent_prompt_exists(self, aab_prompts):
|
|
73
73
|
"""Test that EXPRESSIONS_AGENT_PROMPT exists."""
|
|
74
|
-
prompt = aab_prompts.EXPRESSIONS_AGENT_PROMPT
|
|
74
|
+
prompt = aab_prompts.EXPRESSIONS_AGENT_PROMPT
|
|
75
75
|
assert isinstance(prompt, str)
|
|
76
76
|
assert len(prompt) > 0
|
|
77
77
|
assert "Expressions Agent" in prompt
|
|
@@ -79,13 +79,13 @@ class TestExpressionsPrompts:
|
|
|
79
79
|
|
|
80
80
|
def test_expressions_agent_prompt_contains_requirements(self, aab_prompts):
|
|
81
81
|
"""Test that expressions agent prompt contains expression requirements."""
|
|
82
|
-
prompt = aab_prompts.EXPRESSIONS_AGENT_PROMPT
|
|
82
|
+
prompt = aab_prompts.EXPRESSIONS_AGENT_PROMPT
|
|
83
83
|
assert "EXPRESSION_REQUIREMENTS" in prompt or "expression" in prompt.lower()
|
|
84
84
|
assert "CORE_EXPRESSIONS" in prompt or "core expressions" in prompt.lower()
|
|
85
85
|
|
|
86
86
|
def test_show_if_expression_agent_prompt_exists(self, aab_prompts):
|
|
87
87
|
"""Test that SHOW_IF_EXPRESSION_AGENT_PROMPT exists."""
|
|
88
|
-
prompt = aab_prompts.SHOW_IF_EXPRESSION_AGENT_PROMPT
|
|
88
|
+
prompt = aab_prompts.SHOW_IF_EXPRESSION_AGENT_PROMPT
|
|
89
89
|
assert isinstance(prompt, str)
|
|
90
90
|
assert len(prompt) > 0
|
|
91
91
|
assert "Show_If" in prompt or "Show If" in prompt
|
|
@@ -93,7 +93,7 @@ class TestExpressionsPrompts:
|
|
|
93
93
|
|
|
94
94
|
def test_initial_value_examples_exists(self, aab_prompts):
|
|
95
95
|
"""Test that INITIAL_VALUE_EXAMPLES exists."""
|
|
96
|
-
prompt = aab_prompts.INITIAL_VALUE_EXAMPLES
|
|
96
|
+
prompt = aab_prompts.INITIAL_VALUE_EXAMPLES
|
|
97
97
|
assert isinstance(prompt, str)
|
|
98
98
|
assert len(prompt) > 0
|
|
99
99
|
# The prompt contains example scenarios for initial values
|
|
@@ -101,7 +101,7 @@ class TestExpressionsPrompts:
|
|
|
101
101
|
|
|
102
102
|
def test_view_filter_expression_agent_prompt_exists(self, aab_prompts):
|
|
103
103
|
"""Test that VIEW_FILTER_EXPRESSION_AGENT_PROMPT exists."""
|
|
104
|
-
prompt = aab_prompts.VIEW_FILTER_EXPRESSION_AGENT_PROMPT
|
|
104
|
+
prompt = aab_prompts.VIEW_FILTER_EXPRESSION_AGENT_PROMPT
|
|
105
105
|
assert isinstance(prompt, str)
|
|
106
106
|
assert len(prompt) > 0
|
|
107
107
|
assert "View Filter" in prompt
|
|
@@ -109,7 +109,7 @@ class TestExpressionsPrompts:
|
|
|
109
109
|
|
|
110
110
|
def test_fields_expression_agent_prompt_exists(self, aab_prompts):
|
|
111
111
|
"""Test that FIELDS_EXPRESSION_AGENT_PROMPT exists."""
|
|
112
|
-
prompt = aab_prompts.FIELDS_EXPRESSION_AGENT_PROMPT
|
|
112
|
+
prompt = aab_prompts.FIELDS_EXPRESSION_AGENT_PROMPT
|
|
113
113
|
assert isinstance(prompt, str)
|
|
114
114
|
assert len(prompt) > 0
|
|
115
115
|
assert "Fields Expression" in prompt or "Fields" in prompt
|
|
@@ -117,7 +117,7 @@ class TestExpressionsPrompts:
|
|
|
117
117
|
|
|
118
118
|
def test_views_expression_agent_prompt_exists(self, aab_prompts):
|
|
119
119
|
"""Test that VIEWS_EXPRESSION_AGENT_PROMPT exists."""
|
|
120
|
-
prompt = aab_prompts.VIEWS_EXPRESSION_AGENT_PROMPT
|
|
120
|
+
prompt = aab_prompts.VIEWS_EXPRESSION_AGENT_PROMPT
|
|
121
121
|
assert isinstance(prompt, str)
|
|
122
122
|
assert len(prompt) > 0
|
|
123
123
|
assert "Views Expression" in prompt or "Views" in prompt
|
|
@@ -125,7 +125,7 @@ class TestExpressionsPrompts:
|
|
|
125
125
|
|
|
126
126
|
def test_page_data_binder_agent_prompt_exists(self, aab_prompts):
|
|
127
127
|
"""Test that PAGE_DATA_BINDER_AGENT_PROMPT exists."""
|
|
128
|
-
prompt = aab_prompts.PAGE_DATA_BINDER_AGENT_PROMPT
|
|
128
|
+
prompt = aab_prompts.PAGE_DATA_BINDER_AGENT_PROMPT
|
|
129
129
|
assert isinstance(prompt, str)
|
|
130
130
|
assert len(prompt) > 0
|
|
131
131
|
assert "Page Data Binder" in prompt or "data binding" in prompt.lower()
|
|
@@ -137,7 +137,7 @@ class TestMenuNavigationsPrompts:
|
|
|
137
137
|
|
|
138
138
|
def test_menu_navigations_agent_system_prompt_exists(self, aab_prompts):
|
|
139
139
|
"""Test that MENU_NAVIGATIONS_AGENT_SYSTEM_PROMPT exists."""
|
|
140
|
-
prompt = aab_prompts.MENU_NAVIGATIONS_AGENT_SYSTEM_PROMPT
|
|
140
|
+
prompt = aab_prompts.MENU_NAVIGATIONS_AGENT_SYSTEM_PROMPT
|
|
141
141
|
assert isinstance(prompt, str)
|
|
142
142
|
assert len(prompt) > 0
|
|
143
143
|
assert "Menu" in prompt or "Navigation" in prompt
|
|
@@ -145,7 +145,7 @@ class TestMenuNavigationsPrompts:
|
|
|
145
145
|
|
|
146
146
|
def test_menu_navigations_prompt_contains_menu_types(self, aab_prompts):
|
|
147
147
|
"""Test that menu navigations prompt contains menu types."""
|
|
148
|
-
prompt = aab_prompts.MENU_NAVIGATIONS_AGENT_SYSTEM_PROMPT
|
|
148
|
+
prompt = aab_prompts.MENU_NAVIGATIONS_AGENT_SYSTEM_PROMPT
|
|
149
149
|
assert "left" in prompt.lower() or "Left" in prompt
|
|
150
150
|
assert "top" in prompt.lower() or "Top" in prompt
|
|
151
151
|
assert "user" in prompt.lower() or "User" in prompt
|
|
@@ -157,7 +157,7 @@ class TestObjectsFieldsPrompts:
|
|
|
157
157
|
|
|
158
158
|
def test_standard_objects_descriptions_exists(self, aab_prompts):
|
|
159
159
|
"""Test that STANDARD_OBJECTS_DESCRIPTIONS exists."""
|
|
160
|
-
prompt = aab_prompts.STANDARD_OBJECTS_DESCRIPTIONS
|
|
160
|
+
prompt = aab_prompts.STANDARD_OBJECTS_DESCRIPTIONS
|
|
161
161
|
assert isinstance(prompt, str)
|
|
162
162
|
assert len(prompt) > 0
|
|
163
163
|
assert "Activities" in prompt or "activities" in prompt.lower()
|
|
@@ -165,7 +165,7 @@ class TestObjectsFieldsPrompts:
|
|
|
165
165
|
|
|
166
166
|
def test_system_objects_descriptions_exists(self, aab_prompts):
|
|
167
167
|
"""Test that SYSTEM_OBJECTS_DESCRIPTIONS exists."""
|
|
168
|
-
prompt = aab_prompts.SYSTEM_OBJECTS_DESCRIPTIONS
|
|
168
|
+
prompt = aab_prompts.SYSTEM_OBJECTS_DESCRIPTIONS
|
|
169
169
|
assert isinstance(prompt, str)
|
|
170
170
|
assert len(prompt) > 0
|
|
171
171
|
assert "Applications" in prompt or "applications" in prompt.lower()
|
|
@@ -173,7 +173,7 @@ class TestObjectsFieldsPrompts:
|
|
|
173
173
|
|
|
174
174
|
def test_objects_fields_agent_system_prompt_exists(self, aab_prompts):
|
|
175
175
|
"""Test that OBJECTS_FIELDS_AGENT_SYSTEM_PROMPT exists."""
|
|
176
|
-
prompt = aab_prompts.OBJECTS_FIELDS_AGENT_SYSTEM_PROMPT
|
|
176
|
+
prompt = aab_prompts.OBJECTS_FIELDS_AGENT_SYSTEM_PROMPT
|
|
177
177
|
assert isinstance(prompt, str)
|
|
178
178
|
assert len(prompt) > 0
|
|
179
179
|
assert "Objects" in prompt or "Fields" in prompt
|
|
@@ -181,13 +181,13 @@ class TestObjectsFieldsPrompts:
|
|
|
181
181
|
|
|
182
182
|
def test_objects_fields_prompt_contains_restricted_objects(self, aab_prompts):
|
|
183
183
|
"""Test that objects fields prompt contains restricted objects list."""
|
|
184
|
-
prompt = aab_prompts.OBJECTS_FIELDS_AGENT_SYSTEM_PROMPT
|
|
184
|
+
prompt = aab_prompts.OBJECTS_FIELDS_AGENT_SYSTEM_PROMPT
|
|
185
185
|
# Should contain at least some restricted object names
|
|
186
186
|
assert "applications" in prompt.lower() or "objects" in prompt.lower()
|
|
187
187
|
|
|
188
188
|
def test_objects_fields_prompt_contains_schema_info(self, aab_prompts):
|
|
189
189
|
"""Test that objects fields prompt contains schema information."""
|
|
190
|
-
prompt = aab_prompts.OBJECTS_FIELDS_AGENT_SYSTEM_PROMPT
|
|
190
|
+
prompt = aab_prompts.OBJECTS_FIELDS_AGENT_SYSTEM_PROMPT
|
|
191
191
|
assert "table" in prompt.lower() or "schema" in prompt.lower()
|
|
192
192
|
assert "data_type" in prompt.lower() or "data type" in prompt.lower()
|
|
193
193
|
|
|
@@ -197,14 +197,14 @@ class TestPagePlannerPrompts:
|
|
|
197
197
|
|
|
198
198
|
def test_page_planner_agent_system_prompt_exists(self, aab_prompts):
|
|
199
199
|
"""Test that PAGE_PLANNER_AGENT_SYSTEM_PROMPT exists."""
|
|
200
|
-
prompt = aab_prompts.PAGE_PLANNER_AGENT_SYSTEM_PROMPT
|
|
200
|
+
prompt = aab_prompts.PAGE_PLANNER_AGENT_SYSTEM_PROMPT
|
|
201
201
|
assert isinstance(prompt, str)
|
|
202
202
|
assert len(prompt) > 0
|
|
203
203
|
assert "Page Planner" in prompt or "page" in prompt.lower()
|
|
204
204
|
|
|
205
205
|
def test_page_planner_prompt_contains_page_types(self, aab_prompts):
|
|
206
206
|
"""Test that page planner prompt contains page types."""
|
|
207
|
-
prompt = aab_prompts.PAGE_PLANNER_AGENT_SYSTEM_PROMPT
|
|
207
|
+
prompt = aab_prompts.PAGE_PLANNER_AGENT_SYSTEM_PROMPT
|
|
208
208
|
assert "landing_page" in prompt.lower() or "landing" in prompt.lower()
|
|
209
209
|
assert "dashboard" in prompt.lower()
|
|
210
210
|
assert "detail_page" in prompt.lower() or "detail" in prompt.lower()
|
|
@@ -215,7 +215,7 @@ class TestPagesPrompts:
|
|
|
215
215
|
|
|
216
216
|
def test_pages_agent_system_prompt_exists(self, aab_prompts):
|
|
217
217
|
"""Test that PAGES_AGENT_SYSTEM_PROMPT exists."""
|
|
218
|
-
prompt = aab_prompts.PAGES_AGENT_SYSTEM_PROMPT
|
|
218
|
+
prompt = aab_prompts.PAGES_AGENT_SYSTEM_PROMPT
|
|
219
219
|
assert isinstance(prompt, str)
|
|
220
220
|
assert len(prompt) > 0
|
|
221
221
|
assert "Page" in prompt or "page" in prompt.lower()
|
|
@@ -223,7 +223,7 @@ class TestPagesPrompts:
|
|
|
223
223
|
|
|
224
224
|
def test_page_data_binder_exists(self, aab_prompts):
|
|
225
225
|
"""Test that PAGE_DATA_BINDER exists."""
|
|
226
|
-
prompt = aab_prompts.PAGE_DATA_BINDER
|
|
226
|
+
prompt = aab_prompts.PAGE_DATA_BINDER
|
|
227
227
|
assert isinstance(prompt, str)
|
|
228
228
|
assert len(prompt) > 0
|
|
229
229
|
assert "Page Binding" in prompt or "binding" in prompt.lower()
|
|
@@ -235,66 +235,84 @@ class TestPlannerPrompts:
|
|
|
235
235
|
|
|
236
236
|
def test_planner_examples_exists(self, aab_prompts):
|
|
237
237
|
"""Test that PLANNER_EXAMPLES exists."""
|
|
238
|
-
prompt = aab_prompts.PLANNER_EXAMPLES
|
|
238
|
+
prompt = aab_prompts.PLANNER_EXAMPLES
|
|
239
239
|
assert isinstance(prompt, str)
|
|
240
240
|
assert len(prompt) > 0
|
|
241
241
|
|
|
242
242
|
def test_planner_agent_system_prompt_exists(self, aab_prompts):
|
|
243
243
|
"""Test that PLANNER_AGENT_SYSTEM_PROMPT exists."""
|
|
244
|
-
prompt = aab_prompts.PLANNER_AGENT_SYSTEM_PROMPT
|
|
244
|
+
prompt = aab_prompts.PLANNER_AGENT_SYSTEM_PROMPT
|
|
245
245
|
assert isinstance(prompt, str)
|
|
246
246
|
assert len(prompt) > 0
|
|
247
247
|
assert "Planner" in prompt or "plan" in prompt.lower()
|
|
248
248
|
|
|
249
249
|
def test_planner_prompt_contains_build_order(self, aab_prompts):
|
|
250
250
|
"""Test that planner prompt contains build order information."""
|
|
251
|
-
prompt = aab_prompts.PLANNER_AGENT_SYSTEM_PROMPT
|
|
251
|
+
prompt = aab_prompts.PLANNER_AGENT_SYSTEM_PROMPT
|
|
252
252
|
assert "Solution" in prompt or "solution" in prompt.lower()
|
|
253
253
|
assert "Application" in prompt or "application" in prompt.lower()
|
|
254
254
|
assert "Object" in prompt or "object" in prompt.lower()
|
|
255
255
|
|
|
256
256
|
def test_planner_prompt_contains_standard_objects(self, aab_prompts):
|
|
257
257
|
"""Test that planner prompt contains standard objects descriptions."""
|
|
258
|
-
prompt = aab_prompts.PLANNER_AGENT_SYSTEM_PROMPT
|
|
258
|
+
prompt = aab_prompts.PLANNER_AGENT_SYSTEM_PROMPT
|
|
259
259
|
# Should reference standard objects
|
|
260
260
|
assert "STANDARD_OBJECTS_DESCRIPTIONS" in prompt or "standard" in prompt.lower()
|
|
261
261
|
|
|
262
262
|
def test_planner_prompt_contains_system_objects(self, aab_prompts):
|
|
263
263
|
"""Test that planner prompt contains system objects descriptions."""
|
|
264
|
-
prompt = aab_prompts.PLANNER_AGENT_SYSTEM_PROMPT
|
|
264
|
+
prompt = aab_prompts.PLANNER_AGENT_SYSTEM_PROMPT
|
|
265
265
|
# Should reference system objects
|
|
266
266
|
assert "SYSTEM_OBJECTS_DESCRIPTIONS" in prompt or "system" in prompt.lower()
|
|
267
267
|
|
|
268
268
|
def test_planner_prompt_contains_restricted_objects(self, aab_prompts):
|
|
269
269
|
"""Test that planner prompt contains restricted objects list."""
|
|
270
|
-
prompt = aab_prompts.PLANNER_AGENT_SYSTEM_PROMPT
|
|
270
|
+
prompt = aab_prompts.PLANNER_AGENT_SYSTEM_PROMPT
|
|
271
271
|
# Should reference restricted objects
|
|
272
272
|
assert "RESTRICTED_OBJECTS_LIST" in prompt or "reserved" in prompt.lower()
|
|
273
273
|
|
|
274
|
+
def test_planner_prompt_has_view_type_details_substituted(self, aab_prompts):
|
|
275
|
+
"""Test that planner prompt has VIEW_TYPE_DETAILS_TEMPLATE substituted (no raw placeholder)."""
|
|
276
|
+
prompt = aab_prompts.PLANNER_AGENT_SYSTEM_PROMPT
|
|
277
|
+
assert "{VIEW_TYPE_DETAILS_TEMPLATE}" not in prompt, (
|
|
278
|
+
"VIEW_TYPE_DETAILS_TEMPLATE placeholder should be replaced in PLANNER_AGENT_SYSTEM_PROMPT"
|
|
279
|
+
)
|
|
280
|
+
|
|
281
|
+
def test_planner_prompt_contains_view_type_details_content(self, aab_prompts):
|
|
282
|
+
"""Test that planner prompt contains view type details content from VIEW_TYPE_DETAILS."""
|
|
283
|
+
prompt = aab_prompts.PLANNER_AGENT_SYSTEM_PROMPT
|
|
284
|
+
# Content from VIEW_TYPE_DETAILS_TEMPLATE (view types available in SnapApp)
|
|
285
|
+
assert "view type" in prompt.lower() or "view types" in prompt.lower()
|
|
286
|
+
assert (
|
|
287
|
+
"Single Record" in prompt
|
|
288
|
+
or "Multi-Record" in prompt
|
|
289
|
+
or ("list" in prompt.lower() and "detail" in prompt.lower())
|
|
290
|
+
), "Planner prompt should include view type details (e.g. list, detail, Single/Multi-Record)"
|
|
291
|
+
|
|
274
292
|
|
|
275
293
|
class TestRouterPrompts:
|
|
276
294
|
"""Test all router-related prompts."""
|
|
277
295
|
|
|
278
296
|
def test_router_agent_system_prompt_exists(self, aab_prompts):
|
|
279
297
|
"""Test that ROUTER_AGENT_SYSTEM_PROMPT exists."""
|
|
280
|
-
prompt = aab_prompts.ROUTER_AGENT_SYSTEM_PROMPT
|
|
298
|
+
prompt = aab_prompts.ROUTER_AGENT_SYSTEM_PROMPT
|
|
281
299
|
assert isinstance(prompt, str)
|
|
282
300
|
assert len(prompt) > 0
|
|
283
301
|
assert "Router" in prompt or "Snappy" in prompt or "Supervisor" in prompt
|
|
284
302
|
|
|
285
303
|
def test_router_prompt_contains_standard_objects(self, aab_prompts):
|
|
286
304
|
"""Test that router prompt contains standard objects descriptions."""
|
|
287
|
-
prompt = aab_prompts.ROUTER_AGENT_SYSTEM_PROMPT
|
|
305
|
+
prompt = aab_prompts.ROUTER_AGENT_SYSTEM_PROMPT
|
|
288
306
|
assert "STANDARD_OBJECTS_DESCRIPTIONS" in prompt or "standard" in prompt.lower()
|
|
289
307
|
|
|
290
308
|
def test_router_prompt_contains_system_objects(self, aab_prompts):
|
|
291
309
|
"""Test that router prompt contains system objects descriptions."""
|
|
292
|
-
prompt = aab_prompts.ROUTER_AGENT_SYSTEM_PROMPT
|
|
310
|
+
prompt = aab_prompts.ROUTER_AGENT_SYSTEM_PROMPT
|
|
293
311
|
assert "SYSTEM_OBJECTS_DESCRIPTIONS" in prompt or "system" in prompt.lower()
|
|
294
312
|
|
|
295
313
|
def test_router_prompt_contains_planner_examples(self, aab_prompts):
|
|
296
314
|
"""Test that router prompt contains planner examples."""
|
|
297
|
-
prompt = aab_prompts.ROUTER_AGENT_SYSTEM_PROMPT
|
|
315
|
+
prompt = aab_prompts.ROUTER_AGENT_SYSTEM_PROMPT
|
|
298
316
|
assert "PLANNER_EXAMPLES" in prompt or "example" in prompt.lower()
|
|
299
317
|
|
|
300
318
|
|
|
@@ -303,7 +321,7 @@ class TestSolutionsApplicationsPrompts:
|
|
|
303
321
|
|
|
304
322
|
def test_solutions_applications_agent_system_prompt_exists(self, aab_prompts):
|
|
305
323
|
"""Test that SOLUTIONS_APPLICATIONS_AGENT_SYSTEM_PROMPT exists."""
|
|
306
|
-
prompt = aab_prompts.SOLUTIONS_APPLICATIONS_AGENT_SYSTEM_PROMPT
|
|
324
|
+
prompt = aab_prompts.SOLUTIONS_APPLICATIONS_AGENT_SYSTEM_PROMPT
|
|
307
325
|
assert isinstance(prompt, str)
|
|
308
326
|
assert len(prompt) > 0
|
|
309
327
|
assert "Solution" in prompt or "Application" in prompt
|
|
@@ -311,7 +329,7 @@ class TestSolutionsApplicationsPrompts:
|
|
|
311
329
|
|
|
312
330
|
def test_solutions_applications_prompt_contains_default_ids(self, aab_prompts):
|
|
313
331
|
"""Test that solutions applications prompt contains default IDs."""
|
|
314
|
-
prompt = aab_prompts.SOLUTIONS_APPLICATIONS_AGENT_SYSTEM_PROMPT
|
|
332
|
+
prompt = aab_prompts.SOLUTIONS_APPLICATIONS_AGENT_SYSTEM_PROMPT
|
|
315
333
|
assert DEFAULT_SOLUTION_ID in prompt
|
|
316
334
|
assert DEFAULT_APPLICATION_ID in prompt
|
|
317
335
|
|
|
@@ -321,7 +339,7 @@ class TestViewsPrompts:
|
|
|
321
339
|
|
|
322
340
|
def test_view_type_details_exists(self, aab_prompts):
|
|
323
341
|
"""Test that VIEW_TYPE_DETAILS exists."""
|
|
324
|
-
prompt = aab_prompts.VIEW_TYPE_DETAILS
|
|
342
|
+
prompt = aab_prompts.VIEW_TYPE_DETAILS
|
|
325
343
|
assert isinstance(prompt, str)
|
|
326
344
|
assert len(prompt) > 0
|
|
327
345
|
assert "view" in prompt.lower()
|
|
@@ -329,7 +347,7 @@ class TestViewsPrompts:
|
|
|
329
347
|
|
|
330
348
|
def test_common_view_properties_exists(self, aab_prompts):
|
|
331
349
|
"""Test that COMMON_VIEW_PROPERTIES exists."""
|
|
332
|
-
prompt = aab_prompts.COMMON_VIEW_PROPERTIES
|
|
350
|
+
prompt = aab_prompts.COMMON_VIEW_PROPERTIES
|
|
333
351
|
assert isinstance(prompt, str)
|
|
334
352
|
assert len(prompt) > 0
|
|
335
353
|
assert "type" in prompt.lower()
|
|
@@ -337,91 +355,91 @@ class TestViewsPrompts:
|
|
|
337
355
|
|
|
338
356
|
def test_list_view_properties_exists(self, aab_prompts):
|
|
339
357
|
"""Test that LIST_VIEW_PROPERTIES exists."""
|
|
340
|
-
prompt = aab_prompts.LIST_VIEW_PROPERTIES
|
|
358
|
+
prompt = aab_prompts.LIST_VIEW_PROPERTIES
|
|
341
359
|
assert isinstance(prompt, str)
|
|
342
360
|
assert len(prompt) > 0
|
|
343
361
|
assert "list" in prompt.lower() or "inline" in prompt.lower()
|
|
344
362
|
|
|
345
363
|
def test_card_view_properties_exists(self, aab_prompts):
|
|
346
364
|
"""Test that CARD_VIEW_PROPERTIES exists."""
|
|
347
|
-
prompt = aab_prompts.CARD_VIEW_PROPERTIES
|
|
365
|
+
prompt = aab_prompts.CARD_VIEW_PROPERTIES
|
|
348
366
|
assert isinstance(prompt, str)
|
|
349
367
|
assert len(prompt) > 0
|
|
350
368
|
assert "card" in prompt.lower() or "title" in prompt.lower()
|
|
351
369
|
|
|
352
370
|
def test_detail_view_properties_exists(self, aab_prompts):
|
|
353
371
|
"""Test that DETAIL_VIEW_PROPERTIES exists."""
|
|
354
|
-
prompt = aab_prompts.DETAIL_VIEW_PROPERTIES
|
|
372
|
+
prompt = aab_prompts.DETAIL_VIEW_PROPERTIES
|
|
355
373
|
assert isinstance(prompt, str)
|
|
356
374
|
assert len(prompt) > 0
|
|
357
375
|
assert "detail" in prompt.lower() or "feed" in prompt.lower()
|
|
358
376
|
|
|
359
377
|
def test_create_view_properties_exists(self, aab_prompts):
|
|
360
378
|
"""Test that CREATE_VIEW_PROPERTIES exists."""
|
|
361
|
-
prompt = aab_prompts.CREATE_VIEW_PROPERTIES
|
|
379
|
+
prompt = aab_prompts.CREATE_VIEW_PROPERTIES
|
|
362
380
|
assert isinstance(prompt, str)
|
|
363
381
|
assert len(prompt) > 0
|
|
364
382
|
assert "create" in prompt.lower() or "recaptcha" in prompt.lower()
|
|
365
383
|
|
|
366
384
|
def test_map_view_properties_exists(self, aab_prompts):
|
|
367
385
|
"""Test that MAP_VIEW_PROPERTIES exists."""
|
|
368
|
-
prompt = aab_prompts.MAP_VIEW_PROPERTIES
|
|
386
|
+
prompt = aab_prompts.MAP_VIEW_PROPERTIES
|
|
369
387
|
assert isinstance(prompt, str)
|
|
370
388
|
assert len(prompt) > 0
|
|
371
389
|
assert "map" in prompt.lower() or "address" in prompt.lower()
|
|
372
390
|
|
|
373
391
|
def test_calendar_view_properties_exists(self, aab_prompts):
|
|
374
392
|
"""Test that CALENDAR_VIEW_PROPERTIES exists."""
|
|
375
|
-
prompt = aab_prompts.CALENDAR_VIEW_PROPERTIES
|
|
393
|
+
prompt = aab_prompts.CALENDAR_VIEW_PROPERTIES
|
|
376
394
|
assert isinstance(prompt, str)
|
|
377
395
|
assert len(prompt) > 0
|
|
378
396
|
assert "calendar" in prompt.lower() or "date" in prompt.lower()
|
|
379
397
|
|
|
380
398
|
def test_deck_view_properties_exists(self, aab_prompts):
|
|
381
399
|
"""Test that DECK_VIEW_PROPERTIES exists."""
|
|
382
|
-
prompt = aab_prompts.DECK_VIEW_PROPERTIES
|
|
400
|
+
prompt = aab_prompts.DECK_VIEW_PROPERTIES
|
|
383
401
|
assert isinstance(prompt, str)
|
|
384
402
|
assert len(prompt) > 0
|
|
385
403
|
assert "deck" in prompt.lower() or "badge" in prompt.lower()
|
|
386
404
|
|
|
387
405
|
def test_view_links_properties_exists(self, aab_prompts):
|
|
388
406
|
"""Test that VIEW_LINKS_PROPERTIES exists."""
|
|
389
|
-
prompt = aab_prompts.VIEW_LINKS_PROPERTIES
|
|
407
|
+
prompt = aab_prompts.VIEW_LINKS_PROPERTIES
|
|
390
408
|
assert isinstance(prompt, str)
|
|
391
409
|
assert len(prompt) > 0
|
|
392
410
|
assert "view link" in prompt.lower() or "button" in prompt.lower()
|
|
393
411
|
|
|
394
412
|
def test_view_filters_properties_exists(self, aab_prompts):
|
|
395
413
|
"""Test that VIEW_FILTERS_PROPERTIES exists."""
|
|
396
|
-
prompt = aab_prompts.VIEW_FILTERS_PROPERTIES
|
|
414
|
+
prompt = aab_prompts.VIEW_FILTERS_PROPERTIES
|
|
397
415
|
assert isinstance(prompt, str)
|
|
398
416
|
assert len(prompt) > 0
|
|
399
417
|
assert "filter" in prompt.lower() or "condition" in prompt.lower()
|
|
400
418
|
|
|
401
419
|
def test_views_agent_system_prompt_exists(self, aab_prompts):
|
|
402
420
|
"""Test that VIEWS_AGENT_SYSTEM_PROMPT exists."""
|
|
403
|
-
prompt = aab_prompts.VIEWS_AGENT_SYSTEM_PROMPT
|
|
421
|
+
prompt = aab_prompts.VIEWS_AGENT_SYSTEM_PROMPT
|
|
404
422
|
assert isinstance(prompt, str)
|
|
405
423
|
assert len(prompt) > 0
|
|
406
424
|
assert "Views" in prompt or "view" in prompt.lower()
|
|
407
425
|
|
|
408
426
|
def test_views_planner_agent_system_prompt_exists(self, aab_prompts):
|
|
409
427
|
"""Test that VIEWS_PLANNER_AGENT_SYSTEM_PROMPT exists."""
|
|
410
|
-
prompt = aab_prompts.VIEWS_PLANNER_AGENT_SYSTEM_PROMPT
|
|
428
|
+
prompt = aab_prompts.VIEWS_PLANNER_AGENT_SYSTEM_PROMPT
|
|
411
429
|
assert isinstance(prompt, str)
|
|
412
430
|
assert len(prompt) > 0
|
|
413
431
|
assert "View Planner" in prompt or "planner" in prompt.lower()
|
|
414
432
|
|
|
415
433
|
def test_view_links_planner_prompt_exists(self, aab_prompts):
|
|
416
434
|
"""Test that VIEW_LINKS_PLANNER_PROMPT exists."""
|
|
417
|
-
prompt = aab_prompts.VIEW_LINKS_PLANNER_PROMPT
|
|
435
|
+
prompt = aab_prompts.VIEW_LINKS_PLANNER_PROMPT
|
|
418
436
|
assert isinstance(prompt, str)
|
|
419
437
|
assert len(prompt) > 0
|
|
420
438
|
assert "View Link" in prompt or "view link" in prompt.lower()
|
|
421
439
|
|
|
422
440
|
def test_view_filter_planner_prompt_exists(self, aab_prompts):
|
|
423
441
|
"""Test that VIEW_FILTER_PLANNER_PROMPT exists."""
|
|
424
|
-
prompt = aab_prompts.VIEW_FILTER_PLANNER_PROMPT
|
|
442
|
+
prompt = aab_prompts.VIEW_FILTER_PLANNER_PROMPT
|
|
425
443
|
assert isinstance(prompt, str)
|
|
426
444
|
assert len(prompt) > 0
|
|
427
445
|
assert "View Filter" in prompt or "filter" in prompt.lower()
|
|
@@ -550,7 +568,7 @@ class TestPromptQuality:
|
|
|
550
568
|
for method_name in all_methods:
|
|
551
569
|
if hasattr(aab_prompts, method_name):
|
|
552
570
|
method = getattr(aab_prompts, method_name)
|
|
553
|
-
prompt = method
|
|
571
|
+
prompt = method
|
|
554
572
|
assert len(prompt) <= max_length, f"{method_name} is too long ({len(prompt)} chars)"
|
|
555
573
|
|
|
556
574
|
def test_prompts_are_not_empty(self, aab_prompts):
|
|
@@ -575,7 +593,7 @@ class TestPromptQuality:
|
|
|
575
593
|
for method_name in all_methods:
|
|
576
594
|
if hasattr(aab_prompts, method_name):
|
|
577
595
|
method = getattr(aab_prompts, method_name)
|
|
578
|
-
prompt = method
|
|
596
|
+
prompt = method
|
|
579
597
|
assert len(prompt.strip()) > 0, f"{method_name} is empty"
|
|
580
598
|
|
|
581
599
|
def test_prompts_have_no_obvious_formatting_errors(self, aab_prompts):
|
|
@@ -596,12 +614,12 @@ class TestPromptQuality:
|
|
|
596
614
|
for method_name in all_methods:
|
|
597
615
|
if hasattr(aab_prompts, method_name):
|
|
598
616
|
method = getattr(aab_prompts, method_name)
|
|
599
|
-
prompt = method
|
|
617
|
+
prompt = method
|
|
600
618
|
# Check for common formatting issues
|
|
601
619
|
# Note: Some prompts may have intentional braces in code examples, so we check for unreplaced template placeholders instead
|
|
602
620
|
# Check for placeholder format strings that weren't replaced (double braces that should have been single)
|
|
603
621
|
# Template variables should be {VAR} not {{VAR}} after formatting
|
|
604
|
-
unreplaced_placeholders = [m for m in ["{EXPRESSION_REQUIREMENTS}", "{CORE_EXPRESSIONS}", "{STANDARD_OBJECTS_DESCRIPTIONS}", "{SYSTEM_OBJECTS_DESCRIPTIONS}", "{RESTRICTED_OBJECTS_LIST}", "{PLANNER_EXAMPLES}", "{VIEW_TYPE_DETAILS}", "{COMMON_VIEW_PROPERTIES}", "{LIST_VIEW_PROPERTIES}", "{CARD_VIEW_PROPERTIES}", "{DETAIL_VIEW_PROPERTIES}", "{CREATE_VIEW_PROPERTIES}", "{MAP_VIEW_PROPERTIES}", "{CALENDAR_VIEW_PROPERTIES}", "{DECK_VIEW_PROPERTIES}", "{VIEW_LINKS_PROPERTIES}", "{VIEW_FILTERS_PROPERTIES}"] if m in prompt]
|
|
622
|
+
unreplaced_placeholders = [m for m in ["{EXPRESSION_REQUIREMENTS}", "{CORE_EXPRESSIONS}", "{STANDARD_OBJECTS_DESCRIPTIONS}", "{SYSTEM_OBJECTS_DESCRIPTIONS}", "{RESTRICTED_OBJECTS_LIST}", "{PLANNER_EXAMPLES}", "{VIEW_TYPE_DETAILS}", "{VIEW_TYPE_DETAILS_TEMPLATE}", "{COMMON_VIEW_PROPERTIES}", "{LIST_VIEW_PROPERTIES}", "{CARD_VIEW_PROPERTIES}", "{DETAIL_VIEW_PROPERTIES}", "{CREATE_VIEW_PROPERTIES}", "{MAP_VIEW_PROPERTIES}", "{CALENDAR_VIEW_PROPERTIES}", "{DECK_VIEW_PROPERTIES}", "{VIEW_LINKS_PROPERTIES}", "{VIEW_FILTERS_PROPERTIES}"] if m in prompt]
|
|
605
623
|
if unreplaced_placeholders:
|
|
606
624
|
# This is OK - some prompts may intentionally show template structure
|
|
607
625
|
pass
|
|
@@ -613,12 +631,12 @@ class TestPromptIntegration:
|
|
|
613
631
|
def test_expression_prompts_reference_core_expressions(self, aab_prompts):
|
|
614
632
|
"""Test that expression-related prompts reference core expressions."""
|
|
615
633
|
expression_prompts = [
|
|
616
|
-
aab_prompts.EXPRESSIONS_AGENT_PROMPT
|
|
617
|
-
aab_prompts.SHOW_IF_EXPRESSION_AGENT_PROMPT
|
|
618
|
-
aab_prompts.VIEW_FILTER_EXPRESSION_AGENT_PROMPT
|
|
619
|
-
aab_prompts.FIELDS_EXPRESSION_AGENT_PROMPT
|
|
620
|
-
aab_prompts.VIEWS_EXPRESSION_AGENT_PROMPT
|
|
621
|
-
aab_prompts.PAGE_DATA_BINDER_AGENT_PROMPT
|
|
634
|
+
aab_prompts.EXPRESSIONS_AGENT_PROMPT,
|
|
635
|
+
aab_prompts.SHOW_IF_EXPRESSION_AGENT_PROMPT,
|
|
636
|
+
aab_prompts.VIEW_FILTER_EXPRESSION_AGENT_PROMPT,
|
|
637
|
+
aab_prompts.FIELDS_EXPRESSION_AGENT_PROMPT,
|
|
638
|
+
aab_prompts.VIEWS_EXPRESSION_AGENT_PROMPT,
|
|
639
|
+
aab_prompts.PAGE_DATA_BINDER_AGENT_PROMPT,
|
|
622
640
|
]
|
|
623
641
|
|
|
624
642
|
for prompt in expression_prompts:
|
|
@@ -627,15 +645,18 @@ class TestPromptIntegration:
|
|
|
627
645
|
|
|
628
646
|
def test_planner_prompt_integrates_components(self, aab_prompts):
|
|
629
647
|
"""Test that planner prompt integrates all necessary components."""
|
|
630
|
-
prompt = aab_prompts.PLANNER_AGENT_SYSTEM_PROMPT
|
|
648
|
+
prompt = aab_prompts.PLANNER_AGENT_SYSTEM_PROMPT
|
|
631
649
|
# Should reference standard objects, system objects, and restricted objects
|
|
632
650
|
assert "STANDARD_OBJECTS_DESCRIPTIONS" in prompt or "standard" in prompt.lower()
|
|
633
651
|
assert "SYSTEM_OBJECTS_DESCRIPTIONS" in prompt or "system" in prompt.lower()
|
|
634
652
|
assert "RESTRICTED_OBJECTS_LIST" in prompt or "reserved" in prompt.lower()
|
|
653
|
+
# VIEW_TYPE_DETAILS_TEMPLATE should be substituted (view type logic for determining view type)
|
|
654
|
+
assert "{VIEW_TYPE_DETAILS_TEMPLATE}" not in prompt
|
|
655
|
+
assert "view type" in prompt.lower() or "list" in prompt.lower() or "detail" in prompt.lower()
|
|
635
656
|
|
|
636
657
|
def test_router_prompt_integrates_components(self, aab_prompts):
|
|
637
658
|
"""Test that router prompt integrates all necessary components."""
|
|
638
|
-
prompt = aab_prompts.ROUTER_AGENT_SYSTEM_PROMPT
|
|
659
|
+
prompt = aab_prompts.ROUTER_AGENT_SYSTEM_PROMPT
|
|
639
660
|
# Should reference standard objects, system objects, and planner examples
|
|
640
661
|
assert "STANDARD_OBJECTS_DESCRIPTIONS" in prompt or "standard" in prompt.lower()
|
|
641
662
|
assert "SYSTEM_OBJECTS_DESCRIPTIONS" in prompt or "system" in prompt.lower()
|
|
@@ -643,14 +664,14 @@ class TestPromptIntegration:
|
|
|
643
664
|
|
|
644
665
|
def test_views_prompt_integrates_view_properties(self, aab_prompts):
|
|
645
666
|
"""Test that views prompt integrates view property templates."""
|
|
646
|
-
prompt = aab_prompts.VIEWS_AGENT_SYSTEM_PROMPT
|
|
667
|
+
prompt = aab_prompts.VIEWS_AGENT_SYSTEM_PROMPT
|
|
647
668
|
# Should contain view type details and properties (already formatted)
|
|
648
669
|
assert "view type" in prompt.lower() or "list" in prompt.lower() or "detail" in prompt.lower()
|
|
649
670
|
assert "property" in prompt.lower() or "object_id" in prompt.lower() or "type" in prompt.lower()
|
|
650
671
|
|
|
651
672
|
def test_views_planner_prompt_integrates_all_properties(self, aab_prompts):
|
|
652
673
|
"""Test that views planner prompt integrates all view properties."""
|
|
653
|
-
prompt = aab_prompts.VIEWS_PLANNER_AGENT_SYSTEM_PROMPT
|
|
674
|
+
prompt = aab_prompts.VIEWS_PLANNER_AGENT_SYSTEM_PROMPT
|
|
654
675
|
# Should contain all view property content (already formatted)
|
|
655
676
|
assert "view type" in prompt.lower() or "list" in prompt.lower() or "detail" in prompt.lower()
|
|
656
677
|
assert "property" in prompt.lower() or "object_id" in prompt.lower()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|