File size: 16,339 Bytes
8fd59af
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
FIND_SEARCH_TERMS_INSTRUCTIONS = """
                    You are writing a {{report_type}} report on the following topic:
                    {{original_query}}

                    Report synopsis:
                    {{report_synopsis}}

                    You MUST provide exactly 5 search queries to search for information to write this report.
                    The search queries should allow you to get a breadth of information related to the topic.
                    Make sure the queries are specific enough to find high-quality, relevant sources."""

GENERATE_REPORT_OUTLINE_INSTRUCTIONS = """You are an expert technical writer, helping to plan a {{report_type}} report.

                        Your goal is to generate the outline of the sections of the report with a maximum of {{num_sections}} sections. 

                        The overall topic of the report is:

                        {{topic}}

                        Use the following roundtable discussion to generate the outline of the report. 

                        {{discussion}}

                        This is the expectation of the reader from the report: 

                        {{context}}

                        Now, generate the {{num_sections}} sections of the report. Each section should have the following fields:

                        - Name - Name for this section of the report.
                        - Description - what needs to be covered in this section?
                        - Subsections - titles of the subsections if any.
                        - Content - The content of the section, which you will leave blank for now.

                        Ignore the Introduction and Conclusion sections. Respond in JSON format"""



QUALITY_CHECKER_INSTRUCTIONS = """You are an experienced Wikipedia writer and want to edit a specific section of a page titled:
                        {{title_description}}

                        Besides your identity as a Wikipedia writer, you have a specific focus when researching the topic. \
                        Now, you are chatting with an expert to get information. Ask good questions, one at a time, to get more useful information.

                        Please **ONLY** ask one question at a time and don't ask what you have asked before.\
                        Your questions should be related to {{title_description}}
                        Be comprehensive and curious, gaining as much unique insight from the expert as possible.\

                        Stay true to your specific perspective:

                        {{persona}}


                        Guidelines:
                        - Do not introduce yourself or your role in the conversation
                        - No need to thank the expert for their answers, just ask your next question.
                        - Respond in JSON format only
                    """

WARM_START_DISCUSSION_INSTRUCTIONS = """You are an experienced Wikipedia writer and want to edit a specific section of a page titled:
                        {{title_description}}

                        Besides your identity as a Wikipedia writer, you have a specific focus when researching the topic. \
                        Now, you are chatting with an expert to get information. 

                        Your questions should be related to {{title_description}}
                        Be comprehensive and curious, gaining as much unique insight from the expert as possible.

                        Stay true to your specific perspective:

                        {{persona}}

                        Contiue the following discussion:

                        Guidelines:
                        - Do not introduce yourself or your role in the conversation
                        - No need to thank the expert for their answers, just ask your next question.
                        - Respond in JSON format only
                    """

#                        Based on your focus, frame your questions so that you get info on the following:  

#                        {{key_questions}}
IMPROVE_CONTENT_CREATE_QUERY_INSTRUCTIONS = """You are an expert wikipedia writer who can use information effectively. 
                     Besides your identity as a Wikipedia writer, you have a specific focus when researching the topic. \
                     Stay true to your persona and perspective:
                        
                        {{persona}}

                     You are chatting with an expert who wants\
                     to write a report on the topic you know : {{section_topic}}

                     Experts Question : {{expert_question}}

                     Generate 3 google search queries to find content that answers the experts question."""

CREATE_SYNOPSIS_INSTRUCTIONS = """ You are a marketer for a publishing company and you are tasked with creating a synopsis for a {{report_type}} report.
                                 Topic: {{topic}}

                                 The reader wants some key questions answered : {{key_questions}}

                                 Write a synopsis of the report in 5-6 sentences, so the reader knows what to expect.
                              """

