Timothy-Vinzent commited on
Commit
fe3703e
·
verified ·
1 Parent(s): c1cd0b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +87 -2
app.py CHANGED
@@ -143,13 +143,98 @@ def build_interface():
143
 
144
  The model must return a valid JSON object with the following structure:
145
 
146
- json```
147
  {
148
  "document_level": "single/multiple",
149
  "clause_level": "single/multiple/general"
150
  }```
 
151
  The goal is to ensure that the model's output is concise, structured, and accurate. This task is designed to evaluate the robustness of the system prompt in handling classification tasks with short, precise outputs.
152
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  """)
154
  gr.Markdown(
155
  "Please enter your details and submit your system prompt below. "
 
143
 
144
  The model must return a valid JSON object with the following structure:
145
 
146
+ ```
147
  {
148
  "document_level": "single/multiple",
149
  "clause_level": "single/multiple/general"
150
  }```
151
+
152
  The goal is to ensure that the model's output is concise, structured, and accurate. This task is designed to evaluate the robustness of the system prompt in handling classification tasks with short, precise outputs.
153
+
154
+
155
+ **Example Inputs and Expected Outputs**
156
+
157
+ 1. **User Message Example 1:**
158
+
159
+ - *"Please provide the contract for the lease agreement."*
160
+
161
+ - **Expected Output:**
162
+
163
+
164
+ ```{"document_level": "single", "clause_level": "general"}```
165
+
166
+ 2. **User Message Example 2:**
167
+
168
+ - *"I need all clauses related to termination in the employment contract."*
169
+
170
+ - **Expected Output:**
171
+
172
+
173
+ ```{"document_level": "single", "clause_level": "multiple"}```
174
+
175
+ 3. **User Message Example 3:**
176
+
177
+ - *"Can you send me the financial reports and the partnership agreement?"*
178
+
179
+ - **Expected Output:**
180
+
181
+
182
+ ```{"document_level": "multiple", "clause_level": "general"}```
183
+
184
+ 4. **User Message Example 4:**
185
+
186
+ - *"What are the key clauses in the NDA?"*
187
+
188
+ - **Expected Output:**
189
+
190
+
191
+ ```{"document_level": "single", "clause_level": "multiple"}```
192
+
193
+ 5. **User Message Example 5:**
194
+
195
+ - *"Tell me about the company’s financials."*
196
+
197
+ - **Expected Output:**
198
+
199
+
200
+ ```{"document_level": "single", "clause_level": "general"}```
201
+
202
+ 6. **User Message Example 6:**
203
+
204
+ - *"Provide all contracts and their confidentiality clauses."*
205
+
206
+ - **Expected Output:**
207
+
208
+
209
+ ```{"document_level": "multiple", "clause_level": "multiple"}```
210
+
211
+ 7. **User Message Example 7:**
212
+
213
+ - *"Extract the arbitration clause from this service agreement."*
214
+
215
+ - **Expected Output:**
216
+
217
+
218
+ ```{"document_level": "single", "clause_level": "single"}```
219
+
220
+ **Challenge Instructions**
221
+ - Design a system prompt that ensures the AI generates outputs like those above when given similar user messages.
222
+
223
+ - The system prompt should:
224
+
225
+ 1. Specify formatting requirements (e.g., "Output must be a valid JSON object"), not that we are not using constrained decoding or any sort of JSON mode, if not correctly prompted the llm will output plain text.
226
+
227
+ 2. Emphasize strict adherence to classification definitions:
228
+
229
+ - *Single Document:* Refers to one document.
230
+
231
+ - *Multiple Documents:* Refers to more than one document.
232
+
233
+ - *Single Clause:* Refers to one specific clause.
234
+
235
+ - *Multiple Clauses:* Refers to more than one specific clause.
236
+
237
+ - *General Information:* Refers to general content not tied to specific clauses.
238
  """)
239
  gr.Markdown(
240
  "Please enter your details and submit your system prompt below. "