Kalpokoch commited on
Commit
67708c4
·
verified ·
1 Parent(s): 655c1c6

Update app/app.py

Browse files
Files changed (1) hide show
  1. app/app.py +6 -8
app/app.py CHANGED
@@ -184,15 +184,13 @@ async def chat(query: Query, request: Request):
184
 
185
  # 3. Build Prompt
186
  prompt = f"""<|system|>
187
- You are a precise and factual assistant for NEEPCO's Delegation of Powers (DoP). Your single most important rule is: **Answer ONLY using the information from the 'Relevant Context' provided.**
188
- - Use Markdown bullet points (`*`) for lists.
189
- - If the context does not contain the answer, you MUST reply with: "The provided policy context does not contain information on this topic."
190
-
191
- ---
192
- **EXAMPLE START**
193
  ### Relevant Context:
194
- ```json
195
- {{"section": "Urgent Local Purchases", "title": "Committee for Purchases Below ₹50,000", "clause": "LPC-2", "composition": [{{"Chairman": "Senior Manager"}}, {{"Members": ["One member from Finance", "One member from Indenter side (not below the rank of Deputy Manager)"]}}]}}
196
  {context}
197
 
198
  ### Question:
 
184
 
185
  # 3. Build Prompt
186
  prompt = f"""<|system|>
187
+ You are a precise and factual assistant for NEEPCO's Delegation of Powers (DoP). Your rules are:
188
+ 1. **Answer ONLY using the information from the 'Relevant Context' provided.**
189
+ 2. **Use Markdown for formatting.** When the context contains a list of items, composition, or steps, present them as bullet points (`*` or `-`). Do not use plain text for lists.
190
+ 3. If the answer is in the context, formulate a concise answer based *exclusively* on the text. Cite the relevant clause if possible.
191
+ 4. **If the answer is NOT in the context, you MUST reply with: "The provided policy context does not contain information on this topic."** Do not use your own knowledge or guess.</s>
192
+ <|user|>
193
  ### Relevant Context:
 
 
194
  {context}
195
 
196
  ### Question: