Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -224,18 +224,20 @@ def build_interface():
|
|
224 |
Constructs the Gradio interface with a submission button and single-submission mechanism.
|
225 |
"""
|
226 |
with gr.Blocks() as demo:
|
227 |
-
gr.Markdown("# System Prompt
|
228 |
gr.Markdown("## Document and Clause Level Classification")
|
229 |
# General description
|
230 |
gr.Markdown("""
|
231 |
-
Applicants must create a system prompt for a language model that classifies user
|
232 |
1. **Document Level**: Determines whether the query refers to a single document or multiple documents.
|
233 |
2. **Clause Level**: Identifies whether the query is focused on:
|
234 |
- A single clause,
|
235 |
- Multiple clauses, or
|
236 |
-
- General information not constrained to any specific clause.
|
|
|
|
|
237 |
|
238 |
-
|
239 |
|
240 |
```
|
241 |
{
|
@@ -248,7 +250,7 @@ def build_interface():
|
|
248 |
""")
|
249 |
|
250 |
# Example Inputs and Outputs in an Accordion
|
251 |
-
with gr.Accordion("
|
252 |
gr.Markdown("""
|
253 |
1. **User Message Example 1:**
|
254 |
- *"Please provide the contract for the lease agreement."*
|
@@ -301,7 +303,7 @@ def build_interface():
|
|
301 |
""")
|
302 |
|
303 |
# Challenge instructions in another Accordion
|
304 |
-
with gr.Accordion("
|
305 |
gr.Markdown("""
|
306 |
- Design a system prompt that ensures gpt4o-mini generates outputs like those above when given similar user messages.
|
307 |
|
|
|
224 |
Constructs the Gradio interface with a submission button and single-submission mechanism.
|
225 |
"""
|
226 |
with gr.Blocks() as demo:
|
227 |
+
gr.Markdown("# Applicant Task: Writing a System Prompt")
|
228 |
gr.Markdown("## Document and Clause Level Classification")
|
229 |
# General description
|
230 |
gr.Markdown("""
|
231 |
+
Applicants must create a system prompt for a language model that classifies user requests about finding information into two specific categories:
|
232 |
1. **Document Level**: Determines whether the query refers to a single document or multiple documents.
|
233 |
2. **Clause Level**: Identifies whether the query is focused on:
|
234 |
- A single clause,
|
235 |
- Multiple clauses, or
|
236 |
+
- General information not constrained to any specific clause.
|
237 |
+
|
238 |
+
Imagine the user is a legal professional who is trying to find information related to their work. We need this classification to guide our downstream approach on how to retrieve this information.
|
239 |
|
240 |
+
That's why the model must return a valid JSON object with the following structure:
|
241 |
|
242 |
```
|
243 |
{
|
|
|
250 |
""")
|
251 |
|
252 |
# Example Inputs and Outputs in an Accordion
|
253 |
+
with gr.Accordion("Example Inputs and Expected Outputs", open=False):
|
254 |
gr.Markdown("""
|
255 |
1. **User Message Example 1:**
|
256 |
- *"Please provide the contract for the lease agreement."*
|
|
|
303 |
""")
|
304 |
|
305 |
# Challenge instructions in another Accordion
|
306 |
+
with gr.Accordion("Task Instructions", open=False):
|
307 |
gr.Markdown("""
|
308 |
- Design a system prompt that ensures gpt4o-mini generates outputs like those above when given similar user messages.
|
309 |
|