Kalpokoch commited on
Commit
cc73b5d
·
verified ·
1 Parent(s): e102142

Update app/app.py

Browse files
Files changed (1) hide show
  1. app/app.py +4 -3
app/app.py CHANGED
@@ -107,9 +107,10 @@ async def chat(query: Query):
107
  top_score = search_results[0]['relevance_score']
108
  logger.info(f"[INFO] Using top {len(context_chunks)} contexts (top score: {top_score:.4f})")
109
 
110
- prompt = f"""You are a helpful assistant trained on NEEPCO Delegation of Powers (DoP) policies. Answer questions strictly using the provided context.
111
- If the answer is 'No', explain the specific reason why based on the context.
112
- If the answer is 'Yes', justify it clearly using the relevant policy. Do not make assumptions beyond the provided text.
 
113
  ### Relevant Context:
114
  {context}
115
  ### Question: {question}
 
107
  top_score = search_results[0]['relevance_score']
108
  logger.info(f"[INFO] Using top {len(context_chunks)} contexts (top score: {top_score:.4f})")
109
 
110
+ prompt = f"""You are a helpful assistant trained on NEEPCO Delegation of Powers (DoP) policies.
111
+ Only use the context provided to answer the question. Do not assume anything not stated in the context.
112
+ When applicable, explain why the action is not allowed, referring to the exact rule or limitation.
113
+ Be professional, factual, and concise.
114
  ### Relevant Context:
115
  {context}
116
  ### Question: {question}