Update app.py
Browse files
app.py
CHANGED
|
@@ -401,9 +401,32 @@ prompt_templates = PromptTemplates(
|
|
| 401 |
report="Generate final decision: {results}"
|
| 402 |
),
|
| 403 |
final_answer=FinalAnswerPromptTemplate(
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 407 |
)
|
| 408 |
)
|
| 409 |
|
|
|
|
| 401 |
report="Generate final decision: {results}"
|
| 402 |
),
|
| 403 |
final_answer=FinalAnswerPromptTemplate(
|
| 404 |
+
|
| 405 |
+
pre_messages="""Summarize the final claim decision based on your tools.
|
| 406 |
+
Format the result in markdown using:
|
| 407 |
+
- A headline that is exactly one of:
|
| 408 |
+
- ## ✅ Claim Approved
|
| 409 |
+
- ## ⚠️ Claim Needs Review
|
| 410 |
+
- ## ❌ Claim Denied
|
| 411 |
+
|
| 412 |
+
Then show these values on separate lines:
|
| 413 |
+
- **Claim Number:** ...
|
| 414 |
+
- **Recommended Payout:** ...
|
| 415 |
+
- **Deductible:** ...
|
| 416 |
+
- **Confidence Score:** ...
|
| 417 |
+
- **Confidence Summary:** ...
|
| 418 |
+
|
| 419 |
+
Then include these sections:
|
| 420 |
+
- ### Coverage Summary
|
| 421 |
+
- ### Confidence Summary
|
| 422 |
+
- ### Notes
|
| 423 |
+
|
| 424 |
+
Use readable spacing and line breaks.
|
| 425 |
+
Use the approved headline when the claim is covered and confidence is reasonably strong.
|
| 426 |
+
Use the needs review headline when the claim is uncertain, borderline, or lower confidence.
|
| 427 |
+
Use the denied headline when the claim is not covered.""",
|
| 428 |
+
post_messages="Output clearly formatted decision in markdown.",
|
| 429 |
+
final_answer_template="""{final_answer}"""
|
| 430 |
)
|
| 431 |
)
|
| 432 |
|