taesiri commited on
Commit
c0e9296
1 Parent(s): 6f7ab8f

update prompt

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -95,9 +95,8 @@ class ContextualQA:
95
 
96
  def ask_question(self, question):
97
  leading_prompt = "Here is the content of a paper:"
98
- trailing_prompt = "Now, answer the following question:"
99
- markdown_notice = "Note: You can use markdown syntax to format your question."
100
- prompt = f"{anthropic.HUMAN_PROMPT} {leading_prompt}\n\n{self.context}\n\n{trailing_prompt}\n\n{anthropic.HUMAN_PROMPT} {question} \n({markdown_notice})\n\n{anthropic.AI_PROMPT}"
101
  response = self.client.completion_stream(
102
  prompt=prompt,
103
  stop_sequences=[anthropic.HUMAN_PROMPT],
 
95
 
96
  def ask_question(self, question):
97
  leading_prompt = "Here is the content of a paper:"
98
+ trailing_prompt = "Now, answer the following question below. You can optionally use Markdown to format your answer."
99
+ prompt = f"{anthropic.HUMAN_PROMPT} {leading_prompt}\n\n{self.context}\n\n{trailing_prompt}\n\n{anthropic.HUMAN_PROMPT} {question}\n\n{anthropic.AI_PROMPT}"
 
100
  response = self.client.completion_stream(
101
  prompt=prompt,
102
  stop_sequences=[anthropic.HUMAN_PROMPT],