fadliaulawi commited on
Commit
cda22ff
1 Parent(s): 7af6232

Tidy up prompts

Browse files
Files changed (3) hide show
  1. process.py +1 -0
  2. prompt.py +2 -237
  3. prompt_old.py +235 -0
process.py CHANGED
@@ -9,6 +9,7 @@ from langchain_google_genai import ChatGoogleGenerativeAI
9
  from langchain_openai import ChatOpenAI
10
  from pdf2image import convert_from_path
11
  from prompt import *
 
12
  from table_detector import detection_transform, device, model, ocr, outputs_to_objects
13
 
14
  import io
 
9
  from langchain_openai import ChatOpenAI
10
  from pdf2image import convert_from_path
11
  from prompt import *
12
+ from prompt_old import *
13
  from table_detector import detection_transform, device, model, ocr, outputs_to_objects
14
 
15
  import io
prompt.py CHANGED
@@ -1,239 +1,3 @@
1
- prompt_entity_gsd_chunk = """
2
- # CONTEXT #
3
- In my capacity as a genomics specialist, I have recently completed the review of a scholarly publication. I am interested in extracting specific genomic information, or entities, from the body of the paper.
4
- To facilitate this process, I have constructed a predefined schema that outlines the desired entities and their corresponding description.
5
-
6
- This is the schema provided:
7
-
8
- {{
9
- "Genes" : {{
10
- "type" : "list of strings",
11
- "description" : "All relevant genes mentioned in the text. Gene names can only contain uppercase letters and digits."
12
- }},
13
- "SNPs" : {{
14
- "type" : "list of strings",
15
- "description" : "Unique identifier associated with each value in Genes schema. These identifiers typically begin with 'rs' and appear near the gene name in the text."
16
- }},
17
- "Diseases" : {{
18
- "type" : "list of strings",
19
- "description" : "Type of diseases that related to each value in Genes, typically appear near the gene name in the text."
20
- }}
21
- }}
22
-
23
- Note that the values within each list of Genes, SNPs, and Diseases columns correspond directly to each other. Consequently, the lengths of these lists must be identical.
24
-
25
- This is a passage from the paper: {docs}
26
-
27
- # OBJECTIVE #
28
- Given a predefined schema outlining relevant entities, meticulously extract these entities from the provided text passage. Exercise caution when handling the reference section of the document, abstain from extracting information from this section.
29
- IMPORTANT: It is crucial to maintain the utmost accuracy in this process, as any false or fabricated information (hallucination) can have severe consequences for academic integrity and research credibility. If an entity is entirely absent from the passage, just leave the corresponding field blank with an empty string ('').
30
-
31
- # RESPONSE #
32
- The extracted information will be utilizing the JSON format. Information within strings will be demarcated by double quotes (" "), while quotes contained within strings will be denoted by single quotes (' '). List data will be enclosed within square brackets ([]).
33
- This is the example of the respose:
34
-
35
- {{
36
- "Genes": ["A", "B", "C"],
37
- "SNPs": ["rs1", "rs2", "rs3"],
38
- "Diseases": ["X", "Y", "Z"]
39
- }}
40
-
41
- If there is no specific extracted entities, just leave the corresponding field blank with an empty lists ([]).
42
- """
43
-
44
- prompt_entity_gsd_combine = """
45
- # CONTEXT #
46
- In my role as a genomics specialist, I have extracted specific entities from a scholarly publication. These entities were identified and retrieved from various sections throughout the document. My current objective is to consolidate this extracted information into a concise summary, facilitating a comprehensive understanding of the publication's key findings.
47
- To achieve this, I have constructed a predefined schema that outlines the desired entities and the methods for their summarization.
48
-
49
- {{
50
- "Genes" : {{
51
- "type" : "list of strings",
52
- "description" : "Identify the most relevant gene from the compiled gene list across all sections."
53
- }},
54
- "SNPs" : {{
55
- "type" : "list of strings",
56
- "description" : "Upon completion of the gene combination process, associate each resulting value with its unique identifier."
57
- }},
58
- "Diseases" : {{
59
- "type" : "list of strings",
60
- "description" : "Upon completion of the gene combination process, associate each resulting value with its diseases."
61
- }}
62
- }}
63
-
64
- This is a set of summaries: {doc_summaries}
65
-
66
- If there is no extracted entities, just leave the corresponding result with an empty list ([]) later.
67
-
68
- # OBJECTIVE #
69
- In the context of a predefined schema that specifies entities and their corresponding operations, construct a comprehensive synopsis that incorporates all critical details gleaned from each section.
70
- IMPORTANT: It is crucial to maintain the utmost accuracy in this process, as any false or fabricated information (hallucination) can have severe consequences for academic integrity and research credibility.
71
-
72
- # RESPONSE #
73
- The extracted information will be utilizing the JSON format. Information within strings will be demarcated by double quotes (" "), while quotes contained within strings will be denoted by single quotes (' '). List data will be enclosed within square brackets ([]).
74
- This is the example of the respose:
75
-
76
- {{
77
- "Genes": ["A", "B", "C"],
78
- "SNPs": ["rs1", "rs2", "rs3"],
79
- "Diseases": ["X", "Y", "Z"]
80
- }}
81
- """
82
-
83
- prompt_entity_summ_chunk = """
84
- # CONTEXT #
85
- In my capacity as a genomics specialist, I have recently completed the review of a scholarly publication. I am interested in extracting the summary from the body of the paper.
86
-
87
- This is a passage from the paper: {docs}
88
-
89
- # OBJECTIVE #
90
- Extract the summary or the conclusion from the provided text passage. Exercise caution when handling the reference section of the document, abstain from extracting information from this section.
91
- IMPORTANT: It is crucial to maintain the utmost accuracy in this process, as any false or fabricated information (hallucination) can have severe consequences for academic integrity and research credibility.
92
-
93
- # RESPONSE #
94
- Provide the information in a concise way, using four concise paragraphs. The text should be presented in a continuous format, omitting introductory elements like numbers or titles within each paragraph.
95
-
96
- 1. Overview. Explanation of the provided documents and their exploration of the genetic underpinnings of the disease, and understanding of genetic factors in disease pathology.
97
- 2. Main Themes. Identification of genetic variants and mutations contributing to disease susceptibility. Role of specific genes and genetic pathways in disease development and progression.
98
- 3. Key Genetic Factors and Their Implications. Highlighting specific genes or genetic variants associated with the disease. Discussion of how these genetic factors may influence disease susceptibility, severity, or treatment response.
99
- 4. Conclusion. Recap of the key findings regarding genetic factors and disease mechanisms. Suggestions for future research directions or clinical applications based on the insights gained from genetic analysis.
100
- """
101
-
102
- prompt_entity_summ_combine = """
103
- # CONTEXT #
104
- In my role as a genomics specialist, I have extracted some summaries from a scholarly publication. These summaries were identified and retrieved from various sections throughout the document.
105
- My current objective is to consolidate this extracted information into a concise summary, facilitating a comprehensive understanding of the publication's key findings.
106
-
107
- This is a set of summaries: {doc_summaries}
108
-
109
- # OBJECTIVE #
110
- Construct a comprehensive synopsis that incorporates all critical details gleaned from the summaries of each section.
111
- IMPORTANT: It is crucial to maintain the utmost accuracy in this process, as any false or fabricated information (hallucination) can have severe consequences for academic integrity and research credibility.
112
-
113
- # RESPONSE #
114
- Provide the information in a concise way, using four concise paragraphs. The text should be presented in a continuous format, omitting introductory elements like numbers or titles within each paragraph..
115
-
116
- 1. Overview. Explanation of the provided documents and their exploration of the genetic underpinnings of the disease, and understanding of genetic factors in disease pathology.
117
- 2. Main Themes. Identification of genetic variants and mutations contributing to disease susceptibility. Role of specific genes and genetic pathways in disease development and progression.
118
- 3. Key Genetic Factors and Their Implications. Highlighting specific genes or genetic variants associated with the disease. Discussion of how these genetic factors may influence disease susceptibility, severity, or treatment response.
119
- 4. Conclusion. Recap of the key findings regarding genetic factors and disease mechanisms. Suggestions for future research directions or clinical applications based on the insights gained from genetic analysis.
120
- """
121
-
122
- prompt_entities_chunk = """
123
- # CONTEXT #
124
- In my capacity as a genomics specialist, I have recently completed the review of a scholarly publication. I am interested in extracting specific genomic information, or entities, from the body of the paper.
125
- To facilitate this process, I have constructed a predefined schema that outlines the desired entities and their corresponding description.
126
-
127
- This is the schema provided:
128
-
129
- {{
130
- "Population" : {{
131
- "type" : "string",
132
- "description" : "Population / race used by the author in the given text."
133
- }},
134
- "Sample Size" : {{
135
- "type" : "string",
136
- "description" : "Sample size of the population used in the research that mentioned in the paper."
137
- }},
138
- "Study Methodology" : {{
139
- "type" : "string",
140
- "description" : "Study methodology mentioned in the text."
141
- }},
142
- "Study Level" : {{
143
- "type" : "string",
144
- "description" : "Study level mentioned in the text."
145
- }}
146
- }}
147
-
148
- This is a passage from the paper: {docs}
149
-
150
- # OBJECTIVE #
151
- Given a predefined schema outlining relevant entities, meticulously extract these entities from the provided text passage. Exercise caution when handling the reference section of the document, abstain from extracting information from this section.
152
- IMPORTANT: It is crucial to maintain the utmost accuracy in this process, as any false or fabricated information (hallucination) can have severe consequences for academic integrity and research credibility. If an entity is entirely absent from the passage, just leave the corresponding field blank with an empty string ('').
153
-
154
- # RESPONSE #
155
- The extracted information will be utilizing the JSON format. Information within strings will be demarcated by double quotes (" "), while quotes contained within strings will be denoted by single quotes (' ').
156
- This is the example of the respose:
157
-
158
- {{
159
- "Population": "South Asian",
160
- "Sample Size": "403 Relatively Small",
161
- "Study Methodology": "Double-Blind Randomized Controlled Trial",
162
- "Study Level": "Postdoctoral"
163
- }}
164
-
165
- If there is no specific extracted entities, just leave the corresponding field blank with an empty string ("").
166
- """
167
-
168
- prompt_entities_combine = """
169
- # CONTEXT #
170
- In my role as a genomics specialist, I have extracted some summaries from a scholarly publication. These summaries were identified and retrieved from various sections throughout the document. My current objective is to consolidate this extracted information into a concise summary, facilitating a comprehensive understanding of the publication's key findings.
171
-
172
- This is a set of summaries: {doc_summaries}
173
-
174
- If there is no extracted entities, just leave the corresponding result with an empty string ("") later.
175
-
176
- # OBJECTIVE #
177
- Construct a comprehensive synopsis that incorporates all critical details gleaned from the summaries of each section.
178
- IMPORTANT: It is crucial to maintain the utmost accuracy in this process, as any false or fabricated information (hallucination) can have severe consequences for academic integrity and research credibility.
179
-
180
- # RESPONSE #
181
- The extracted information will be utilizing the JSON format. Information within strings will be demarcated by double quotes (" "), while quotes contained within strings will be denoted by single quotes (' ').
182
- This is the example of the respose:
183
-
184
- {{
185
- "Population": "South Asian",
186
- "Sample Size": "403 Relatively Small",
187
- "Study Methodology": "Double-Blind Randomized Controlled Trial",
188
- "Study Level": "Postdoctoral"
189
- }}
190
- """
191
-
192
- prompt_entity_one_chunk = """
193
- # CONTEXT #
194
- In my capacity as a genomics specialist, I have recently completed the review of a scholarly publication. I am interested in extracting specific genomic information, or entities, from the body of the paper. To facilitate this process, I have constructed a predefined schema that outlines the desired entities and their corresponding description.
195
-
196
- This is the schema provided:
197
-
198
- {{
199
- "Title" : {{
200
- "type" : "string",
201
- "description" : "Title of the given text."
202
- }},
203
- "Authors" : {{
204
- "type" : "string",
205
- "description" : "Authors / writers of the given text. To maintain readability, consider only the first 10 author names, ensuring the other key informations and response format are clear."
206
- }},
207
- "Publisher Name" : {{
208
- "type" : "string",
209
- "description" : "Publisher name of the given text."
210
- }},
211
- "Publication Year" : {{
212
- "type" : "string",
213
- "description" : "The year when the given text published."
214
- }},
215
- }}
216
-
217
- This is a passage from the paper: {}
218
-
219
- # OBJECTIVE #
220
- Given a predefined schema outlining relevant entities, meticulously extract these entities from the provided text passage.
221
- IMPORTANT: It is crucial to maintain the utmost accuracy in this process, as any false or fabricated information (hallucination) can have severe consequences for academic integrity and research credibility. If an entity is entirely absent from the passage, just leave the corresponding field blank with an empty string ('').
222
-
223
- # RESPONSE #
224
- The extracted information will be utilizing the JSON format. Information within strings will be demarcated by double quotes (" "), while quotes contained within strings will be denoted by single quotes (' ').
225
- This is the example of the respose:
226
-
227
- {{
228
- "Title": "Lorem Ipsum",
229
- "Authors": "John Doe, Jane Doe, Alias",
230
- "Publisher Name": "Journal of Internal Medicine",
231
- "Publication Year": "2024"
232
- }}
233
-
234
- If there is no specific extracted entities, just leave the corresponding field blank with an empty string ("").
235
- """
236
-
237
  prompt_table = """
238
  # CONTEXT #
239
  In my capacity as a genomics specialist, I have table data obtained from a published research paper in the field of genomics. The data is provided in a list of JSONs format, with each JSON object representing a single row in a tabular structure. The first JSON element in the list represents the header row of the table, containing the names of each column.
@@ -297,7 +61,8 @@ The output must be only a string containing a list of JSON objects, adhering to
297
  "OR Value": 1.25,
298
  "Beta Value": 0.02,
299
  "P Value": 0.51,
300
- "Traits": "A disease"
 
301
  }}
302
  ]
303
  """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  prompt_table = """
2
  # CONTEXT #
3
  In my capacity as a genomics specialist, I have table data obtained from a published research paper in the field of genomics. The data is provided in a list of JSONs format, with each JSON object representing a single row in a tabular structure. The first JSON element in the list represents the header row of the table, containing the names of each column.
 
61
  "OR Value": 1.25,
62
  "Beta Value": 0.02,
63
  "P Value": 0.51,
64
+ "Traits": "A disease",
65
+ "Source": "Trust me bro"
66
  }}
67
  ]
68
  """
