Update app.py
Browse files
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 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|