Commit
·
2b46018
1
Parent(s):
0ab514a
verification prompt change
Browse files
prompts/verification_prompt.txt
CHANGED
|
@@ -7,24 +7,19 @@ Your role is to:
|
|
| 7 |
4. Make final formatting adjustments
|
| 8 |
|
| 9 |
Quality standards checklist:
|
| 10 |
-
- Response directly answers the user's question
|
| 11 |
-
- Information is accurate and well-sourced
|
| 12 |
-
- Format follows exact-match output rules from system prompt
|
| 13 |
-
- No extraneous text or formatting violations
|
| 14 |
-
- Tone and style are appropriate
|
| 15 |
|
| 16 |
-
Output format
|
| 17 |
-
• Single number → write the number only (no commas, units, or other symbols)
|
| 18 |
-
• Single string/phrase → write the text only; omit articles and abbreviations unless explicitly required
|
| 19 |
-
• List → separate elements with a single comma and a space
|
| 20 |
-
• Never include surrounding text such as "Final Answer", "Answer:", quotes, brackets, or
|
| 21 |
|
| 22 |
Decision process:
|
| 23 |
-
1. Review the response against quality standards
|
| 24 |
-
2. Check format compliance with exact-match rules
|
| 25 |
-
3. If PASS:
|
| 26 |
-
4. If FAIL: trigger fallback pipeline and note specific issues
|
| 27 |
|
| 28 |
-
|
| 29 |
|
| 30 |
-
Always
|
|
|
|
| 7 |
4. Make final formatting adjustments
|
| 8 |
|
| 9 |
Quality standards checklist:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
Output format rules (must be followed EXACTLY):
|
| 12 |
+
• Single number → write the number only (no commas, units, or other symbols).
|
| 13 |
+
• Single string/phrase → write the text only; omit articles and abbreviations unless explicitly required.
|
| 14 |
+
• List → separate elements with a single comma and a space.
|
| 15 |
+
• Never include any surrounding text such as "Final Answer", "Answer:", quotes, brackets, markdown, or explanations.
|
| 16 |
|
| 17 |
Decision process:
|
| 18 |
+
1. Review the response against quality standards.
|
| 19 |
+
2. Check format compliance with exact-match rules.
|
| 20 |
+
3. If PASS: output ONLY the properly formatted final answer (nothing else).
|
| 21 |
+
4. If FAIL: trigger fallback pipeline and note specific issues.
|
| 22 |
|
| 23 |
+
IMPORTANT: Your reply MUST contain ONLY the final answer. Do NOT add any additional text, reasoning, markdown formatting, or commentary.
|
| 24 |
|
| 25 |
+
Always ensure the final output strictly adheres to the system prompt requirements.
|
src/agents/verification_node.py
CHANGED
|
@@ -41,6 +41,13 @@ def extract_final_answer(response_content: str) -> str:
|
|
| 41 |
items = [line.strip().lstrip('-*•').strip() for line in answer.split('\n') if line.strip()]
|
| 42 |
answer = ', '.join(items)
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
return answer.strip()
|
| 45 |
|
| 46 |
|
|
|
|
| 41 |
items = [line.strip().lstrip('-*•').strip() for line in answer.split('\n') if line.strip()]
|
| 42 |
answer = ', '.join(items)
|
| 43 |
|
| 44 |
+
# If there are still multiple lines, keep only the first non-empty line (to avoid explanations)
|
| 45 |
+
if '\n' in answer:
|
| 46 |
+
for line in answer.split('\n'):
|
| 47 |
+
if line.strip():
|
| 48 |
+
answer = line.strip()
|
| 49 |
+
break
|
| 50 |
+
|
| 51 |
return answer.strip()
|
| 52 |
|
| 53 |
|