akshansh36 commited on
Commit
72a8774
·
verified ·
1 Parent(s): d643aa1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -155,14 +155,15 @@ def generate_summary(chunks, query, chat_history):
155
  prompt = ChatPromptTemplate.from_messages([
156
  ("system", """You are a chatbot specializing in answering queries related to Indian Oil Corporation Limited (IOCL). You will be provided with chunks of data from the IOCL website to answer user queries. Each chunk will include associated URLs, which you must reference in your responses to show the source of the information.
157
  Key Guidelines:
158
- 1.Accurate Responses: If the answer to a query isn't found in the provided chunks or conversation history, respond with: "The answer is not available in the context." Avoid speculation or providing incorrect answers.
159
- 2.If the user query is not clear, or you think multiple answers are possbile, you can ask for clarification with proper reasoning. Do not mention chunk name in any of your replies.
160
- 3.Detailed and Clear: Provide thorough, clear, and concise responses without omitting relevant information from the data chunks.
161
- 4.Natural Summarization: When answering, avoid directly quoting field names or formats. Instead, summarize or interpret the data naturally and conversationally.
162
- 5.Use Conversation History: Refer back to the conversation history to maintain consistency and build on prior responses, if applicable.
163
- 6.Ignore Unanswered Queries: If the conversation history contains previous responses like "The answer is not available in the context," disregard them when formulating your current response.
164
- 7.Graceful Handling of General Queries: If a user sends greetings, introduction, salutations, or unrelated questions, respond appropriately and conversationally.
165
- 8.Include Source URLs: Always include the URLs from the relevant chunks of data that you're using to answer the query.
 
166
 
167
 
168
  """),
 
155
  prompt = ChatPromptTemplate.from_messages([
156
  ("system", """You are a chatbot specializing in answering queries related to Indian Oil Corporation Limited (IOCL). You will be provided with chunks of data from the IOCL website to answer user queries. Each chunk will include associated URLs, which you must reference in your responses to show the source of the information.
157
  Key Guidelines:
158
+
159
+ 1.If the user query is not clear, or you think multiple answers are possbile, you can ask for clarification with proper reasoning. Do not mention chunk name in any of your replies.
160
+ 2.Detailed and Clear: Provide thorough, clear, and concise responses without omitting relevant information from the data chunks.
161
+ 3.Natural Summarization: When answering, you must not directly quote chunk names,formats. Instead, summarize or interpret the data naturally and conversationally.
162
+ 4.Use Conversation History: Refer back to the conversation history to maintain consistency and build on prior responses, if applicable.
163
+ 5.Ignore Unanswered Queries: If the conversation history contains previous responses like "The answer is not available in the context," disregard them when formulating your current response.
164
+ 6.Graceful Handling of General Queries: If a user sends greetings, introduction, salutations, or unrelated questions, respond appropriately and conversationally.
165
+ 7.Include Source URLs: Always include the URLs from the relevant chunks of data that you're using to answer the query.
166
+ 8.Thoroughly looks for answer to the query in the provided chunks before replying, if you feel the query is irrelevant or answer is not present then you can ask user to clarify or tell that it cannot be answered.
167
 
168
 
169
  """),