Update src/qa.py
Browse files
src/qa.py
CHANGED
|
@@ -79,10 +79,11 @@ STRICT_PROMPT = (
|
|
| 79 |
"You are an enterprise documentation assistant.\n"
|
| 80 |
"Use all relevant information from the CONTEXT below.\n"
|
| 81 |
"If multiple related points appear across chunks, combine them logically into one clear answer.\n"
|
| 82 |
-
"Do not invent facts outside the provided content.\n"
|
| 83 |
"If the answer cannot be found even after considering all chunks, say exactly:\n"
|
| 84 |
"'I don't know based on the provided document.'\n\n"
|
| 85 |
"Context:\n{context}\n\nQuestion: {query}\nAnswer:"
|
|
|
|
| 86 |
)
|
| 87 |
|
| 88 |
REASONING_PROMPT = (
|
|
@@ -187,7 +188,8 @@ def generate_answer(query: str, retrieved_chunks: list, reasoning_mode: bool = F
|
|
| 187 |
"content": (
|
| 188 |
"You are an expert enterprise documentation assistant. "
|
| 189 |
"When reasoning_mode is off, stay strictly factual and concise. "
|
| 190 |
-
"When on, combine insights across chunks logically
|
|
|
|
| 191 |
"If answer not in document, say exactly: "
|
| 192 |
"'I don't know based on the provided document.'"
|
| 193 |
),
|
|
|
|
| 79 |
"You are an enterprise documentation assistant.\n"
|
| 80 |
"Use all relevant information from the CONTEXT below.\n"
|
| 81 |
"If multiple related points appear across chunks, combine them logically into one clear answer.\n"
|
| 82 |
+
"Keep the answer concise but complete. Do not invent facts outside the provided content.\n"
|
| 83 |
"If the answer cannot be found even after considering all chunks, say exactly:\n"
|
| 84 |
"'I don't know based on the provided document.'\n\n"
|
| 85 |
"Context:\n{context}\n\nQuestion: {query}\nAnswer:"
|
| 86 |
+
|
| 87 |
)
|
| 88 |
|
| 89 |
REASONING_PROMPT = (
|
|
|
|
| 188 |
"content": (
|
| 189 |
"You are an expert enterprise documentation assistant. "
|
| 190 |
"When reasoning_mode is off, stay strictly factual and concise. "
|
| 191 |
+
"When reasoning_mode is on, combine insights across chunks logically "
|
| 192 |
+
"and explain the reasoning briefly."
|
| 193 |
"If answer not in document, say exactly: "
|
| 194 |
"'I don't know based on the provided document.'"
|
| 195 |
),
|