HanLee commited on
Commit
6b66af2
·
unverified ·
1 Parent(s): 7728cf9

feat: updated prompts to fix regressions

Browse files
Files changed (1) hide show
  1. app/prompt.py +5 -2
app/prompt.py CHANGED
@@ -7,7 +7,8 @@
7
  from langchain.prompts import PromptTemplate
8
 
9
 
10
- template = """Given the following extracted parts of a long document and a question, create a final answer with references ("SOURCES").
 
11
  If you don't know the answer, just say that you don't know. Don't try to make up an answer.
12
  ALWAYS return a "SOURCES" field in your answer, with the format "SOURCES: <source1>, <source2>, <source3>, ...".
13
 
@@ -17,7 +18,9 @@ QUESTION: {question}
17
  =========
18
  FINAL ANSWER:"""
19
 
20
- PROMPT = PromptTemplate(template=template, input_variables=["summaries", "question"])
 
 
21
 
22
  EXAMPLE_PROMPT = PromptTemplate(
23
  template="Content: {page_content}\nSource: {source}",
 
7
  from langchain.prompts import PromptTemplate
8
 
9
 
10
+ template = """Please act as an expert financial analyst when you answer the questions and pay special attention to the financial statements. Operating margin is also known as op margin and is calculated by dividing operating income by revenue.
11
+ Given the following extracted parts of a long document and a question, create a final answer with references ("SOURCES"). Operating margin is also known as op margin.
12
  If you don't know the answer, just say that you don't know. Don't try to make up an answer.
13
  ALWAYS return a "SOURCES" field in your answer, with the format "SOURCES: <source1>, <source2>, <source3>, ...".
14
 
 
18
  =========
19
  FINAL ANSWER:"""
20
 
21
+ PROMPT = PromptTemplate(
22
+ template=template, input_variables=["summaries", "question"]
23
+ )
24
 
25
  EXAMPLE_PROMPT = PromptTemplate(
26
  template="Content: {page_content}\nSource: {source}",