You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skllm/prompts/templates.py
+36-1Lines changed: 36 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,24 @@
15
15
Your JSON response:
16
16
"""
17
17
18
+
COT_CLF_PROMPT_TEMPLATE="""
19
+
You are tasked with classifying a given text sample based on a list of potential categories. Please adhere to the following guidelines:
20
+
21
+
1. The text intended for classification is presented between triple backticks.
22
+
2. The possible categories are enumerated in square brackets, with each category enclosed in single quotes and separated by commas.
23
+
24
+
Tasks:
25
+
1. Examine the text and provide detailed justifications for the possibility of the text belonging or not belonging to each category listed.
26
+
2. Determine and select the most appropriate category for the text based on your comprehensive justifications.
27
+
3. Format your decision into a JSON object containing two keys: `explanation` and `label`. The `explanation` should concisely capture the rationale for each category before concluding with the chosen category.
28
+
29
+
Category List: {labels}
30
+
31
+
Text Sample: ```{x}```
32
+
33
+
Provide your JSON response below, ensuring that justifications for all categories are clearly detailed:
34
+
"""
35
+
18
36
ZERO_SHOT_CLF_SHORT_PROMPT_TEMPLATE="""
19
37
Classify the following text into one of the following classes: {labels}. Provide your response in a JSON format containing a single key `label`.
20
38
Text: ```{x}```
@@ -84,6 +102,24 @@
84
102
Your JSON response:
85
103
"""
86
104
105
+
COT_MLCLF_PROMPT_TEMPLATE="""
106
+
You are tasked with classifying a given text sample based on a list of potential categories. Please adhere to the following guidelines:
107
+
108
+
1. The text intended for classification is presented between triple backticks.
109
+
2. The possible categories are enumerated in square brackets, with each category enclosed in quotes and separated by commas.
110
+
111
+
Tasks:
112
+
1. Examine the text and provide detailed justifications for the possibility of the text belonging or not belonging to each category listed.
113
+
2. Determine and select at most {max_cats} most appropriate categories for the text based on your comprehensive justifications.
114
+
3. Format your decision into a JSON object containing two keys: `explanation` and `label`. The `explanation` should concisely capture the rationale for each category before concluding with the chosen category. The `label` should contain an array of the chosen categories.
115
+
116
+
Category List: {labels}
117
+
118
+
Text Sample: ```{x}```
119
+
120
+
Provide your JSON response below, ensuring that justifications for all categories are clearly detailed:
121
+
"""
122
+
87
123
SUMMARY_PROMPT_TEMPLATE="""
88
124
Your task is to generate a summary of the text sample.
89
125
Summarize the text sample provided below, delimited by triple backticks, in at most {max_words} words.
0 commit comments