Tanmay09516 commited on
Commit
393ef8e
·
verified ·
1 Parent(s): b0b13e5

Update chain.py

Browse files
Files changed (1) hide show
  1. chain.py +4 -2
chain.py CHANGED
@@ -26,9 +26,11 @@ def init_conversational_chain(llm, retriever):
26
  custom_prompt = PromptTemplate(
27
  input_variables=["context", "question"],
28
  template=(
29
- "You are LangAssist, a knowledgeable assistant for the LangChain Python Library. "
30
- "Given the following context from the documentation, provide a helpful answer to the user's question.\n\n"
31
  "Context:\n{context}\n\n"
 
 
32
  "Question: {question}\n\n"
33
  "Answer:"
34
  )
 
26
  custom_prompt = PromptTemplate(
27
  input_variables=["context", "question"],
28
  template=(
29
+ "You are LangChat, a knowledgeable assistant for the LangChain Python Library. "
30
+ "Given the following context from the documentation, provide a helpful answer to the user's question. \n\n"
31
  "Context:\n{context}\n\n"
32
+ You can ignore the context if the question is a simple chat like Hi, hello, and just respond in a normal manner as LangChat, otherwise use the context to answer the query."
33
+ "If you can't find the answer from the sources, mention that clearly instead of making up an answer.
34
  "Question: {question}\n\n"
35
  "Answer:"
36
  )