|
24 | 24 | - Provide your answer based strictly on the given context. |
25 | 25 | - Be concise and accurate. |
26 | 26 | - Do not include any introductory or concluding remarks. |
27 | | -- If the answer is not present in the context, respond exactly with `"None"` (without quotes). |
| 27 | +- If the answer is not present in the context, respond exactly with "None". |
28 | 28 |
|
29 | 29 | **Answer**: |
30 | 30 | """ |
31 | 31 | ) |
32 | 32 |
|
| 33 | +INFERRED_BASE_PROMPT = Template( |
| 34 | + """ |
| 35 | +Answer the following question following the formatting instructions at the bottom. Do not include, quotes, formatting, or any explanation or extra information. Just answer the question. |
| 36 | +
|
| 37 | +**Question**: $query |
| 38 | +**Answer**: |
| 39 | +
|
| 40 | +$format_specific_instructions |
| 41 | +
|
| 42 | +""" |
| 43 | +) |
| 44 | + |
33 | 45 | BOOL_INSTRUCTIONS = """ |
34 | 46 | **Special Instructions for Boolean Questions**: |
35 | 47 |
|
36 | | -- If the question is asking for a verification or requires a boolean answer, respond with `"True"` or `"False"` (as a string). |
37 | | -- If you cannot determine the answer from the context, respond exactly with `"None"`. |
| 48 | +- If the question is asking for a verification or requires a boolean answer, respond with True or False. |
| 49 | +- If you cannot answer the question, respond exactly with 'None'. |
38 | 50 | - Do not provide any explanations or additional information. |
39 | 51 | """ |
40 | 52 |
|
|
45 | 57 |
|
46 | 58 | **Special Instructions for String Responses**: |
47 | 59 |
|
48 | | -- If the answer is a single string, provide the string enclosed in double quotes. |
| 60 | +- If the answer is a single string, provide a single string. |
49 | 61 | - If multiple strings are required, provide them as a JSON array of strings. |
50 | | -- If you cannot find an answer, respond exactly with `"None"`. |
| 62 | +- If you cannot find an answer, respond exactly with 'None'. |
51 | 63 | - Do not include any additional text or explanation. |
52 | 64 | """ |
53 | 65 | ) |
|
60 | 72 |
|
61 | 73 | - If the answer is a single integer, provide the integer as a number. |
62 | 74 | - If multiple integers are required, provide them as a JSON array of integers. |
63 | | -- If you cannot find an answer, respond exactly with `"None"`. |
| 75 | +- If you cannot find an answer, respond exactly with 'None'. |
64 | 76 | - Do not include any additional text or explanation. |
65 | 77 | """ |
66 | 78 | ) |
|
79 | 91 |
|
80 | 92 | - Provide the keywords as a JSON array of strings. |
81 | 93 | - Ensure all words are in their base (lemmatized) form. |
82 | | -- If you cannot extract any relevant keywords, respond exactly with `"None"`. |
| 94 | +- If you cannot extract any relevant keywords, respond exactly with 'None'. |
83 | 95 | - Do not include any additional text or explanation. |
84 | 96 |
|
85 | 97 | **Keywords**: |
|
105 | 117 |
|
106 | 118 | - Provide the similar keywords as a JSON array of strings. |
107 | 119 | - Only include words that are present in the context and are semantically related to the provided keywords. |
108 | | -- If you cannot find any similar keywords in the context, respond exactly with `"None"`. |
| 120 | +- If you cannot find any similar keywords in the context, respond exactly with 'None'. |
109 | 121 | - Do not include any additional text or explanation. |
110 | 122 |
|
111 | 123 | **Similar Keywords**: |
|
125 | 137 | **Instructions**: |
126 | 138 |
|
127 | 139 | - Provide up to 3 sub-questions as a JSON array of strings. |
128 | | -- If the question is already simple or cannot be decomposed, respond exactly with `"None"`. |
| 140 | +- If the question is already simple or cannot be decomposed, respond exactly with 'None'. |
129 | 141 | - Do not include any additional text or explanation. |
130 | 142 |
|
131 | 143 | **Sub-Questions**: |
|
0 commit comments