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
**Task**: Analyze the user's request and the provided JSON schema to clearly map the desired data extraction.\n
76
-
Break down the user's request into key components, and then explicitly connect these components to the
77
-
corresponding elements within the JSON schema.
75
+
**Task**: Analyze the user's request and the provided JSON schema to guide an LLM in extracting information directly from HTML.
78
76
79
77
**User's Request**:
80
78
{user_input}
81
79
82
-
**Desired JSON Output Schema**:
80
+
**Target JSON Schema**:
83
81
```json
84
82
{json_schema}
85
83
```
86
84
87
85
**Analysis Instructions**:
88
-
1. **Break Down User Request:**
89
-
* Clearly identify the core entities or data types the user is asking for.\n
90
-
* Highlight any specific attributes or relationships mentioned in the request.\n
86
+
1. **Interpret User Request:**
87
+
* Identify the key information types or entities the user is seeking.
88
+
* Note any specific attributes, relationships, or constraints mentioned.
91
89
92
90
2. **Map to JSON Schema**:
93
-
* For each identified element in the user request, pinpoint its exact counterpart in the JSON schema.\n
94
-
* Explain how the schema structure accommodates the user's needs.
95
-
* If applicable, mention any schema elements that are not directly addressed in the user's request.\n
91
+
* For each identified element in the user request, locate its corresponding field in the JSON schema.
92
+
* Explain how the schema structure represents the requested information.
93
+
* Highlight any relevant schema elements not explicitly mentioned in the user's request.
96
94
97
-
This analysis will be used to guide the HTML structure examination and ultimately inform the code generation process.\n
98
-
Please generate only the analysis and no other text.
95
+
3. **Data Transformation Guidance**:
96
+
* Provide guidance on any necessary transformations to align extracted data with the JSON schema requirements.
99
97
100
-
**Response**:
98
+
This analysis will be used to instruct an LLM that has the HTML content in its context. The LLM will use this guidance to extract the information and return it directly in the specified JSON format.
99
+
100
+
**Reasoning Output**:
101
+
[Your detailed analysis based on the above instructions]
101
102
"""
102
103
103
104
TEMPLATE_REASONING_WITH_CONTEXT="""
104
-
**Task**: Analyze the user's request, the provided JSON schema, and the additional context the user provided to clearly map the desired data extraction.\n
105
-
Break down the user's request into key components, and then explicitly connect these components to the corresponding elements within the JSON schema.\n
105
+
**Task**: Analyze the user's request, provided JSON schema, and additional context to guide an LLM in extracting information directly from HTML.
* Clearly identify the core entities or data types the user is asking for.\n
121
-
* Highlight any specific attributes or relationships mentioned in the request.\n
119
+
1. **Interpret User Request and Context:**
120
+
* Identify the key information types or entities the user is seeking.
121
+
* Note any specific attributes, relationships, or constraints mentioned.
122
+
* Incorporate insights from the additional context to refine understanding of the task.
122
123
123
124
2. **Map to JSON Schema**:
124
-
* For each identified element in the user request, pinpoint its exact counterpart in the JSON schema.\n
125
-
* Explain how the schema structure accommodates the user's needs.\n
126
-
* If applicable, mention any schema elements that are not directly addressed in the user's request.\n
125
+
* For each identified element in the user request, locate its corresponding field in the JSON schema.
126
+
* Explain how the schema structure represents the requested information.
127
+
* Highlight any relevant schema elements not explicitly mentioned in the user's request.
128
+
129
+
3. **Extraction Strategy**:
130
+
* Based on the additional context, suggest specific strategies for locating and extracting the required information from the HTML.
131
+
* Highlight any potential challenges or special considerations mentioned in the context.
132
+
133
+
4. **Data Transformation Guidance**:
134
+
* Provide guidance on any necessary transformations to align extracted data with the JSON schema requirements.
135
+
* Note any special formatting, validation, or business logic considerations from the additional context.
127
136
128
-
This analysis will be used to guide the HTML structure examination and ultimately inform the code generation process.\n
129
-
Please generate only the analysis and no other text.
137
+
This analysis will be used to instruct an LLM that has the HTML content in its context. The LLM will use this guidance to extract the information and return it directly in the specified JSON format.
130
138
131
-
**Response**:
139
+
**Reasoning Output**:
140
+
[Your detailed analysis based on the above instructions, incorporating insights from the additional context]
0 commit comments