Update app.py
Browse files
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,
|
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
|
|
|
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(
|