IMPORVE_CONTENT_ANSWER_QUERY_INSTRUCTION = """You are an expert wikipedia writer who can use information effectively.

                     Besides your identity as a Wikipedia writer, you have a specific focus when researching the topic. \
                     Stay true to your persona and perspective:
                        
                        {{persona}}

                     You are chatting with an expert who wants\
                     to write a report on the topic you know : {{section_topic}}

                     Question : {{expert_question}}                      

                     Search Results : {{search_results}}   


                     Response Guidelines:
                     Make your response as informative as possible and make sure every sentence is supported by the gathered information.
                     If the search results  is not directly related to the [Topic] and [Question], provide the most relevant answer you can based on the available information, and explain any limitations or gaps.
                     You MUST use [1], [2], ..., [n] in line (for example, "The capital of the United States is Washington, D.C.[1][3].") referring to the search results.
                     Do NOT list the sources at the end, but you need to cite the search results in your response.
                     Your response should not exceed 150-200 words.

                     Here's an example of how you must respond:
                     <example>:

                     Response: The James Webb Space Telescope (JWST) has revolutionized our understanding of the universe by capturing infrared light, allowing scientists to see the earliest galaxies formed after the Big Bang [1][2][5]. It also provides unparalleled clarity for studying exoplanet atmospheres and stellar formation [3][4].

                     Search Results:
                     [1] Title: Webb’s First Images Unveil the Cosmos in Unprecedented Detail
                     Snippet: NASA's James Webb Space Telescope captures images of ancient galaxies formed just 200 million years after the Big Bang. Its ability to detect faint infrared light gives scientists new insights into the early universe.
                     URL: XYZ

                     [2] Title: The Science Behind Webb: Seeing the Unseen
                     Snippet: Webb’s infrared instruments allow it to pierce through cosmic dust and gas, providing detailed views of star and planet formation that were previously obscured.
                     URL: XYZ

                     [3] Title: A Closer Look at Exoplanets with JWST
                     Snippet: The James Webb Space Telescope offers an unprecedented ability to analyze exoplanet atmospheres, identifying key molecules like water vapor and methane that could indicate potential habitability.
                     URL: XYZ

                     [4] Title: Stellar Nurseries Revealed: Webb’s Role in Understanding Star Formation
                     Snippet: Webb has provided high-resolution images of stellar nurseries, helping scientists understand how stars form and evolve in various cosmic environments.
                     URL: XYZ

                     [5] Title: How Webb's Infrared Technology Changes Our View of Space
                     Snippet: Unlike the Hubble, Webb operates primarily in the infrared spectrum, which is crucial for detecting the faintest and most distant objects in the universe.
                     URL: XYZ


   
                     .......
                     </example>

                     Respond in JSON format without markdown

                     """

GENERATE_ROUNDTABLE_PERSONAS_INSTRUCTIONS = """You need to select a diverse (and distinct) group of max {{num_personas}} experts who will participate in a roundtable discussion on the topic : {{topic}}
                        The experts will help the audience understand unique perspectives that need to be covered in the report.
                        Its important to go broad so that you can get different perspectives on the topic.\
                        
                        For example, if the discussion focus is about a recent event at a specific university, consider inviting students, faculty members, journalists covering the event, university officials, and local community members.
                        You can use the provided context for inspiration. For each expert, add a 2-3 line description of what they will focus on and how they will make the roundtable discussion interesting for the audience.

                        Search Engine snippets of the topic:
                        {{context}}

                        Base your personas on the following expectations from the audience: 
                        {{report_synopsis}}
                      """

ROUNDTABLE_DISCUSSION_INSTRUCTIONS = """You are {{persona_name}}, a {{persona_role}} working at {{persona_affiliation}}. You are participating in a roundtable discussion on the topic: {{topic}}
                     Your focus area  is : {{persona_focus}}
                     
                     Along with you, the following experts are participating in the roundtable discussion:
                     {{personas}}

                     Here is the discussion so far: 

                     {{discussion}}

                     Its your turn to contribute to the discussion, response with a short answer not exceeding 200 words. Also ask the next expert a question to keep the discussion going.
                     """



