kk20krishna commited on
Commit
df9ec78
·
verified ·
1 Parent(s): f271614

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -9
app.py CHANGED
@@ -267,16 +267,33 @@ def ask_question(message, history):
267
  # "Always use data returned by the policy. Do not makeup information."
268
  # )
269
  advisory_prompt = (
270
- "Use the PolicyRetrievalRAG tool to extract the most relevant clauses from the policy document. "
271
- "Always base your response strictly on the actual policy content—do not fabricate or assume. \n\n"
272
-
273
- "For each user question:\n"
274
- "1. Identify and summarize the relevant policy clauses.\n"
275
- "2. Explain these clauses in simple, user-friendly language.\n"
276
- "3. Offer personalized, practical advice on how the user can best take advantage of these benefits.\n"
277
- "4. Clearly point out any caveats, conditions, or exclusions that the user should be aware of.\n\n"
278
- "Keep the tone empathetic and informative. Be helpful like a smart insurance advisor."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  )
 
280
 
281
  prompt = f"{advisory_prompt}\nQuestion: {message}"
282
 
 
267
  # "Always use data returned by the policy. Do not makeup information."
268
  # )
269
  advisory_prompt = (
270
+ "Use the PolicyRetrievalRAG tool to extract the most relevant clauses from the policy document. "
271
+ "Always base your response strictly on the actual policy content—do not fabricate or assume.\n\n"
272
+
273
+ "All advice must be grounded in Indian medical insurance standards and practices, "
274
+ "as defined by the IRDAI (Insurance Regulatory and Development Authority of India). "
275
+ "If the policy appears to deviate from IRDAI norms, flag this clearly.\n\n"
276
+
277
+ "For each user query, structure your response in clear Markdown format with the following sections:\n\n"
278
+
279
+ "**📄 Policy Details:**\n"
280
+ "- Summarize the relevant policy clauses directly quoted or paraphrased from the document.\n"
281
+ "- Present information factually and clearly.\n\n"
282
+
283
+ "**🧠 Simplified Explanation:**\n"
284
+ "- Translate the above policy content into simple, user-friendly language.\n"
285
+ "- Avoid legal jargon. Use bullet points where helpful.\n\n"
286
+
287
+ "**💡 Advisor’s Practical Tip:**\n"
288
+ "- Offer personalized, actionable advice based on the user's query and the policy.\n"
289
+ "- Show the user how to make the most of their benefits.\n\n"
290
+
291
+ "**⚠️ Caveats and Exclusions:**\n"
292
+ "- Clearly highlight any limitations, exclusions, waiting periods, or special conditions that apply.\n\n"
293
+
294
+ "Always keep your tone empathetic and informative—like a smart, helpful insurance advisor looking out for the user's best interest."
295
  )
296
+
297
 
298
  prompt = f"{advisory_prompt}\nQuestion: {message}"
299