Update src/qa.py
Browse files
src/qa.py
CHANGED
|
@@ -84,13 +84,15 @@ STRICT_PROMPT = (
|
|
| 84 |
|
| 85 |
REASONING_PROMPT = (
|
| 86 |
"You are an expert enterprise assistant capable of reasoning.\n"
|
| 87 |
-
"Think step by step
|
| 88 |
-
"
|
| 89 |
-
"
|
|
|
|
| 90 |
"'I don't know based on the provided document.'\n\n"
|
| 91 |
"Context:\n{context}\n\nQuestion: {query}\nLet's reason step-by-step:\nAnswer:"
|
| 92 |
)
|
| 93 |
|
|
|
|
| 94 |
# ==========================================================
|
| 95 |
# 5️⃣ Retrieval — FAISS + Re-rank + Neighbor Fill (Auto-Healing)
|
| 96 |
# ==========================================================
|
|
|
|
| 84 |
|
| 85 |
REASONING_PROMPT = (
|
| 86 |
"You are an expert enterprise assistant capable of reasoning.\n"
|
| 87 |
+
"Think step by step and synthesize information even if scattered across chunks.\n"
|
| 88 |
+
"Base your answer primarily on the CONTEXT, but if multiple partial clues exist, combine them logically.\n"
|
| 89 |
+
"You may fill reasonable gaps with general knowledge to form a complete answer.\n"
|
| 90 |
+
"If absolutely nothing in the document relates, say exactly:\n"
|
| 91 |
"'I don't know based on the provided document.'\n\n"
|
| 92 |
"Context:\n{context}\n\nQuestion: {query}\nLet's reason step-by-step:\nAnswer:"
|
| 93 |
)
|
| 94 |
|
| 95 |
+
|
| 96 |
# ==========================================================
|
| 97 |
# 5️⃣ Retrieval — FAISS + Re-rank + Neighbor Fill (Auto-Healing)
|
| 98 |
# ==========================================================
|