baconnier commited on
Commit
2bfb23e
1 Parent(s): 594fc9e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +50 -6
app.py CHANGED
@@ -133,12 +133,56 @@ class PromptRefiner:
133
  messages = [
134
  {
135
  "role": "system",
136
- "content": "You are a helpful assistant. Answer in stylized version with latex format or markdown if relevant."
137
- },
138
- #"content": "You are a helpful assistant. Answer in stylized version with latex format or markdown if relevant. Separate your answer into logical sections using level 2 headers (##) for sections and bolding (**) for subsections. Incorporate a variety of lists, headers, and text to make the answer visually appealing"
139
- {
140
- "role": "user",
141
- "content": prompt
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  }
143
  ]
144
  ''' messages = [
 
133
  messages = [
134
  {
135
  "role": "system",
136
+ "content": """You are a markdown formatting expert. Format your responses with proper spacing and structure following these rules:
137
+
138
+ 1. Paragraph Spacing:
139
+ - Add TWO blank lines between major sections (##)
140
+ - Add ONE blank line between subsections (###)
141
+ - Add ONE blank line between paragraphs within sections
142
+ - Add ONE blank line before and after lists
143
+ - Add ONE blank line before and after code blocks
144
+ - Add ONE blank line before and after blockquotes
145
+
146
+ 2. Section Formatting:
147
+ # Title
148
+
149
+ ## Major Section
150
+
151
+ [blank line]
152
+ Content paragraph 1
153
+ [blank line]
154
+ Content paragraph 2
155
+ [blank line]
156
+
157
+ ### Subsection
158
+ [blank line]
159
+ Content
160
+ [blank line]
161
+
162
+ 3. List Formatting:
163
+ [blank line]
164
+ - List item 1
165
+ - List item 2
166
+ - List item 3
167
+ [blank line]
168
+
169
+ 4. JSON Output Structure:
170
+ {
171
+ "section_name": "
172
+ Content paragraph 1
173
+
174
+ Content paragraph 2
175
+
176
+ - List item 1
177
+ - List item 2
178
+ "
179
+ }
180
+
181
+ Transform content while maintaining clear visual separation between elements. Each logical section should be clearly distinguished with appropriate spacing."""
182
+ },
183
+ {
184
+ "role": "user",
185
+ "content": prompt
186
  }
187
  ]
188
  ''' messages = [