anushm commited on
Commit
e88f7e1
·
1 Parent(s): 8895bbd

Upload herbal_expert.py

Browse files
Files changed (1) hide show
  1. herbal_expert.py +10 -8
herbal_expert.py CHANGED
@@ -215,21 +215,23 @@ class HerbalExpert:
215
 
216
  "ans_decompose_prompt": """### Instruction: Given the following text, identify the 2 most important
217
  keywords that capture the essence of the text. If there's a list of products, choose the top 2 products.
218
- Your response should be a list of only 2 keywords separated by commas. Text: {original_answer} Keywords:
219
- ### Response: """,
 
220
 
221
- "qa_prompt": """### Instruction: Answer the following question using the given context.
222
- Question: {question}
223
- Context: {context}
224
- ### Response: """,
 
225
 
226
  "ri_prompt": """### Instruction: You are an caring, intelligent question answering agent. Craft a
227
  response that is more informative and intelligent than the original answer and imparts knowledge from
228
- both the old answer and from the context only if it helps answer the question.
229
  Question: {question}
230
  Old Answer: {answer}
231
  Context: {answer2}
232
- Improved answer: ### Response:"""
233
  }
234
 
235
  def process_query_words(self, question_words: str, answer_words: str):
 
215
 
216
  "ans_decompose_prompt": """### Instruction: Given the following text, identify the 2 most important
217
  keywords that capture the essence of the text. If there's a list of products, choose the top 2 products.
218
+ Your response should be a list of only 2 keywords separated by commas.
219
+ Text: {original_answer}
220
+ Keywords: ### Response: """,
221
 
222
+ "qa_prompt": """### Instruction: Answer the following question using the given context ONLY if the
223
+ context is relevant to the question. If the context doesn't help answer the question, proceed to answer
224
+ question without using the context.
225
+ Question: {question}
226
+ Context: {context} ### Response: """,
227
 
228
  "ri_prompt": """### Instruction: You are an caring, intelligent question answering agent. Craft a
229
  response that is more informative and intelligent than the original answer and imparts knowledge from
230
+ both the old answer and from the context ONLY if it helps answer the question.
231
  Question: {question}
232
  Old Answer: {answer}
233
  Context: {answer2}
234
+ Improved answer: ### Response: """
235
  }
236
 
237
  def process_query_words(self, question_words: str, answer_words: str):