Guiyom commited on
Commit
8c2f9de
·
verified ·
1 Parent(s): 8c20c6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -7
app.py CHANGED
@@ -1117,13 +1117,19 @@ Only output valid JSON.
1117
  # "summary": a brief explanation of the changes.
1118
  prompt_adjust = (f"""
1119
  You are a technical editor.
1120
- Given the following HTML container (including its outer tags) extracted from a larger report and based on the user expansion request, produce an expanded version by elaborating on the content.
1121
- Preserve all inline citations (formatted as [x]) and if you add any new citations, output them separately.
1122
- Note: the citation ref have to be either coming from the References Summary Table in the report or from the knowledge crumbs provided. Don't make them up.
1123
-
1124
  The point of the report is to make the research grounded in sources.
1125
- No fake references or url. Better not to use a new reference if you don't have it in the crumbs / sources.
1126
- Do not change the style but skip a line or two between lengthy paragraphs if needed.
 
 
 
 
 
 
 
 
1127
 
1128
  Output a JSON object with exactly three keys:
1129
  "result": the expanded container's full HTML (including its outer tags) to be reinserted as-is,
@@ -1148,7 +1154,7 @@ Additional Guidance:
1148
  - Complementary Guidance:
1149
  {complementary_guidance}
1150
 
1151
- Ensure that any inline citation (e.g., [1], [2], etc.) within the expanded content is preserved or newly included.
1152
  """)
1153
  response_adjust = llm_call(prompt=prompt_adjust, model="o3-mini", temperature=0, max_tokens_param=10000)
1154
  logging.info("expansion_report: Raw container adjustment response: %s", response_adjust)
@@ -1265,6 +1271,11 @@ Only output the suggestions exactly as a numbered list (text)
1265
  Full Report HTML:
1266
  {report_html}
1267
 
 
 
 
 
 
1268
  Your suggestions will help to make the report more comprehensive and ensure all the relevant knowledge available is used.
1269
  Now provide your suggestions to expand the report."""
1270
  )
 
1117
  # "summary": a brief explanation of the changes.
1118
  prompt_adjust = (f"""
1119
  You are a technical editor.
1120
+ Given the following HTML container (including its outer tags) extracted from a larger report and based on the user expansion request,
1121
+ produce an expanded version by elaborating on the content without changing the structure or conflicting with other parts.
 
 
1122
  The point of the report is to make the research grounded in sources.
1123
+
1124
+ // Important
1125
+ - Your expansion should not conflict with the content already present in other sections of the report
1126
+ - This an "expansion", not an "addition", which means you should not ask to add a new section or sub-section but just add a paragraph or two at most
1127
+ - You're not supposed to add any new title or brand new section
1128
+ - No fake references or url. Better not to use a new reference if you don't have it in the crumbs / sources.
1129
+ - Do not change the style but skip a line or two between lengthy paragraphs if needed.
1130
+ - Preserve all inline citations (formatted as [x]) and if you add any new citations, output them separately.
1131
+ - The citation ref have to be either coming from the References Summary Table in the report or from the knowledge crumbs provided. Don't make them up.
1132
+ - Ensure that any inline citation (e.g., [1], [2], etc.) within the expanded content is preserved or newly included.
1133
 
1134
  Output a JSON object with exactly three keys:
1135
  "result": the expanded container's full HTML (including its outer tags) to be reinserted as-is,
 
1154
  - Complementary Guidance:
1155
  {complementary_guidance}
1156
 
1157
+ Now produce the result in JSON format
1158
  """)
1159
  response_adjust = llm_call(prompt=prompt_adjust, model="o3-mini", temperature=0, max_tokens_param=10000)
1160
  logging.info("expansion_report: Raw container adjustment response: %s", response_adjust)
 
1271
  Full Report HTML:
1272
  {report_html}
1273
 
1274
+ // Important
1275
+ - Your suggestions should not conflict with the content already present in other sections of the report
1276
+ - This an "expansion", not an "addition", which means you should not ask to add a new section or sub-section but just add a paragraph or two at most
1277
+ - You're not supposed to add any new title or brand new section
1278
+
1279
  Your suggestions will help to make the report more comprehensive and ensure all the relevant knowledge available is used.
1280
  Now provide your suggestions to expand the report."""
1281
  )