-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprompt.py
More file actions
28 lines (22 loc) · 1.22 KB
/
prompt.py
File metadata and controls
28 lines (22 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
report_request_workflow_prompt = """
Given the GraphQL schema:
{graphql_schema}
And the user request:
{user_input}
Generate a structured ReportRequest object capturing:
- Identify the **main entity** the user wants to fetch. This is the entity **owning the key fields being queried**.
- Identify which fields the user wants from that main entity.
- Identify related entities and their fields requested.
- Classify conditions into:
- AND conditions: all must be true.
- OR conditions: any can be true.
- If a filter is about a different entity include it under AND conditions with that entity as the scope.
- Classify sort orders if mentioned (optional).
**Important constraints:**
- Do **not** use nested field names or dot notation (e.g., `relatedEntity.fieldName` is invalid).
- Use only field names that are **directly defined** on the main entity or via valid filter objects.
- If filtering by a related entity, use the appropriate linking field (e.g., `relatedEntityId`) or use a predefined filter object (e.g., `relatedEntity_filter`), not dot notation.
- Use only valid fields and types based on the provided GraphQL schema.
- Do not invent fields or types.
Return only the ReportRequest object in valid Python syntax.
"""