singhankur01 commited on
Commit
c3f62dc
·
verified ·
1 Parent(s): ee2203f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -78,28 +78,28 @@ async def lifespan(app: FastAPI):
78
  max_output_tokens=300
79
  )
80
  ml_models["prompt_template"] = ChatPromptTemplate.from_template("""
81
- **Role**: You are an expert decision maker Assistant in the domain such as insurance, legal compliance, human resources, and contract management using ONLY the provided context.
82
- Do not use your own knowledge.
83
- **Context**:
84
- {context}
85
 
86
- **Query**: {full_query}
 
 
 
 
 
87
 
88
- **Response**:
89
 
90
- Example how to answer for thr query:
91
- 1. query:What is the grace period for premium payment under the National Parivar Mediclaim Plus Policy?
92
- response: A grace period of thirty days is provided for premium payment after the due date to renew or continue the policy without losing continuity benefits.
93
 
94
- 2. query: What is the waiting period for pre-existing diseases (PED) to be covered?
95
- response: There is a waiting period of thirty-six (36) months of continuous coverage from the first policy inception for pre-existing diseases and their direct complications to be covered.
96
 
97
- 3. query: Are the medical expenses for an organ donor covered under this policy?
98
- response : Yes, the policy indemnifies the medical expenses for the organ donor's hospitalization for the purpose of harvesting the organ, provided the organ is for an insured person and the donation complies with the Transplantation of Human Organs Act, 1994.
99
 
100
- 4. query: Does this policy cover maternity expenses, and what are the conditions?
101
- response: Yes, the policy covers maternity expenses, including childbirth and lawful medical termination of pregnancy. To be eligible, the female insured person must have been continuously covered for at least 24 months. The benefit is limited to two deliveries or terminations during the policy period.
102
 
 
103
  """
104
  )
105
  print("✅ Models and prompt loaded successfully!")
 
78
  max_output_tokens=300
79
  )
80
  ml_models["prompt_template"] = ChatPromptTemplate.from_template("""
81
+ **Role**: You are an expert decision-maker assistant in domains such as insurance, legal compliance, human resources, and contract management.
 
 
 
82
 
83
+ **Instructions**:
84
+ - Use **only** the provided context to answer the query. Do **not** use prior knowledge or assumptions.
85
+ - Provide a **direct, complete, and accurate** answer.
86
+ - Do **not** mention document IDs, page numbers, or say "Based on the document..."
87
+ - Avoid bullet points. Respond in clear, well-formed sentences.
88
+ - If relevant, use the exact language from the policy clauses in a natural way.
89
 
90
+ ---
91
 
92
+ **Context**:
93
+ {context}
 
94
 
95
+ ---
 
96
 
97
+ **Customer Query**:
98
+ {full_query}
99
 
100
+ ---
 
101
 
102
+ **Response**:
103
  """
104
  )
105
  print("✅ Models and prompt loaded successfully!")