Guiyom commited on
Commit
022ba89
·
verified ·
1 Parent(s): 719b28d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -1652,10 +1652,11 @@ def generate_final_report(initial_query: str, context: str, reportstyle: str, le
1652
  prompt = (f"""
1653
  // Instructions:
1654
  1. Integrate numbers, quotes, and factual references systematically (We want to incorporate as many relevant numbers, statistics, factual references, quotes from the sources)
 
1655
  2. Whenever you mention a figure or quote, add an inline reference [x] matching its source from the references.
1656
- 3. Specifically name relevant organizations, tools, project names, and people encountered in the crumbs or learnings.
1657
  Note: This is for academic purposes, so thorough citations and referencing are essential.
1658
- 4. Focus on reputable sources that will not be disputed (social media posts cannot be an opposable sources, but some of them may mention reputable sources)
1659
  Note: put the full reference url (no generic domain address), down to the html page or the pdf
1660
  5. It must follow this writing style {reportstyle}.
1661
  6. All key information giving credit and materiality to the report (numbers, names, people/titles, dates, papers, reports, organisation/institute/NGO/government bodies quotes, products, project names, ... ) should be explicitly mentioned IN the report with ref to the sources from the search results.
@@ -1672,14 +1673,14 @@ If you cannot produce a high level of details for specific topic or section, put
1672
 
1673
  // Requirements
1674
  - It must include inline citations (e.g., [1], [2], etc.) from real sources provided in the search results below
1675
- - Do not add any inline citations reference in the placeholders descriptions below (visual, graph or focus)
1676
- - Don't make too large blocks, skip lines and add line breaks when changing topic.
1677
  - The report must include between {round(pages/3.3,0)} and {round(pages/2,0)} tables from the sources used (add citations if necessary) and use facts and figures extensively to ground the analysis.
1678
  - The report MUST include a reference summary table with between 10 (for a 8 page report) and 30 references (for a 40 pages report). All inline citations (e.g., [1], [2], …) present in the report and in any focus placeholders MUST have a corresponding entry in this table with its full URL.
1679
  - 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...).
1680
  Note: Exclude the use of html numbered lists format, they don't get correctly implemented. Use plain text format for numbering of sections and sub-sections
1681
  - 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)
1682
- - 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!)
1683
  - Put paragraphs, sentences that are part of the same section in a div tag, this will be used for formatting.
1684
  - Text Alignment has to be to the left, including for the titles
1685
  - 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)
@@ -1707,12 +1708,12 @@ Source:source_name [y]
1707
 
1708
  with:
1709
  - n as the reference number,
1710
- - source_name as the main source used and
1711
- - y as the source reference in the reference table.
1712
  Important:
1713
  - before [[...]] do not put any title for the placeholder, just mention the source with the reference number
1714
  - use p tag for the source and source reference number
1715
- - after [[ put "Visual Placeholder n:" explicitly (with n as the ref number of the visual box created). This will be used in a regex
1716
  - the only types of mermaid diagram that can be generated are: flowchart, sequence, gantt, pie, mindmap (no charts) // Take this into consideration when providing the instructions for the diagram
1717
  - do not make mention in the report to "visual placeholders" just mention the visual and the number..
1718
  - in the placeholder, no need to add the references to the source or its ref number, but make sure ALL of the data points required has a source from the learning and reference material hereafter
@@ -1734,7 +1735,7 @@ Source:source_name [y]
1734
 
1735
  with:
1736
  - n as the reference number,
1737
- - source_name as the main source used and
1738
  - y as the source reference in the reference table.
1739
  Important:
1740
  - before [[...]] do not put any title for the placeholder, just mention the source with the reference number
 
1652
  prompt = (f"""
1653
  // Instructions:
1654
  1. Integrate numbers, quotes, and factual references systematically (We want to incorporate as many relevant numbers, statistics, factual references, quotes from the sources)
1655
+ ex: Google CEO ... mentioned that / he report xxx from yyy released in ddd revealed that ... / Mr.xyz said that "..."
1656
  2. Whenever you mention a figure or quote, add an inline reference [x] matching its source from the references.
1657
+ 3. Again, Specifically name relevant organizations, tools, project names, and people encountered in the crumbs or learnings.
1658
  Note: This is for academic purposes, so thorough citations and referencing are essential.
1659
+ 4. Focus on reputable sources that will not be disputed (generally social media posts cannot be an opposable sources, but some of them may mention reputable sources)
1660
  Note: put the full reference url (no generic domain address), down to the html page or the pdf
1661
  5. It must follow this writing style {reportstyle}.
1662
  6. All key information giving credit and materiality to the report (numbers, names, people/titles, dates, papers, reports, organisation/institute/NGO/government bodies quotes, products, project names, ... ) should be explicitly mentioned IN the report with ref to the sources from the search results.
 
1673
 
1674
  // Requirements
1675
  - It must include inline citations (e.g., [1], [2], etc.) from real sources provided in the search results below
1676
+ - Do not add any inline citations reference in the placeholders descriptions below (visual, graph), you can add them in focus though.
1677
+ - No more than 7 sentences per div blocks, skip lines and add line breaks when changing topic.
1678
  - The report must include between {round(pages/3.3,0)} and {round(pages/2,0)} tables from the sources used (add citations if necessary) and use facts and figures extensively to ground the analysis.
1679
  - The report MUST include a reference summary table with between 10 (for a 8 page report) and 30 references (for a 40 pages report). All inline citations (e.g., [1], [2], …) present in the report and in any focus placeholders MUST have a corresponding entry in this table with its full URL.
1680
  - 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...).
1681
  Note: Exclude the use of html numbered lists format, they don't get correctly implemented. Use plain text format for numbering of sections and sub-sections
1682
  - 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)
1683
+ - Do not make false references / citations. It has to be grounded from the sources in the rsearch results / crumbs below (no example.com/... type references!)
1684
  - Put paragraphs, sentences that are part of the same section in a div tag, this will be used for formatting.
1685
  - Text Alignment has to be to the left, including for the titles
1686
  - 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)
 
1708
 
1709
  with:
1710
  - n as the reference number,
1711
+ - source_name as the full name of the main source used and
1712
+ - y as the number ref of the source reference in the reference table.
1713
  Important:
1714
  - before [[...]] do not put any title for the placeholder, just mention the source with the reference number
1715
  - use p tag for the source and source reference number
1716
+ - after [[ put "Visual Placeholder n:" explicitly (with n as the ref number of the placeholder box created). This will be used in a regex
1717
  - the only types of mermaid diagram that can be generated are: flowchart, sequence, gantt, pie, mindmap (no charts) // Take this into consideration when providing the instructions for the diagram
1718
  - do not make mention in the report to "visual placeholders" just mention the visual and the number..
1719
  - in the placeholder, no need to add the references to the source or its ref number, but make sure ALL of the data points required has a source from the learning and reference material hereafter
 
1735
 
1736
  with:
1737
  - n as the reference number,
1738
+ - source_name as the full name of the main source used and
1739
  - y as the source reference in the reference table.
1740
  Important:
1741
  - before [[...]] do not put any title for the placeholder, just mention the source with the reference number