Guiyom commited on
Commit
9f88c4e
·
verified ·
1 Parent(s): 26f13a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +49 -11
app.py CHANGED
@@ -127,7 +127,7 @@ Keep in mind the:
127
  {crumbs}
128
 
129
  // Requirements
130
- - use standard mermaid visual rendering (ex: flowchart, sequence, gantt, pie, mindmap)
131
  - no introduction, conclusions or code fences -> Output the result directly
132
  - create only the content for the mermaid
133
  - no comments of #color coding and classes inside the mermaid code generated, it's supposed to be only focused on the mermaid code required to render it
@@ -143,21 +143,31 @@ G --> H[Performance Evaluation (45% Speed Improvement, 35% Risk Profiling, 50% F
143
  instead, use
144
  G --> H[Performance Evaluation - 45% Speed Improvement, 35% Risk Profiling, 50% Fraud Detection]
145
  - Similarly, do not use the symbol | in the mermaid code, it would create an error
 
 
 
 
146
  - Take a deep breath, think step by step and think it well.
147
- - Do not use the visual placeholder to generate a graph, for this use the graph placeholder
148
- - use only this type of quotation marks: ", others would lead to failure
149
 
150
  // Examples
151
  Note: Pay attention for each example to what type of parenthesis / bracket is used and respect it scrupulously
152
 
 
 
 
 
 
 
 
 
153
  -- flowchart --
154
  Important:
155
  - If the flow is "broader" than deep (>3 branches at the same level), choose LR (Left Right)
156
  - If the flow is "deeper" than broad (>3 levels), choose TD (Top Down)
 
157
 
158
  Top Down:
159
 
160
-
161
  flowchart TD
162
  A[Christmas] -->|Get money| B(Go shopping)
163
  B --> C{{Let me think}}
@@ -168,7 +178,6 @@ flowchart TD
168
 
169
  Left Right:
170
 
171
-
172
  flowchart LR
173
  A[Anticipated AI Advancements by 2025]
174
 
@@ -202,6 +211,37 @@ flowchart LR
202
  class T1,T2,T3,T4 trad;
203
  class C1,C2,C3,C4 comp;
204
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  -- sequence --
206
  sequenceDiagram
207
  Alice->>+John: Hello John, how are you?
@@ -695,6 +735,7 @@ The report should be very detailed and lengthy — approximately the equivalent
695
  - The report must include at least {round(pages/3,0)} tables from the sources used (add citations if necessary) and use facts and figures extensively to ground the analysis.
696
  - For the numbering of titles or numbered lists, use numbers (ex: 1.) and sub-units (1.1, 1.2... 1.1.1...,1.1.2...).
697
  - For the reference citations, add systematically the urls from the Learnings (no need to put them in numbered list format since we alredy have the [x] that serves as number list)
 
698
  - Put paragraphs, sentences that are part of the same section in a div tag, this will be used for formatting.
699
  - Text Alignment has to be to the left, including for the titles
700
  - Add on top of the report the report title (with the <h1> tag) - this is the only part that should be centered (in-line style)
@@ -712,19 +753,16 @@ The report should be very detailed and lengthy — approximately the equivalent
712
  [[Visual Placeholder n:
713
  - Purpose of this visual is:...
714
  - Relevant data to generate it:...
715
- - Visual guidance:...
716
  ]]
717
  with n as the reference number
718
  Important: after [[ put "Visual Placeholder n:" explicitly (with n as the ref number of the focus box created). This will be used in a regex
719
 
720
- - the only types of mermaid diagram that can be generated are: flowchart, sequence, gantt, pie, mindmap // Take this into consideration when providing the instructions for the diagram
721
  - do not make reference in the report to "visual placeholders" just mention visuals.
722
  - in the placeholder, no need to add the references to the source, but make sure ALL of the data points required has a source from the learning and reference material hereafter
723
  - these placeholders text should contain:
724
  o the purpose of the future visual
725
  o the relevant data to generate it
726
- o the guidance in terms of look&feel (ex: red colors, bar chart style)
727
- note: Be specific if you want some particular color used, keep it consistent across the report.
728
  - there should be at least {round(pages/4,0)} of these visuals placeholders within the report
729
  - 2 visual placeholders cannot be in the same or in 2 consecutive sections
730
  Note: the placeholders will then be processed separtely by a llm to generate the specific code to display each of them so the instruction need to be clear enough.
@@ -740,7 +778,7 @@ with n as the reference number
740
  Important: after [[ put "Graph Placeholder n:" explicitly (with n as the ref number of the focus box created). This will be used in a regex
741
 
742
  - All types of graphs from d3.js library can be generated // Take this into consideration when providing the instructions for the graph data
743
- - do not make reference in the report to "graph placeholders" just mention graph.
744
  - in the placeholder, no need to add the references to the source, but make sure ALL of the data points required has a source from the learning and reference material hereafter
745
  - these placeholders text should contain:
746
  o the purpose of the future graph
@@ -795,7 +833,7 @@ Output the report directly without any introductory meta comments.
795
  - Learnings:
796
  {json.dumps(learnings, indent=2)}
797
 
798
- - Merged Reference Details:
799
  {aggregated_crumbs}
800
 
801
  // Report ending
 
127
  {crumbs}
128
 
129
  // Requirements
130
+ - use standard mermaid visual rendering (ex: flowchart, sequence, gantt, pie, mindmap, xychart)
131
  - no introduction, conclusions or code fences -> Output the result directly
132
  - create only the content for the mermaid
133
  - no comments of #color coding and classes inside the mermaid code generated, it's supposed to be only focused on the mermaid code required to render it
 
143
  instead, use
144
  G --> H[Performance Evaluation - 45% Speed Improvement, 35% Risk Profiling, 50% Fraud Detection]
145
  - Similarly, do not use the symbol | in the mermaid code, it would create an error
146
+ - Do not use the gantt chart visual placeholder to generate a graph (ex: barchart), Gantt charts should only be used for timelines / project plans
147
+ Note: Visual placeholders are solely supposed to generate diagrams, for graphs, you should use the xychart that are focused on this purpose.
148
+ - use only this type of quotation marks: ", others would lead to failure to render
149
+ - if you need to render a quotation mark inside the text of the diagram make sure to add escapechar so that mermaid interprets it correctly
150
  - Take a deep breath, think step by step and think it well.
 
 
151
 
152
  // Examples
153
  Note: Pay attention for each example to what type of parenthesis / bracket is used and respect it scrupulously
154
 
155
+ -- xy chart --
156
+ xychart-beta
157
+ title "Sales Revenue"
158
+ x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
159
+ y-axis "Revenue (in $)" 4000 --> 11000
160
+ bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
161
+ line [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
162
+
163
  -- flowchart --
164
  Important:
165
  - If the flow is "broader" than deep (>3 branches at the same level), choose LR (Left Right)
166
  - If the flow is "deeper" than broad (>3 levels), choose TD (Top Down)
167
+ - There can be mix of flows that can be elaborate
168
 
169
  Top Down:
170
 
 
171
  flowchart TD
172
  A[Christmas] -->|Get money| B(Go shopping)
173
  B --> C{{Let me think}}
 
178
 
179
  Left Right:
180
 
 
181
  flowchart LR
182
  A[Anticipated AI Advancements by 2025]
183
 
 
211
  class T1,T2,T3,T4 trad;
212
  class C1,C2,C3,C4 comp;
213
 
214
+ Mixed: For elaborate visuals
215
+ // example 1
216
+
217
+ flowchart LR
218
+ subgraph subgraph1
219
+ direction TB
220
+ top1[top] --> bottom1[bottom]
221
+ end
222
+ subgraph subgraph2
223
+ direction TB
224
+ top2[top] --> bottom2[bottom]
225
+ end
226
+ %% ^ These subgraphs are identical, except for the links to them:
227
+
228
+ %% Link *to* subgraph1: subgraph1 direction is maintained
229
+ outside --> subgraph1
230
+ %% Link *within* subgraph2:
231
+ %% subgraph2 inherits the direction of the top-level graph (LR)
232
+ outside ---> top2
233
+
234
+ // example 2
235
+ flowchart LR
236
+ subgraph "One"
237
+ a("`The **cat**
238
+ in the hat`") -- "edge label" --> b{{"`The **dog** in the hog`"}}
239
+ end
240
+ subgraph "`**Two**`"
241
+ c("`The **cat**
242
+ in the hat`") -- "`Bold **edge label**`" --> d("The dog in the hog")
243
+ end
244
+
245
  -- sequence --
246
  sequenceDiagram
247
  Alice->>+John: Hello John, how are you?
 
735
  - The report must include at least {round(pages/3,0)} tables from the sources used (add citations if necessary) and use facts and figures extensively to ground the analysis.
736
  - For the numbering of titles or numbered lists, use numbers (ex: 1.) and sub-units (1.1, 1.2... 1.1.1...,1.1.2...).
737
  - For the reference citations, add systematically the urls from the Learnings (no need to put them in numbered list format since we alredy have the [x] that serves as number list)
738
+ IMPORTANT: Do not make false references / citations. It has to be grounded from the sources from the results of the searches below (no example.com/... type references!)
739
  - Put paragraphs, sentences that are part of the same section in a div tag, this will be used for formatting.
740
  - Text Alignment has to be to the left, including for the titles
741
  - Add on top of the report the report title (with the <h1> tag) - this is the only part that should be centered (in-line style)
 
753
  [[Visual Placeholder n:
754
  - Purpose of this visual is:...
755
  - Relevant data to generate it:...
 
756
  ]]
757
  with n as the reference number
758
  Important: after [[ put "Visual Placeholder n:" explicitly (with n as the ref number of the focus box created). This will be used in a regex
759
 
760
+ - the only types of mermaid diagram that can be generated are: flowchart, sequence, gantt, pie, mindmap, xy-chart // Take this into consideration when providing the instructions for the diagram
761
  - do not make reference in the report to "visual placeholders" just mention visuals.
762
  - in the placeholder, no need to add the references to the source, but make sure ALL of the data points required has a source from the learning and reference material hereafter
763
  - these placeholders text should contain:
764
  o the purpose of the future visual
765
  o the relevant data to generate it
 
 
766
  - there should be at least {round(pages/4,0)} of these visuals placeholders within the report
767
  - 2 visual placeholders cannot be in the same or in 2 consecutive sections
768
  Note: the placeholders will then be processed separtely by a llm to generate the specific code to display each of them so the instruction need to be clear enough.
 
778
  Important: after [[ put "Graph Placeholder n:" explicitly (with n as the ref number of the focus box created). This will be used in a regex
779
 
780
  - All types of graphs from d3.js library can be generated // Take this into consideration when providing the instructions for the graph data
781
+ - do not make mention in the report to "graph placeholders" just mention graph.
782
  - in the placeholder, no need to add the references to the source, but make sure ALL of the data points required has a source from the learning and reference material hereafter
783
  - these placeholders text should contain:
784
  o the purpose of the future graph
 
833
  - Learnings:
834
  {json.dumps(learnings, indent=2)}
835
 
836
+ - Results from searches:
837
  {aggregated_crumbs}
838
 
839
  // Report ending