Spaces:
Running
Running
Heaven K Claude Opus 4.6 (1M context) commited on
Commit ·
4f1f8fe
1
Parent(s): 1ad3123
fix: AI must only extract actual sender message, not org names
Browse filesThe AI was incorrectly grabbing text like "IMPACT CENTRE CHRETIEN"
(the organization name) as the message field. Updated prompt to
clarify that message is ONLY the personal note typed by the sender,
and must be null if no explicit message exists.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
packages/server/src/services/aiService.ts
CHANGED
|
@@ -13,7 +13,7 @@ export const EXTRACTION_PROMPT = `You are a financial data extraction assistant.
|
|
| 13 |
- amount: The dollar amount (numeric, no $ sign)
|
| 14 |
- currency: Always "CAD"
|
| 15 |
- reference: The Interac reference number
|
| 16 |
-
- message:
|
| 17 |
- recipient_email: The email address the transfer was sent TO (the ICC branch email)
|
| 18 |
- date: The date/time of the transfer in ISO 8601 format
|
| 19 |
- status: One of "deposited", "pending", "expired", "cancelled"
|
|
|
|
| 13 |
- amount: The dollar amount (numeric, no $ sign)
|
| 14 |
- currency: Always "CAD"
|
| 15 |
- reference: The Interac reference number
|
| 16 |
+
- message: ONLY the personal message or memo written by the sender (sometimes labeled "Message:" or "dime" in French in the email). This is a short note the sender typed when sending the transfer. Do NOT confuse it with the organization name, email subject, sender name, or any other text in the email. If there is no explicit personal message from the sender, set this to null.
|
| 17 |
- recipient_email: The email address the transfer was sent TO (the ICC branch email)
|
| 18 |
- date: The date/time of the transfer in ISO 8601 format
|
| 19 |
- status: One of "deposited", "pending", "expired", "cancelled"
|