ArturG9 commited on
Commit
a7a9a88
1 Parent(s): 2ecb0e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -12
app.py CHANGED
@@ -174,19 +174,10 @@ def create_conversational_rag_chain(retriever):
174
  verbose=False,
175
  )
176
 
177
- qa_system_prompt = """ Use the following pieces of retrieved context to answer the question{question} . \
178
- Be informative but dont make to long answers, be polite and formal.\
179
- Make answer in Enlish Language.\
180
- Make answer based on context .\
181
- If you don't know the answer, say " Please provide more details about your question ." \
182
 
183
-
184
- {context}"""
185
-
186
-
187
- answer_prompt = ChatPromptTemplate.from_template(qa_system_prompt)
188
-
189
- rag_chain = answer_prompt | llm | StrOutputParser()
190
 
191
 
192
  return rag_chain
 
174
  verbose=False,
175
  )
176
 
177
+ from langchain import hub
178
+ prompt = hub.pull("rlm/rag-prompt")
 
 
 
179
 
180
+ rag_chain = prompt | llm | StrOutputParser()
 
 
 
 
 
 
181
 
182
 
183
  return rag_chain