prompt_old.py ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ prompt_entity_gsd_chunk = """
2
+ # CONTEXT #
3
+ In my capacity as a genomics specialist, I have recently completed the review of a scholarly publication. I am interested in extracting specific genomic information, or entities, from the body of the paper.
4
+ To facilitate this process, I have constructed a predefined schema that outlines the desired entities and their corresponding description.
5
+
6
+ This is the schema provided:
7
+
8
+ {{
9
+ "Genes" : {{
10
+ "type" : "list of strings",
11
+ "description" : "All relevant genes mentioned in the text. Gene names can only contain uppercase letters and digits."
12
+ }},
13
+ "SNPs" : {{
14
+ "type" : "list of strings",
15
+ "description" : "Unique identifier associated with each value in Genes schema. These identifiers typically begin with 'rs' and appear near the gene name in the text."
16
+ }},
17
+ "Diseases" : {{
18
+ "type" : "list of strings",
19
+ "description" : "Type of diseases that related to each value in Genes, typically appear near the gene name in the text."
20
+ }}
21
+ }}
22
+
23
+ Note that the values within each list of Genes, SNPs, and Diseases columns correspond directly to each other. Consequently, the lengths of these lists must be identical.
24
+
25
+ This is a passage from the paper: {docs}
26
+
27
+ # OBJECTIVE #
28
+ Given a predefined schema outlining relevant entities, meticulously extract these entities from the provided text passage. Exercise caution when handling the reference section of the document, abstain from extracting information from this section.
29
+ IMPORTANT: It is crucial to maintain the utmost accuracy in this process, as any false or fabricated information (hallucination) can have severe consequences for academic integrity and research credibility. If an entity is entirely absent from the passage, just leave the corresponding field blank with an empty string ('').
30
+
31
+ # RESPONSE #
32
+ The extracted information will be utilizing the JSON format. Information within strings will be demarcated by double quotes (" "), while quotes contained within strings will be denoted by single quotes (' '). List data will be enclosed within square brackets ([]).
33
+ This is the example of the respose:
34
+
35
+ {{
36
+ "Genes": ["A", "B", "C"],
37
+ "SNPs": ["rs1", "rs2", "rs3"],
38
+ "Diseases": ["X", "Y", "Z"]
39
+ }}
40
+
41
+ If there is no specific extracted entities, just leave the corresponding field blank with an empty lists ([]).
42
+ """
43
+
44
+ prompt_entity_gsd_combine = """
45
+ # CONTEXT #
46
+ In my role as a genomics specialist, I have extracted specific entities from a scholarly publication. These entities were identified and retrieved from various sections throughout the document. My current objective is to consolidate this extracted information into a concise summary, facilitating a comprehensive understanding of the publication's key findings.
47
+ To achieve this, I have constructed a predefined schema that outlines the desired entities and the methods for their summarization.
48
+
49
+ {{
50
+ "Genes" : {{
51
+ "type" : "list of strings",
52
+ "description" : "Identify the most relevant gene from the compiled gene list across all sections."
53
+ }},
54
+ "SNPs" : {{
55
+ "type" : "list of strings",
56
+ "description" : "Upon completion of the gene combination process, associate each resulting value with its unique identifier."
57
+ }},
58
+ "Diseases" : {{
59
+ "type" : "list of strings",
60
+ "description" : "Upon completion of the gene combination process, associate each resulting value with its diseases."
61
+ }}
62
+ }}
63
+
64
+ This is a set of summaries: {doc_summaries}
65
+
66
+ If there is no extracted entities, just leave the corresponding result with an empty list ([]) later.
67
+
68
+ # OBJECTIVE #
69
+ In the context of a predefined schema that specifies entities and their corresponding operations, construct a comprehensive synopsis that incorporates all critical details gleaned from each section.
70
+ IMPORTANT: It is crucial to maintain the utmost accuracy in this process, as any false or fabricated information (hallucination) can have severe consequences for academic integrity and research credibility.
71
+
72
+ # RESPONSE #
73
+ The extracted information will be utilizing the JSON format. Information within strings will be demarcated by double quotes (" "), while quotes contained within strings will be denoted by single quotes (' '). List data will be enclosed within square brackets ([]).
74
+ This is the example of the respose:
75
+
76
+ {{
77
+ "Genes": ["A", "B", "C"],
78
+ "SNPs": ["rs1", "rs2", "rs3"],
79
+ "Diseases": ["X", "Y", "Z"]
80
+ }}
81
+ """
82
+
83
+ prompt_entity_summ_chunk = """
84
+ # CONTEXT #
85
+ In my capacity as a genomics specialist, I have recently completed the review of a scholarly publication. I am interested in extracting the summary from the body of the paper.
86
+
87
+ This is a passage from the paper: {docs}
88
+
89
+ # OBJECTIVE #
90
+ Extract the summary or the conclusion from the provided text passage. Exercise caution when handling the reference section of the document, abstain from extracting information from this section.
91
+ IMPORTANT: It is crucial to maintain the utmost accuracy in this process, as any false or fabricated information (hallucination) can have severe consequences for academic integrity and research credibility.
92
+
93
+ # RESPONSE #
94
+ Provide the information in a concise way, using four concise paragraphs. The text should be presented in a continuous format, omitting introductory elements like numbers or titles within each paragraph.
95
+
96
+ 1. Overview. Explanation of the provided documents and their exploration of the genetic underpinnings of the disease, and understanding of genetic factors in disease pathology.
97
+ 2. Main Themes. Identification of genetic variants and mutations contributing to disease susceptibility. Role of specific genes and genetic pathways in disease development and progression.
98
+ 3. Key Genetic Factors and Their Implications. Highlighting specific genes or genetic variants associated with the disease. Discussion of how these genetic factors may influence disease susceptibility, severity, or treatment response.
99
+ 4. Conclusion. Recap of the key findings regarding genetic factors and disease mechanisms. Suggestions for future research directions or clinical applications based on the insights gained from genetic analysis.
100
+ """
101
+
102
+ prompt_entity_summ_combine = """
103
+ # CONTEXT #
104
+ In my role as a genomics specialist, I have extracted some summaries from a scholarly publication. These summaries were identified and retrieved from various sections throughout the document.
105
+ My current objective is to consolidate this extracted information into a concise summary, facilitating a comprehensive understanding of the publication's key findings.
106
+
107
+ This is a set of summaries: {doc_summaries}
108
+
109
+ # OBJECTIVE #
110
+ Construct a comprehensive synopsis that incorporates all critical details gleaned from the summaries of each section.
111
+ IMPORTANT: It is crucial to maintain the utmost accuracy in this process, as any false or fabricated information (hallucination) can have severe consequences for academic integrity and research credibility.
112
+
113
+ # RESPONSE #
114
+ Provide the information in a concise way, using four concise paragraphs. The text should be presented in a continuous format, omitting introductory elements like numbers or titles within each paragraph..
115
+
116
+ 1. Overview. Explanation of the provided documents and their exploration of the genetic underpinnings of the disease, and understanding of genetic factors in disease pathology.
117
+ 2. Main Themes. Identification of genetic variants and mutations contributing to disease susceptibility. Role of specific genes and genetic pathways in disease development and progression.
118
+ 3. Key Genetic Factors and Their Implications. Highlighting specific genes or genetic variants associated with the disease. Discussion of how these genetic factors may influence disease susceptibility, severity, or treatment response.
119
+ 4. Conclusion. Recap of the key findings regarding genetic factors and disease mechanisms. Suggestions for future research directions or clinical applications based on the insights gained from genetic analysis.
120
+ """
121
+
122
+ prompt_entities_chunk = """
123
+ # CONTEXT #
124
+ In my capacity as a genomics specialist, I have recently completed the review of a scholarly publication. I am interested in extracting specific genomic information, or entities, from the body of the paper.
125
+ To facilitate this process, I have constructed a predefined schema that outlines the desired entities and their corresponding description.
126
+
127
+ This is the schema provided:
128
+
129
+ {{
130
+ "Population" : {{
131
+ "type" : "string",
132
+ "description" : "Population / race used by the author in the given text."
133
+ }},
134
+ "Sample Size" : {{
135
+ "type" : "string",
136
+ "description" : "Sample size of the population used in the research that mentioned in the paper."
137
+ }},
138
+ "Study Methodology" : {{
139
+ "type" : "string",
140
+ "description" : "Study methodology mentioned in the text."
141
+ }},
142
+ "Study Level" : {{
143
+ "type" : "string",
144
+ "description" : "Study level mentioned in the text."
145
+ }}
146
+ }}
147
+
148
+ This is a passage from the paper: {docs}
149
+
150
+ # OBJECTIVE #
151
+ Given a predefined schema outlining relevant entities, meticulously extract these entities from the provided text passage. Exercise caution when handling the reference section of the document, abstain from extracting information from this section.
152
+ IMPORTANT: It is crucial to maintain the utmost accuracy in this process, as any false or fabricated information (hallucination) can have severe consequences for academic integrity and research credibility. If an entity is entirely absent from the passage, just leave the corresponding field blank with an empty string ('').
153
+
154
+ # RESPONSE #
155
+ The extracted information will be utilizing the JSON format. Information within strings will be demarcated by double quotes (" "), while quotes contained within strings will be denoted by single quotes (' ').
156
+ This is the example of the respose:
157
+
158
+ {{
159
+ "Population": "South Asian",
160
+ "Sample Size": "403 Relatively Small",
161
+ "Study Methodology": "Double-Blind Randomized Controlled Trial",
162
+ "Study Level": "Postdoctoral"
163
+ }}
164
+
165
+ If there is no specific extracted entities, just leave the corresponding field blank with an empty string ("").
166
+ """
167
+
168
+ prompt_entities_combine = """
169
+ # CONTEXT #
170
+ In my role as a genomics specialist, I have extracted some summaries from a scholarly publication. These summaries were identified and retrieved from various sections throughout the document. My current objective is to consolidate this extracted information into a concise summary, facilitating a comprehensive understanding of the publication's key findings.
171
+
172
+ This is a set of summaries: {doc_summaries}
173
+
174
+ If there is no extracted entities, just leave the corresponding result with an empty string ("") later.
175
+
176
+ # OBJECTIVE #
177
+ Construct a comprehensive synopsis that incorporates all critical details gleaned from the summaries of each section.
178
+ IMPORTANT: It is crucial to maintain the utmost accuracy in this process, as any false or fabricated information (hallucination) can have severe consequences for academic integrity and research credibility.
179
+
180
+ # RESPONSE #
181
+ The extracted information will be utilizing the JSON format. Information within strings will be demarcated by double quotes (" "), while quotes contained within strings will be denoted by single quotes (' ').
182
+ This is the example of the respose:
183
+
184
+ {{
185
+ "Population": "South Asian",
186
+ "Sample Size": "403 Relatively Small",
187
+ "Study Methodology": "Double-Blind Randomized Controlled Trial",
188
+ "Study Level": "Postdoctoral"
189
+ }}
190
+ """
191
+
192
+ prompt_entity_one_chunk = """
193
+ # CONTEXT #
194
+ In my capacity as a genomics specialist, I have recently completed the review of a scholarly publication. I am interested in extracting specific genomic information, or entities, from the body of the paper. To facilitate this process, I have constructed a predefined schema that outlines the desired entities and their corresponding description.
195
+
196
+ This is the schema provided:
197
+
198
+ {{
199
+ "Title" : {{
200
+ "type" : "string",
201
+ "description" : "Title of the given text."
202
+ }},
203
+ "Authors" : {{
204
+ "type" : "string",
205
+ "description" : "Authors / writers of the given text. To maintain readability, consider only the first 10 author names, ensuring the other key informations and response format are clear."
206
+ }},
207
+ "Publisher Name" : {{
208
+ "type" : "string",
209
+ "description" : "Publisher name of the given text."
210
+ }},
211
+ "Publication Year" : {{
212
+ "type" : "string",
213
+ "description" : "The year when the given text published."
214
+ }},
215
+ }}
216
+
217
+ This is a passage from the paper: {}
218
+
219
+ # OBJECTIVE #
220
+ Given a predefined schema outlining relevant entities, meticulously extract these entities from the provided text passage.
221
+ IMPORTANT: It is crucial to maintain the utmost accuracy in this process, as any false or fabricated information (hallucination) can have severe consequences for academic integrity and research credibility. If an entity is entirely absent from the passage, just leave the corresponding field blank with an empty string ('').
222
+
223
+ # RESPONSE #
224
+ The extracted information will be utilizing the JSON format. Information within strings will be demarcated by double quotes (" "), while quotes contained within strings will be denoted by single quotes (' ').
225
+ This is the example of the respose:
226
+
227
+ {{
228
+ "Title": "Lorem Ipsum",
229
+ "Authors": "John Doe, Jane Doe, Alias",
230
+ "Publisher Name": "Journal of Internal Medicine",
231
+ "Publication Year": "2024"
232
+ }}
233
+
234
+ If there is no specific extracted entities, just leave the corresponding field blank with an empty string ("").
235
+ """