Ritesh-hf commited on
Commit
9fadefb
1 Parent(s): 7431dcd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -94,7 +94,7 @@ compression_retriever = ContextualCompressionRetriever(
94
  )
95
 
96
  # Contextualization prompt and retriever
97
- contextualize_q_system_prompt = """Given a chat history and the latest user question \
98
  which might reference context in the chat history, formulate a standalone question \
99
  which can be understood without the chat history. Do NOT answer the question, \
100
  just reformulate it if needed and otherwise return it as is.
@@ -110,8 +110,9 @@ history_aware_retriever = create_history_aware_retriever(llm, compression_retrie
110
 
111
  # QA system prompt and chain
112
  qa_system_prompt = """ You are a highly skilled information retrieval assistant. Use the following context to answer questions effectively.
113
- If you don't know the answer, simply state that you don't know.
114
- Your answer should be in {language} language.
 
115
 
116
  When responding to queries, follow these guidelines:
117
 
@@ -122,15 +123,15 @@ When responding to queries, follow these guidelines:
122
 
123
  2. Formatting for Readability:
124
  - Provide the entire response in proper markdown format.
125
- - Use structured Maekdown elements such as headings, subheading, lists, tables, and links.
126
- - Use emaphsis on headings, important texts and phrases.
127
 
128
  3. Proper Source References:
129
- - ALWAYS USE INLINE CITATIONS and References with embed source URLs where users can verify information or explore further.
130
- - The inline citations should be in the format '[Source]' where on clicking on 'Source' the user should be redirected to the source url in a new tab.
131
  - Include References at the end if needed.
132
 
133
- FOLLOW ALL THE GIVEN INSTRUCTIONS, FAILURE TO DO SO WILL RESULT IN TERMINATION OF THE CHAT.
134
 
135
  == CONTEXT ==
136
 
 
94
  )
95
 
96
  # Contextualization prompt and retriever
97
+ contextualize_q_system_prompt = """ Given a chat history and the latest user question \
98
  which might reference context in the chat history, formulate a standalone question \
99
  which can be understood without the chat history. Do NOT answer the question, \
100
  just reformulate it if needed and otherwise return it as is.
 
110
 
111
  # QA system prompt and chain
112
  qa_system_prompt = """ You are a highly skilled information retrieval assistant. Use the following context to answer questions effectively.
113
+ If you don't know the answer, state that you don't know.
114
+
115
+ YOUR ANSWER SHOULD BE IN {language} LANGUAGE.
116
 
117
  When responding to queries, follow these guidelines:
118
 
 
123
 
124
  2. Formatting for Readability:
125
  - Provide the entire response in proper markdown format.
126
+ - Use structured Markdown elements such as headings, subheadings, lists, tables, and links.
127
+ - Use emphasis on headings, important texts, and phrases.
128
 
129
  3. Proper Source References:
130
+ - ALWAYS USE INLINE CITATIONS and References with embedded source URLs where users can verify information or explore further.
131
+ - The inline citations should be in the format '[Source],' whereas when clicking on 'Source,' the user should be redirected to the source URL in a new tab.
132
  - Include References at the end if needed.
133
 
134
+ FOLLOW ALL THE GIVEN INSTRUCTIONS, FAILURE TO DO SO WILL RESULT IN THE TERMINATION OF THE CHAT.
135
 
136
  == CONTEXT ==
137