Overview
AI Categorization uses machine learning to automatically assign categories to your transactions based on their descriptions. This feature saves time when importing large numbers of transactions from bank files.How It Works
AI Model
Budgetron uses a language model to analyze transaction descriptions:- Description Analysis: Reads the transaction description
- Category Matching: Compares against your available categories
- Confidence Scoring: Uses fuzzy matching to find best fit
- Suggestion: Returns the most likely category
Processing Flow
- User uploads OFX file(s)
- Selects target bank account
- Enables “Auto-categorize transactions” option
- System extracts transactions from OFX files
- Retrieves user’s available categories
- Prepares data for AI processing
- AI analyzes each transaction description
- Matches descriptions to category names
- Assigns suggested categories
- User previews transactions with suggested categories
- Can edit or change any category
- Adds tags, notes, or other details
- Transactions saved with final categories
- Available immediately in reports and budgets
Using AI Categorization
During Transaction Import
- Navigate to Transactions → Import
- Select your bank account
- Choose OFX/QFX file(s) to upload
- Check the Auto-categorize transactions checkbox
- Click Upload file
- Review AI-suggested categories
- Make any adjustments needed
- Click Upload transactions to save
The auto-categorize option only appears when the AI service is available and
healthy. If you don’t see this option, the AI service may be down or not
configured.
Service Health Check
Budgetron checks AI service health before allowing categorization:- Healthy: Checkbox is enabled, auto-categorization available
- Unhealthy: Checkbox is disabled with “SERVICE DOWN” badge
- Checking: Loading indicator while health is verified
Category Matching Logic
The AI uses sophisticated matching: Fuzzy Matching- Threshold of 0.3 for category similarity
- Handles typos and variations in category names
- Case-insensitive matching
- Considers parent category + subcategory name
- Format: “Parent / Subcategory”
- Example: “Food & Dining / Restaurants”
- Analyzes merchant names
- Recognizes common patterns
- Learns from category structure
Categorization Accuracy
What AI Does Well
✅ Recognizes common merchants- Starbucks → Coffee Shops
- Shell Gas Station → Gas & Fuel
- Whole Foods → Groceries
- Netflix → Entertainment/Streaming
- Recurring subscriptions
- Utility payments
- ATM withdrawals
- Transfer descriptions
- Parent/child category relationships
- Similar category groupings
- Common spending patterns
When to Review Suggestions
⚠️ Ambiguous descriptions- Generic terms like “Payment” or “Transfer”
- Abbreviated merchant names
- Unknown or uncommon merchants
- Amazon (could be many categories)
- Walmart (groceries, household, electronics)
- Generic store names
- Newly created categories
- Very specific subcategories
- Personal categorization preferences
Technical Details
AI Service Architecture
Model: Configurable language model (OpenAI, Ollama, etc.)- Processes natural language descriptions
- Returns structured category suggestions
- Handles batch processing
- Prevents token limit issues
- Optimizes for model constraints
- Typically 6000 characters per chunk
- Matches AI output to actual categories
- Threshold: 0.3 similarity
- Location-independent matching
System Prompts
The AI receives:- System Prompt: Instructions for categorization task
- User Prompt: Transaction list + available categories
- Schema: Expected output format (index + category)
Response Format
Error Handling
Service Unavailable- Graceful fallback: categorization disabled
- User can still import without AI help
- Clear error message displayed
- Transactions imported without categories
- User can manually categorize after import
- Error logged for debugging
- Fuzzy matching finds closest category
- Falls back to null if no match found
- User can select correct category
Configuration
Enabling AI Service
AI categorization requires:- AI Model Configuration: Set up model in environment
- API Keys: Configure necessary API credentials
- Service Health: Model must be reachable
Environment Variables
Typical configuration:Consult your Budgetron deployment documentation for specific AI configuration
instructions.
Performance Considerations
Processing Time- Depends on number of transactions
- API latency for external models
- Typically 1-5 seconds per batch
- Respect model token constraints
- Automatic chunking prevents errors
- Optimized prompt design
- External APIs may charge per request
- Monitor usage for cost control
- Consider self-hosted models for high volume
Privacy and Security
Data Transmitted- Transaction descriptions (merchant names, etc.)
- Transaction amounts (for context)
- Available category list
- User personal information
- Account numbers or credentials
- Full transaction history
- Other sensitive financial data
Best Practices
Limitations
- AI service must be configured and running
- Requires network connectivity for cloud AI providers
- May incur API costs depending on provider
- Accuracy varies based on description quality
- Limited to existing categories (doesn’t create new ones)
- Processes in chunks, which may take time for large imports
Related Features
- Transactions - Import and manage transactions
- Categories - Set up categories for AI to use
- Bank Accounts - Select account for imports