|
129 | 129 | register_conv_template( |
130 | 130 | Conversation( |
131 | 131 | name="rag_with_context_memory", |
132 | | - system_message="Have a conversation with a human, answer the following questions as best you can." + \ |
133 | | - " You can refer to the following document and context.\n", |
134 | | - roles=("### Question: ", "### Context: ", "### Chat History: ", "### Response: "), |
| 132 | + system_message="""### You are a helpful, respectful and honest assistant to help the user with questions. \ |
| 133 | + - Please refer to the search results obtained from the local knowledge base. But be careful to not \ |
| 134 | + incorporate the information that you think is not relevant to the question. |
| 135 | + - If you don't know the answer to a question, please don't share false information.\n""" , |
| 136 | + roles=("### Question:", "### Search Results:", "### Chat History:", "### Response:"), |
135 | 137 | sep_style=SeparatorStyle.NO_COLON_SINGLE, |
136 | 138 | sep="\n", |
137 | 139 | ) |
|
143 | 145 | name="rag_without_context", |
144 | 146 | system_message="Have a conversation with a human. " + \ |
145 | 147 | "You are required to generate suitable response to the user input.\n", |
146 | | - roles=("### Input: ", "### Response: "), |
| 148 | + roles=("### Input:", "### Response:"), |
| 149 | + sep_style=SeparatorStyle.NO_COLON_SINGLE, |
| 150 | + sep="\n", |
| 151 | + ) |
| 152 | +) |
| 153 | + |
| 154 | +# Rag without context template |
| 155 | +register_conv_template( |
| 156 | + Conversation( |
| 157 | + name="rag_without_context_memory", |
| 158 | + system_message="Have a conversation with a human. " + \ |
| 159 | + "You are required to generate suitable response to the user input.\n", |
| 160 | + roles=("### Input:", "### Chat History:", "### Response:"), |
147 | 161 | sep_style=SeparatorStyle.NO_COLON_SINGLE, |
148 | 162 | sep="\n", |
149 | 163 | ) |
|
154 | 168 | register_conv_template( |
155 | 169 | Conversation( |
156 | 170 | name="rag_with_threshold", |
157 | | - system_message="You are served as an AI agent to help the user complete a task." + \ |
158 | | - " You are required to comprehend the usr query and then use the given context to" + \ |
159 | | - " generate a suitable response.\n\n", |
160 | | - roles=("### User Query: ", "### Context: ", "### Chat History: ", "### Response: "), |
| 171 | + system_message="""### You are a helpful, respectful and honest assistant to help the user with questions. \ |
| 172 | + - Please refer to the search results obtained from the local knowledge base. But be careful to not \ |
| 173 | + incorporate the information that you think is not relevant to the question. |
| 174 | + - If you don't know the answer to a question, please don't share false information.\n""", |
| 175 | + roles=("### Question:", "### Search Results:", "### Chat History:", "### Response:"), |
161 | 176 | sep_style=SeparatorStyle.NO_COLON_SINGLE, |
162 | 177 | sep="\n", |
163 | 178 | ) |
|
0 commit comments