GENERATE_PERSONAS_INSTRUCTIONS = """You need to select a diverse (and distinct) group of max {{num_personas}} experts who will work together to create a comprehensive {{type_of_report}} report on the topic : {{topic}}
                        
                        The experts will help you understand the unique questions and perspectives that need to be covered in the report.
                        Its important to go broad so that you can get different perspectives on the topic.\
                        
                        For example, if the discussion focus is about a recent event at a specific university, consider inviting students, faculty members, journalists covering the event, university officials, and local community members.
                        You can use the provided context for inspiration. For each expert, add a 2-3 line description of what they will focus on and how they will help.

                        The expectation from the reader is a report with the following synopsis:
                        {{report_synopsis}}
                      """

ORGANIZE_MINDMAP_INSTRUCTIONS = """You are a seasoned research assistant tasked with organizing the key concepts and ideas as a mindmap on the following topic:
                     {{topic}}

                     Here is your mindmap so far:
                     {{mindmap}}

                     Condense this discussion into the mindmap. 
                     {{discussion}}
                     
                     You can choose to create_new_topic or insert_into_existing_topic.

                     If creating a new topic, provide a name for the new topic along with the subtopics

                     If inserting into an existing topic, provide the name of the existing topic and the subtopics to insert.
                     
                     Respond in JSON format only.
                      """



REORGANIZE_TOPIC_INSTRUCTIONS =  """
                     Given the current mindmap structure, reorganize it into a more balanced and coherent structure.
                     Each topic should have no more than {{max_subtopics}} subtopics.

                     {{mindmap}}

                     Organize these subtopics into 2-3 new topics that are more focused and manageable.
                     Return:
                     1. The new topics with their subtopics
                     2. Mapping between the old structure to the new structure. Eg: {old_topic/old_sub_topic : new_topic/new_sub_topic}
                     """


WRITE_TOPIC_SUMMARY_INSTRUCTIONS = """You are a seasoned research assistant tasked with writing a subsection based on the following discussion:
                     {{discussion}}

                     References: 
                     {{references}}

                     Section Title: {{section_title}}
                     Here's a synoposis of the full report (you are only writing one section of it). {{synopsis}} Keep this theme in mind when writing the summary.
                     
                     
                     Give an title to the summary you generate.
                     Make your response as informative as possible and make sure every sentence is supported by the gathered information.
                     You MUST use [1], [2], ..., [n] in line (for example, "The capital of the United States is Washington, D.C.[1][3].") referring to the search results.
                     Do NOT list the sources at the end, but you need to cite the search results in your response.
                     """

WRITE_SECTION_INSTRUCTIONS = """
                              You are a seasoned wikipedia writer tasked with writing a section of a {{report_type}} report on: {{topic}}
                              
                              You have gathered information on multiple topics each with citations.

                              {{gathered_info}}

                              Now you need to write the section on : 
                              Section Title: {{section_title}}
                              Section Description: {{section_description}}
                              Readers expect to answer the following questions after reading this section: {{section_questions}}

                              Here's a synoposis of the full report, of which you are writing the section: {{section_title}}:
                              {{synopsis}} 
                              
                              Keep this theme in mind when writing the summary.

                              Guidelines for Section Writing: 

                              1. Keep the citations and reference numbers as-is. Do NOT change the reference numbers.
                              2. In case you want to merge information, merge the citations as well (eg: sentenceA[2], sentenceB[3] --> the citation should be [2][3])
                              3. Keep the langugage simple and easy to understand for a layman.  
                              4. Create subsections as required.
                              5. The whole section should not be more than {{section_length}} words, including the subsections.
                              5. Maintain markdown format with headers, bold, italics, newline and bullet points - visual styling is important for the reader. 
                              
                              Write the content for the section : {{section_title}}
  

                              
                              """