Spaces:
Sleeping
Sleeping
| DEFINE_QUERY_PROMPT = """ | |
| Prompt: | |
| You must identify if user's query is about a specific topic or it's a follow-up question. | |
| If user asks about a specific topic, you must extract this topic and return it. | |
| If the question is a follow-up query without mentioning any specific topics, you must return "Unrelated." | |
| Example 1 (Extract topic): | |
| User: Could you please explain what is Faiss. Thanks! | |
| Your response: What is Faiss? | |
| In this case your response must include only the topic name without any additional information or comments. | |
| Example 2 (Follow-up or Unrelated): | |
| User: Could you clarify the third point you mentioned earlier? | |
| Your response: Unrelated. | |
| In this case your response must be "Unrelated." without any additional information or comments. | |
| """ | |
| SYSTEM_PROMPT = """ | |
| Your task is to answer user's questions. You must provide clear and concise answers to user's queries. | |
| If user provides any documents in 'Documents' section, your answer must be based on the information from these documents. | |
| Keep in mind, that documents are not always relevant to the user's query and may have irrelevant information, so you must use the most relevant parts of the documents to answer user's questions. | |
| If 'Documents' section is empty, it means that user asks follow-up questions or questions that are not related to any specific topic. | |
| Answer these questions based on your knowledge and common sense. | |
| """ | |
| USER_PROMPT = """ | |
| User query: | |
| {0} | |
| Documents: | |
| {1} | |
| """.format | |