Guiyom commited on
Commit
c5b93e3
·
verified ·
1 Parent(s): 7681ebc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -4
app.py CHANGED
@@ -1189,21 +1189,39 @@ Only output valid JSON.
1189
 
1190
  # --- Modified prompt: focus only on the container / snippet.
1191
  prompt_adjust = (f"""
1192
- You are a technical editor.
1193
- Using only the following container snippet (including its outer HTML tags), produce an expanded version by adding one or two paragraphs containing additional relevant details.
1194
- DO NOT output the full report; output only the updated snippet.
 
 
 
 
1195
 
 
 
 
 
 
 
 
 
 
 
 
 
1196
  - Original Container to Adjust:
1197
  {original_container_html}
1198
 
1199
  - Full User Expansion Request:
1200
  {expansion_request}
1201
 
1202
- Additional Guidance:
1203
  - Target Style: {target_style}
1204
  - Complementary Guidance: {complementary_guidance}
1205
  - Preserve inline citations (formatted as [x]); if new citations are added, list them separately in "newref".
 
1206
 
 
1207
  Output a JSON object with exactly three keys:
1208
  "result": the expanded container's HTML (only the snippet),
1209
  "newref": a string with new reference lines (each line formatted as "new reference number | name | author | url"; empty if none),
 
1189
 
1190
  # --- Modified prompt: focus only on the container / snippet.
1191
  prompt_adjust = (f"""
1192
+ You are a technical editor. You are tasked to read a report and expand a very specific snippet in that report.
1193
+ Read the report first:
1194
+
1195
+ {report_html}
1196
+ -------------
1197
+ Having the report in memory and using only the following container snippet (including its outer HTML tags),
1198
+ produce an expanded version of the container by adding between one and three paragraphs containing additional relevant details.
1199
 
1200
+ // IMPORTANT
1201
+ - DO NOT output the full report; output only the updated snippet with no comments
1202
+ - DO NOT output the full report; output only the updated snippet with no comments
1203
+ - DO NOT output the full report; output only the updated snippet with no comments
1204
+ - No title or subtitles, only the snippet expanded with complementary paragraphs aligned with the user request
1205
+ - No title or subtitles, only the snippet expanded with complementary paragraphs aligned with the user request
1206
+ - No title or subtitles, only the snippet expanded with complementary paragraphs aligned with the user request
1207
+ - Do not refer or duplicate other concepts already addressed in other parts of the report.
1208
+ - Do not refer or duplicate other concepts already addressed in other parts of the report.
1209
+ - Do not refer or duplicate other concepts already addressed in other parts of the report.
1210
+
1211
+ // Inputs
1212
  - Original Container to Adjust:
1213
  {original_container_html}
1214
 
1215
  - Full User Expansion Request:
1216
  {expansion_request}
1217
 
1218
+ // Additional Guidance:
1219
  - Target Style: {target_style}
1220
  - Complementary Guidance: {complementary_guidance}
1221
  - Preserve inline citations (formatted as [x]); if new citations are added, list them separately in "newref".
1222
+ - The citations ref should be aligned with those in the References summary table if the reference used already exists.
1223
 
1224
+ // Output
1225
  Output a JSON object with exactly three keys:
1226
  "result": the expanded container's HTML (only the snippet),
1227
  "newref": a string with new reference lines (each line formatted as "new reference number | name | author | url"; empty if none),