Spaces:
Sleeping
Sleeping
Update app/app.py
Browse files- 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
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 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:
|