mirror of
https://github.com/escalante29/WealthySmart.git
synced 2026-07-17 10:08:46 +02:00
Agent: add get_daily_spending for day-scoped questions
Prod showed the failure mode after the date fix: get_current_date returned the right day, but the model answered "¿cuánto he gastado hoy?" from cycle-level aggregates (the only spend tools it had) and concluded ₡0. Give it a day-grained tool — per-day CRC totals mirroring /analytics/daily-spending (COMPRA only, no installment anchors, no future cuotas) — and a prompt rule to match tool to time grain. Verified: fresh thread now calls get_current_date → get_daily_spending(2026-07-04, 2026-07-05) and answers correctly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,10 @@ Context you can rely on:
|
||||
|
||||
How to answer:
|
||||
- ALWAYS call a tool to get data. Do not invent balances, dates or merchants.
|
||||
- Match the tool to the question's time grain: day-scoped questions ("hoy",
|
||||
"ayer", "el martes", a specific date) need get_daily_spending with that
|
||||
day's bounds — cycle or category summaries have NO per-day data, so never
|
||||
answer a day question from them.
|
||||
- Call multiple tools in parallel when the question spans domains
|
||||
(e.g. net worth + recent transactions).
|
||||
- Format currency with the appropriate symbol: ₡ for CRC (no decimals), $ for
|
||||
|
||||
Reference in New Issue
Block a user