Shubham170793 commited on
Commit
edaeee6
·
verified ·
1 Parent(s): 86a627a

Update src/qa.py

Browse files
Files changed (1) hide show
  1. src/qa.py +5 -3
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. Base your answer primarily on the CONTEXT, "
88
- "but apply logical inference only when necessary. Use your general knowledge to enhance answer if required\n"
89
- "If the document lacks the answer, say exactly:\n"
 
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
  # ==========================================================