|
3 | 3 |
|
4 | 4 | summary_prompt = prompts.PromptTemplate( |
5 | 5 | input_variables=["question", "context_str"], |
6 | | - template="Summarize the text below to help answer a question. " |
7 | | - "Do not directly answer the question, instead provide a summary with the context of the question. " |
| 6 | + template="Summarize and provide direct quotes from the text below to help answer a question. " |
| 7 | + "Do not directly answer the question, instead provide a summary and quotes with the context of the question. " |
8 | 8 | "Do not use outside sources. " |
9 | 9 | 'Reply with "Not applicable" if the text is unrelated to the question. ' |
10 | | - "Use 75 or less words. Include quotations if possible." |
| 10 | + "Use 75 or less words." |
11 | 11 | "\n\n" |
12 | 12 | "{context_str}\n" |
13 | 13 | "\n" |
|
18 | 18 |
|
19 | 19 | qa_prompt = prompts.PromptTemplate( |
20 | 20 | input_variables=["question", "context_str", "length"], |
21 | | - template="Write a comprehensive answer ({length}) " |
| 21 | + template="Write an answer ({length}) " |
22 | 22 | "for the question below solely based on the provided context. " |
23 | 23 | "If the context is irrelevant, " |
24 | 24 | 'reply "I cannot answer". ' |
25 | 25 | "For each sentence in your answer, indicate which sources most support it " |
26 | 26 | "via valid citation markers at the end of sentences, like (Example2012). " |
27 | | - "Answer in an unbiased, balanced, and scientific tone. " |
| 27 | + "Answer in an unbiased and scholarly tone. Make clear what is your opinion. " |
28 | 28 | "Use Markdown for formatting code or text, and try to use direct quotes to support arguments.\n\n" |
29 | 29 | "{context_str}\n" |
30 | 30 | "Question: {question}\n" |
|
0 commit comments