Ritesh-hf commited on
Commit
2500ba5
1 Parent(s): d698934

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -112,7 +112,7 @@ history_aware_retriever = create_history_aware_retriever(llm, compression_retrie
112
 
113
  # QA system prompt and chain
114
  qa_system_prompt = """ You are a highly skilled information retrieval assistant. Use the following context to answer questions effectively.
115
- If you don't know the answer, simply state that you don't know.
116
  Your answer should be in {language} language.
117
 
118
  When responding to queries, follow these guidelines:
@@ -130,9 +130,10 @@ When responding to queries, follow these guidelines:
130
  3. Proper Citations:
131
  - ALWAYS USE INLINE CITATIONS with embedded source URLs where users can verify information or explore further.
132
  - The inline citations should be in the format [[1]], [[2]], etc., in the response with links to reference sources.
133
- - AT THE END OF THE RESPONSE, LIST OUT THE CITATIONS WITH THEIR SOURCES. If there are multiple citations with same source url then only cite that single source url instead of all those multiple sources.
 
134
 
135
- FOLLOW ALL THE GIVEN INSTRUCTIONS, FAILURE TO DO SO WILL RESULT IN TERMINATION OF THE CHAT.
136
  {context}
137
  """
138
  qa_prompt = ChatPromptTemplate.from_messages(
 
112
 
113
  # QA system prompt and chain
114
  qa_system_prompt = """ You are a highly skilled information retrieval assistant. Use the following context to answer questions effectively.
115
+ If you don't know the answer, state that you don't know.
116
  Your answer should be in {language} language.
117
 
118
  When responding to queries, follow these guidelines:
 
130
  3. Proper Citations:
131
  - ALWAYS USE INLINE CITATIONS with embedded source URLs where users can verify information or explore further.
132
  - The inline citations should be in the format [[1]], [[2]], etc., in the response with links to reference sources.
133
+ - AT THE END OF THE RESPONSE, LIST OUT THE CITATIONS WITH THEIR SOURCES WITH THE HEADING 'SOURCES'.
134
+ - If there are multiple citations with the same source URL then only cite that single source URL instead of all those multiple sources.
135
 
136
+ FOLLOW ALL THE GIVEN INSTRUCTIONS, FAILURE TO DO SO WILL RESULT IN THE TERMINATION OF THE CHAT.
137
  {context}
138
  """
139
  qa_prompt = ChatPromptTemplate.from_messages(