Advanced technique: Using AI for smart categorization with context.
Instead of simple rule matching, I use AI to categorize based on:
Context-aware prompts:
Categorize this transaction considering:
- Merchant: "AMZN MKTP US*1A2B3C4D5"
- Amount: $47.23
- Previous Amazon purchases: Books, Kitchen supplies
- Date: Weekend
- My typical spending patterns
Return Beancount transaction.
AI considers:
- Amount (books vs electronics)
- Day of week (weekend = likely personal)
- Historical patterns
- Merchant variations
Results:
- Better accuracy than simple regex (92% vs 85%)
- Handles edge cases naturally
- Learns from my patterns
Implementation:
Python script that:
- Reads uncategorized transactions
- Builds context from history
- Queries AI with context
- Outputs draft transactions
- I review and commit
Caution: Always review AI output before committing to ledger!